/* base.css: Schriften, Design-Tokens, Reset, Typografie, Hilfsklassen.
   Farben nur über die Tokens verwenden, nie direkt im CSS. */

/* ── Schriften (lokal, variable Fonts) ─────────────────────────────────── */
@font-face {
    font-family: "Red Hat Display";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/red-hat-display-var-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: "Red Hat Display";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/red-hat-display-var-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/inter-var-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: "Inter";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/inter-var-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Ersatzschrift mit angepassten Maßen, damit beim Nachladen nichts springt */
@font-face {
    font-family: "Inter Fallback";
    src: local("Arial");
    size-adjust: 107%;
    ascent-override: 90%;
}
@font-face {
    font-family: "Red Hat Display Fallback";
    src: local("Arial");
    size-adjust: 97%;
    ascent-override: 95%;
}

/* ── Design-Tokens ─────────────────────────────────────────────────────── */
:root {
    /* Farben aus dem bisherigen Auftritt, Grüntöne für Text auf AA-Kontrast abgedunkelt */
    --c-brand: #5c8607;          /* Markengrün (Icons, Linien) */
    --c-brand-light: #70a309;
    --c-brand-pale: #bfd18e;     /* Logo-Grün */
    --c-action: #4f7406;         /* Buttons (weiß darauf 5,5:1) */
    --c-action-hover: #3f5d04;
    --c-link: #4a6d05;           /* Links (≥ 4,8:1 auf allen Flächen) */
    --c-text: #343f1e;
    --c-text-muted: #5b6450;
    --c-bg: #fdfaf1;             /* Creme */
    --c-bg-soft: #e3e9d8;        /* Hellgrün */
    --c-surface: #ffffff;
    --c-border: rgb(53 64 31 / 0.18);
    --c-overlay: rgb(25 30 14 / 0.45);
    --c-error: #a3261b;

    --font-body: "Inter", "Inter Fallback", system-ui, sans-serif;
    --font-head: "Red Hat Display", "Red Hat Display Fallback", system-ui, sans-serif;

    --fs-xs: 0.8125rem;
    --fs-sm: 0.9375rem;
    --fs-base: 1rem;
    --fs-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    --fs-h4: 1.25rem;
    --fs-h3: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
    --fs-h2: clamp(1.875rem, 1.4rem + 1.9vw, 2.75rem);
    --fs-h1: clamp(2.25rem, 1.5rem + 3vw, 4rem);

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-section: clamp(3.5rem, 2rem + 6vw, 7rem);

    --container: 1200px;
    --container-narrow: 820px;
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --shadow: 0 18px 40px -20px rgb(52 63 30 / 0.35);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --header-h: 84px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}
body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.7;
    overflow-x: clip;
}
main { overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, address { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--c-link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-action-hover); }
:focus-visible { outline: 3px solid var(--c-action); outline-offset: 3px; border-radius: 4px; }

/* ── Typografie ────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--c-text);
    text-wrap: balance;
    overflow-wrap: break-word;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 500; }
h4 { font-size: var(--fs-h4); font-weight: 600; }
p + p { margin-top: var(--space-4); }
strong { font-weight: 600; }
.lead { font-size: var(--fs-lead); line-height: 1.5; }
.eyebrow {
    font-family: var(--font-head);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

/* ── Layout-Hilfen ─────────────────────────────────────────────────────── */
.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}
.container--narrow { max-width: var(--container-narrow); }
.container .container--narrow { margin-inline: 0; }
.text-center { text-align: center; }
.text-center .container--narrow, .container--narrow.text-center { margin-inline: auto; }
.rounded { border-radius: var(--radius-lg); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--c-action);
    color: #fff;
    border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-4); color: #fff; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
