/*
 * Cultina Typography
 * ------------------
 * Body + heading scale + link + list + blockquote.
 * Heading sizes / line-heights are taken 1:1 from XD's documentLibrary.characterStyles.
 *
 * Body default = Ubuntu Light 300 / 18px / 1.6 line-height.
 * (XD ships Light 300, Regular Italic 400, Medium 500, Bold 700 — Regular 400 included
 * as a safe fallback for content authors.)
 *
 * Fonts are self-hosted from assets/fonts/ (DSGVO-konform). Split into latin +
 * latin-ext subsets via unicode-range so the browser only downloads what it
 * actually needs for the rendered text.
 */

/* =====================================================================
 * @font-face — Ubuntu, self-hosted from /assets/fonts/
 * Sourced from Google Fonts v21 (latin + latin-ext subsets).
 * ===================================================================== */

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/ubuntu-light-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/ubuntu-light-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ubuntu-regular-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ubuntu-regular-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ubuntu-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/ubuntu-italic-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/ubuntu-medium-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/ubuntu-medium-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ubuntu-bold-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Ubuntu';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/ubuntu-bold-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

body {
    font-family: var(--e-global-typography-text-font-family, var(--cultina-font-family));
    font-size: var(--e-global-typography-text-font-size, var(--cultina-font-size-body));
    font-weight: var(--e-global-typography-text-font-weight, var(--cultina-font-weight-light));
    line-height: var(--e-global-typography-text-line-height, var(--cultina-line-height-body));
    color: var(--cultina-color-text);
    background: var(--cultina-color-surface);
    /* Render text with grayscale anti-aliasing (like Adobe XD / design tools)
       instead of the browser default subpixel AA, which thickens text on macOS.
       Keeps Ubuntu Medium headings as light as the XD design renders them. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Elementor text-editor widgets must follow the body/text globals too —
   Elementor 4 emits no CSS for __globals__ typography on widgets. */
.elementor-widget-text-editor {
    font-family: var(--e-global-typography-text-font-family, var(--cultina-font-family));
    font-size: var(--e-global-typography-text-font-size, var(--cultina-font-size-body));
    font-weight: var(--e-global-typography-text-font-weight, var(--cultina-font-weight-light));
    line-height: var(--e-global-typography-text-line-height, var(--cultina-line-height-body));
}

/* ----- headings -------------------------------------------------------- */

/* Headings bridge to the Elementor Kit globals: editors change weights/sizes
   in Site Settings -> Global Fonts and the theme follows. Elementor 4 does
   not emit CSS for __globals__ typography refs on widgets, so this is the
   single source for heading metrics. H1 = primary (bold display), H2-H4 =
   secondary (Ubuntu Medium 500 per Anima). */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--e-global-typography-secondary-font-family, var(--cultina-font-family));
    color: var(--cultina-color-text);
    font-weight: var(--e-global-typography-secondary-font-weight, var(--cultina-font-weight-medium));
    line-height: var(--cultina-line-height-tight);
    margin: 0;
}

h1 {
    font-family: var(--e-global-typography-primary-font-family, var(--cultina-font-family));
    font-size: var(--e-global-typography-primary-font-size, var(--cultina-font-size-h1));
    font-weight: var(--e-global-typography-primary-font-weight, var(--cultina-font-weight-bold));
    line-height: var(--e-global-typography-primary-line-height, var(--cultina-line-height-display));
}

h2 {
    font-size: var(--e-global-typography-secondary-font-size, var(--cultina-font-size-h2));
    line-height: var(--e-global-typography-secondary-line-height, var(--cultina-line-height-h2));
}

h3 {
    font-size: var(--cultina-font-size-h3);
    line-height: var(--cultina-line-height-snug);
    font-weight: var(--cultina-font-weight-medium);
}

h4 {
    font-size: var(--cultina-font-size-h4);
    line-height: var(--cultina-line-height-h4);
    font-weight: var(--cultina-font-weight-medium);
}

h5 {
    font-size: var(--cultina-font-size-strong);
    font-weight: var(--cultina-font-weight-bold);
}

h6 {
    font-size: var(--cultina-font-size-body);
    font-weight: var(--cultina-font-weight-bold);
}

/* ----- semantic typography utilities ---------------------------------- */

.cultina-display {
    font-size: var(--cultina-font-size-display-fluid);
    line-height: var(--cultina-line-height-display);
    font-weight: var(--cultina-font-weight-bold);
    letter-spacing: -0.01em;
}

.cultina-eyebrow {
    font-size: var(--cultina-font-size-eyebrow);
    line-height: var(--cultina-line-height-eyebrow);
    font-weight: var(--cultina-font-weight-light);
    color: var(--cultina-color-primary);
    margin-bottom: var(--cultina-space-3);
    display: block;
}

.cultina-eyebrow--lime {
    color: var(--cultina-color-secondary);
}

.cultina-lead {
    font-size: var(--cultina-font-size-h4);
    line-height: var(--cultina-line-height-h4);
    font-weight: var(--cultina-font-weight-medium);
}

.cultina-strong {
    font-size: var(--cultina-font-size-strong);
    font-weight: var(--cultina-font-weight-bold);
}

.cultina-heading--uppercase {
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: var(--cultina-line-height-h2);
}

/* ----- inline elements ------------------------------------------------- */

a {
    color: var(--cultina-color-primary);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
    transition: color var(--cultina-duration-fast) var(--cultina-ease-out);
}

a:hover {
    color: var(--cultina-color-primary-hover);
}

a:focus-visible {
    outline: none;
    box-shadow: var(--cultina-focus-ring);
    border-radius: var(--cultina-radius-sm);
}

strong, b {
    font-weight: var(--cultina-font-weight-bold);
}

em, i {
    font-style: italic;
}

small {
    font-size: 0.875em;
}

mark {
    background: var(--cultina-color-surface-cream);
    padding: 0 0.2em;
}

::selection {
    background: var(--cultina-color-primary);
    color: var(--cultina-color-text-inverse);
}

/* ----- block elements -------------------------------------------------- */

p {
    margin: 0 0 var(--cultina-space-4);
}

p:last-child {
    margin-bottom: 0;
}

ul, ol {
    margin: 0 0 var(--cultina-space-4);
    padding-left: var(--cultina-space-5);
}

ul {
    list-style: disc;
}

ol {
    list-style: decimal;
}

li {
    margin-bottom: var(--cultina-space-2);
}

li:last-child {
    margin-bottom: 0;
}

blockquote {
    border-left: 4px solid var(--cultina-color-primary);
    padding: var(--cultina-space-2) 0 var(--cultina-space-2) var(--cultina-space-5);
    margin: var(--cultina-space-6) 0;
    font-size: var(--cultina-font-size-h4);
    line-height: var(--cultina-line-height-h4);
    font-style: italic;
    color: var(--cultina-color-text);
}

blockquote cite {
    display: block;
    margin-top: var(--cultina-space-3);
    font-size: var(--cultina-font-size-body);
    font-style: normal;
    color: var(--cultina-color-text-muted);
}

code, kbd, samp {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
    padding: 0.1em 0.4em;
    background: var(--cultina-color-surface-mute);
    border-radius: var(--cultina-radius-sm);
}

pre {
    overflow-x: auto;
    padding: var(--cultina-space-4);
    background: var(--cultina-color-surface-mute);
    border-radius: var(--cultina-radius-md);
    margin: 0 0 var(--cultina-space-4);
}

pre code {
    padding: 0;
    background: transparent;
}

/* Inline links inside content text are underlined per the reference design. */
.elementor-widget-text-editor a {
    color: var(--cultina-color-primary);
    text-decoration: underline;
}

/* =====================================================================
 * Elementor heading-widget overrides.
 * Elementor 4 binds ALL .elementor-heading-title widgets to the PRIMARY
 * global (110px display) via a generic class rule. Tag-level theme rules
 * lose on specificity, so we re-bind per tag here. Element-specific
 * settings from the editor (e.g. eyebrows, stats) generate far more
 * specific rules and still win — editors keep full control.
 * ===================================================================== */

.elementor-widget-heading h1.elementor-heading-title {
    font-family: var(--e-global-typography-primary-font-family, var(--cultina-font-family)), "Helvetica Neue", Arial, sans-serif;
    font-size: var(--e-global-typography-primary-font-size, 110px);
    font-weight: var(--e-global-typography-primary-font-weight, 700);
    line-height: var(--e-global-typography-primary-line-height, 1);
}

.elementor-widget-heading h2.elementor-heading-title {
    font-family: var(--e-global-typography-secondary-font-family, var(--cultina-font-family)), "Helvetica Neue", Arial, sans-serif;
    font-size: var(--e-global-typography-secondary-font-size, 36px);
    font-weight: var(--e-global-typography-secondary-font-weight, 500);
    line-height: var(--e-global-typography-secondary-line-height, 1.11);
    color: var(--cultina-color-text);
}

.elementor-widget-heading h3.elementor-heading-title,
.elementor-widget-heading h4.elementor-heading-title {
    font-family: var(--e-global-typography-secondary-font-family, var(--cultina-font-family)), "Helvetica Neue", Arial, sans-serif;
    font-size: 28px;
    font-weight: var(--e-global-typography-secondary-font-weight, 500);
    line-height: 1.29;
    color: var(--cultina-color-text);
}

/* Headings rendered as <div>/<p> (eyebrows, stats, labels) carry explicit
   editor settings; give them a sane base anyway. */
.elementor-widget-heading div.elementor-heading-title,
.elementor-widget-heading p.elementor-heading-title {
    font-family: var(--cultina-font-family);
    color: var(--cultina-color-text);
}

/* Hero/intro lead paragraph — 24px Ubuntu Light / 36px line-height
   (XD .fr-uns-ist-gutes-es). Applied via the .cultina-lead class on a
   text-editor widget so it stays visible/editable in the Elementor panel. */
.cultina-lead.elementor-widget-text-editor,
.cultina-lead .elementor-widget-container,
.cultina-lead p {
    font-size: 24px;
    font-weight: 300;
    line-height: 36px;
}
