/* ==========================================================================
   tokens.css – einzige Stelle für Designänderungen
   Farben laut Konzept Abschnitt 4. Markengrün ist aus dem Kartenfoto geschätzt
   und wird nach Eingang der Druckdaten hier zentral korrigiert.
   ========================================================================== */

:root {
  /* Farben */
  --color-black: #121212;          /* Seitenhintergrund, Schrift auf Grün */
  --color-anthracite: #1e1f1e;     /* Sektionen, Fußzeile */
  --color-anthracite-light: #2a2c2a; /* Karten, Formularfelder */
  --color-line: #3a3d3a;           /* Rahmen, Trennlinien (nur Deko) */
  --color-green: #5fa544;          /* Buttons, Bänder, Symbole, Akzente */
  --color-green-light: #72b85a;    /* Hover */
  --color-focus: #b5e59a;          /* Tastatur-Fokusrahmen */
  --color-green-glow: #8fd06f;     /* Grün als Text auf Fotos, mind. 5:1 (gemessen) */
  --color-on-photo: #e6e8e3;       /* Fließtext auf Fotos, mind. 7,6:1 (gemessen) */
  --color-white: #ffffff;          /* Überschriften, Fließtext */
  --color-text-muted: #c9cdc6;     /* langer Fließtext, Untertitel */
  --color-text-subtle: #9ea39a;    /* Bildunterschriften, Hinweise */
  --color-error: #ff7a6e;          /* Formularfehler (immer mit Text) */

  /* Helle Flächen (dezente Grautöne) – Aufbau mit hellen und dunklen Abschnitten */
  --color-paper: #ffffff;          /* weiße Abschnitte, Karten */
  --color-mist: #f2f3f0;           /* hellgraue Abschnitte */
  --color-mist-line: #dde0d9;      /* Rahmen auf Hell (nur Deko) */
  --color-field-line: #767c72;     /* Formularrahmen auf Hell, 4,4:1 */
  --color-ink: #121212;            /* Text auf Hell, 18:1 */
  --color-ink-muted: #3f453d;      /* Fließtext auf Hell, ca. 9:1 */
  --color-ink-subtle: #565d53;     /* Hinweise auf Hell, ca. 6:1 */
  --color-green-ink: #3d7a2a;      /* Grün als Text auf Hell, 5,2:1 */
  --color-focus-ink: #2f6b1f;      /* Fokusrahmen auf Hell */
  --color-error-ink: #b3261e;      /* Fehler auf Hell, 6,5:1 */

  /* Abschnitts-Variablen (werden von .theme-light / .theme-white / .theme-dark gesetzt) */
  --fg: var(--color-white);
  --fg-muted: var(--color-text-muted);
  --fg-subtle: var(--color-text-subtle);
  --surface: var(--color-anthracite-light);
  --surface-line: var(--color-line);
  --accent-text: var(--color-green-light);
  --focus: var(--color-focus);
  --error: var(--color-error);
  --field-bg: var(--color-anthracite-light);
  --field-line: var(--color-line);

  /* Kopfzeile über dem Bild */
  --header-overlay: linear-gradient(180deg, rgba(18, 18, 18, 0.7) 0%, rgba(18, 18, 18, 0) 100%);

  /* Schriften – Archivo/Inter werden selbst gehostet (siehe fonts.css), sonst Ersatzschrift */
  --font-heading: "Archivo", "Arial", "Helvetica", sans-serif;
  --font-body: "Inter", "Arial", "Helvetica", sans-serif;

  /* Schriftgrößen (fließend mobil → Desktop) */
  --fs-h1: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);      /* 36 → 60 px */
  --fs-h2: clamp(1.75rem, 1.45rem + 1.3vw, 2.5rem);      /* 28 → 40 px */
  --fs-h3: clamp(1.375rem, 1.3rem + 0.35vw, 1.625rem);   /* 22 → 26 px */
  --fs-lead: clamp(1.25rem, 1.2rem + 0.25vw, 1.375rem);  /* 20 → 22 px */
  --fs-body: 1.125rem;                                   /* 18 px */
  --fs-small: 1rem;                                      /* 16 px */

  --lh-h1: 1.1;
  --lh-h2: 1.2;
  --lh-h3: 1.3;
  --lh-lead: 1.55;
  --lh-body: 1.65;
  --lh-small: 1.5;

  /* Abstände (8er-Skala) */
  --space-1: 0.5rem;   /* 8 */
  --space-2: 1rem;     /* 16 */
  --space-3: 1.5rem;   /* 24 */
  --space-4: 2rem;     /* 32 */
  --space-5: 3rem;     /* 48 */
  --space-6: 4rem;     /* 64 */
  --space-7: 6rem;     /* 96 */
  --space-8: 8rem;     /* 128 */
  --section-space: var(--space-6);

  /* Layout */
  --container: 75rem;      /* 1200 px */
  --measure: 68ch;         /* max. Zeilenlänge Fließtext */
  --gutter: 1.25rem;       /* 20 px Seitenrand mobil */
  --header-h: 4.5rem;      /* 72 px */
  --header-h-compact: 4rem;
  --actionbar-h: 4.5rem;

  /* Form */
  --radius: 8px;
  --stripe: 8px;           /* grüner Seitenstreifen */
  --focus-ring: 3px solid var(--focus);
  --focus-offset: 3px;
  --tap: 48px;             /* Mindestgröße Klickflächen */
  --field-h: 3.25rem;      /* 52 px */

  /* Bewegung */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 400ms;
  --dur-fast: 180ms;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Abschnitts-Themen: Farben je Hintergrund (alle Text-Kombinationen WCAG AA) */
.theme-dark,
.site-header,
.site-footer,
.action-bar {
  --fg: var(--color-white);
  --fg-muted: var(--color-text-muted);
  --fg-subtle: var(--color-text-subtle);
  --surface: var(--color-anthracite-light);
  --surface-line: var(--color-line);
  --accent-text: var(--color-green-light);
  --focus: var(--color-focus);
  --error: var(--color-error);
  --field-bg: var(--color-anthracite-light);
  --field-line: var(--color-line);
}

.theme-light,
.theme-white {
  --fg: var(--color-ink);
  --fg-muted: var(--color-ink-muted);
  --fg-subtle: var(--color-ink-subtle);
  --surface: var(--color-paper);
  --surface-line: var(--color-mist-line);
  --accent-text: var(--color-green-ink);
  --focus: var(--color-focus-ink);
  --error: var(--color-error-ink);
  --field-bg: var(--color-paper);
  --field-line: var(--color-field-line);
  color: var(--fg);
}

.theme-light { background: var(--color-mist); }
.theme-white { background: var(--color-paper); --surface: var(--color-mist); }
.theme-dark { background: var(--color-anthracite); color: var(--fg); }

@media (min-width: 1024px) {
  :root {
    --section-space: var(--space-7);
    --gutter: 2rem;
    --header-h: 5.5rem;
  }
}
