/* =====================================================================
   FSF Core – Design Tokens (gemeinsam für Frontend und Backend)
   Quelle: www.fahrschule-fuhlsbuettel.de (Flatsome 3.20.4, custom-css),
   ausgelesen am 2026-11-05. Kontraste geprüft nach WCAG 2.2 AA
   (nachrechnen: python tools/contrast_check.py).
   ===================================================================== */

/* ---------- Schrift: Lato, lokal gehostet (SIL OFL 1.1, siehe fonts/OFL.txt) ---------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lato-400-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: "Lato"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lato-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/lato-700-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: "Lato"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/lato-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ---------- Markenfarben (Website) ---------- */
  --c-primary: #0e4067;          /* Hauptfarbe, Top-Bar, Buttons  (10,8:1 auf Weiß) */
  --c-primary-dark: #0a2f4c;     /* Hover/aktiv */
  --c-primary-tint: #e7eef4;     /* helle Fläche aus Primary */
  --c-secondary: #73caeb;        /* Akzent – nur als Fläche/Linie, NICHT als Textfarbe auf Weiß */
  --c-footer: #0f4067;           /* Fußzeile */
  --c-success: #627d47;          /* Website-Erfolgsfarbe (4,6:1 auf Weiß) */
  --c-alert: #e83368;            /* Website-Warnfarbe – nur Fläche/Linie */
  --c-alert-text: #b8174a;       /* Warn-Text, AA-tauglich (6,4:1 auf Weiß) */

  /* ---------- Text und Flächen ---------- */
  --c-text: #333333;             /* Fließtext + Überschriften (12,6:1) */
  --c-text-muted: #5f6368;       /* Nebentext (6,0:1) */
  --c-text-invert: #ffffff;
  --c-bg: #ffffff;
  --c-bg-alt: #f1f1f1;           /* untere Kopfleiste der Website */
  --c-border: #d4d7db;
  --c-border-strong: #8a9097;    /* Formularränder (3,2:1 – AA für UI-Elemente) */
  --c-focus: #0e4067;
  --c-focus-ring: #73caeb;
  --c-whatsapp: #1d7d4a;         /* dunkles Grün, weißes Symbol 5,1:1 */

  /* ---------- Statusfarben (Anfragen) – immer mit Text verwenden ---------- */
  --status-neu-bg: transparent;          --status-neu-fg: #333333;   --status-neu-border: #8a9097;
  --status-gelesen-bg: #e4e6e9;          --status-gelesen-fg: #333333;
  --status-kontakt-bg: #7b1fa2;          --status-kontakt-fg: #ffffff;   /* kräftiges Purpur, 8,2:1 */
  --status-angebot-bg: #c8ecc4;          --status-angebot-fg: #1f3d1c;   /* hellgrün */
  --status-irrelevant-bg: #62676d;       --status-irrelevant-fg: #ffffff; /* dunkleres Grau, 5,7:1 */
  --status-gewonnen-bg: #1e6b34;         --status-gewonnen-fg: #ffffff;   /* vorbereitet, 6,6:1 (gerechnet 6,55) */
  /* Kursplätze */
  --status-frei-bg: #c8ecc4;             --status-frei-fg: #1f3d1c;
  --status-knapp-bg: #fff1c2;            --status-knapp-fg: #5c4400;
  --status-voll-bg: #f6d3dc;             --status-voll-fg: #7a0f30;

  /* ---------- Schrift ---------- */
  --font-sans: "Lato", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --fw-regular: 400;
  --fw-bold: 700;
  --fs-base: 1rem;               /* 16 px wie Website */
  --lh-base: 1.6;
  --lh-tight: 1.3;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-nav: 0.8rem;              /* Menü: .nav > li > a {font-size:.8em} */
  --fs-btn: 0.97rem;             /* Button */
  --fs-h1: clamp(1.7rem, 1.2rem + 2.2vw, 2.6rem);
  --fs-h2: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  --fs-h3: 1.1rem;
  --ls-upper: 0.05em;            /* .uppercase */
  --ls-nav: 0.02em;              /* .nav-uppercase */
  --ls-btn: 0.03em;              /* .button */

  /* ---------- Abstände ---------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;      /* ≈ 30 px Sektion/Spalte */
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --container: 1170px;
  --gutter: 15px;

  /* ---------- Form ---------- */
  --radius: 0;                   /* eckig wie die Website */
  --radius-pill: 0;
  --border-w: 1px;
  --shadow-1: 0 1px 3px -2px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.24);   /* .box-shadow-1 */
  --shadow-2: 0 3px 6px -4px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.23);
  --btn-height: 2.5em;
  --btn-pad-x: 1.2em;

  /* ---------- Kopf ---------- */
  --topbar-h: 30px;
  --header-h: 70px;              /* mobil; Desktop 110px */
  --header-h-desktop: 110px;

  /* ---------- Atlas (Backend) – Optik 2 (F, 07.11.2026): hell und ruhig, Enzianblau als Akzent,
     runde Ecken, weiche Schatten. Bedienprinzip wie gewohnt (Kopfleiste, linke Leiste, Kacheln,
     Listen-Detail). Dunkelmodus siehe unten. Kontraste: tools/contrast_check.py ---------- */
  --a-font: var(--font-sans);
  --a-fs: 0.875rem;                   /* 14 px – Tabellen bleiben dicht */
  --a-fs-sm: 0.8125rem;               /* 13 px */
  --a-fs-xs: 0.75rem;                 /* 12 px */
  --a-fs-title: 1.125rem;             /* Seitentitel */
  --a-row-h: 28px;
  --a-top-h: 56px;
  --a-rail-w: 64px;                   /* eingeklappt: nur Symbole */
  --a-rail-w-open: 232px;             /* ausgeklappt: Symbole + Beschriftung */
  --a-quick-w: 52px;
  --a-gap: 16px;
  --a-pad: 24px;
  --a-radius: 8px;
  --a-radius-sm: 6px;
  --a-radius-pill: 999px;
  --a-tile: 136px;

  /* Farbwelt nach Brandbook (16.11.2026): Navy als Rahmen, Orange/Rot als Akzent, mehr Kontrast */
  --b-navy: #0f1b2d;                  /* Kopfleiste, linke Leiste, Hauptakzent */
  --b-navy-2: #1b2d48;                /* Hover auf Navy */
  --b-navy-line: #2a3f60;             /* Linien auf Navy */
  --b-on-navy: #ffffff;
  --b-on-navy-muted: #c3cddb;         /* Nebentext auf Navy (10:1) */
  --b-orange: #f5821f;                /* Bewegung – Hauptknöpfe (Schrift Navy), aktive Markierung */
  --b-orange-hover: #ff9a40;
  --b-red: #e3263b;                   /* Energie – Verlaufsakzent */
  --b-orange-ink: #b34700;            /* Orange als Schrift/Symbol auf Weiß (4.9:1) */
  --a-bg: #eceff4;                    /* Seitenfläche */
  --a-surface: #ffffff;               /* Karten, Leisten */
  --a-surface-2: #f8fafc;             /* Kartenkopf, Tabellenkopf */
  --a-border: #d3dae4;
  --a-border-strong: #7d899a;         /* Eingabefelder (UI-Kontrast >= 3:1) */
  --a-text: #111827;
  --a-muted: #4a5568;
  --a-accent: #0f1b2d;                /* Navy (Brandbook) */
  --a-accent-hover: #1b2d48;
  --a-on-accent: #ffffff;
  --a-accent-soft: #fdebdc;           /* aktive Auswahl im Inhalt: Orange hell */
  --a-on-accent-soft: #8a3600;
  --a-row-alt: #f8f9fb;
  --a-row-hover: #eef2f7;
  --a-row-sel: #fde3cc;
  --a-focus: #0f1b2d;
  --a-focus-ring: #f5821f;
  --a-tooltip-bg: #1f2a37;
  --a-tooltip-fg: #ffffff;
  --a-shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
  --a-shadow-2: 0 6px 16px rgba(16, 24, 40, .10);
  --a-badge: #b8174a;
  --a-on-badge: #ffffff;

  /* ---------- Bewegung ---------- */
  --t-fast: 150ms ease;
}

@media (min-width: 850px) {
  :root { --header-h: var(--header-h-desktop); }
}

/* ---------- Atlas Dunkelmodus: per Systemeinstellung oder Umschalter (html[data-theme]) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .atlas { color-scheme: dark;
    --a-bg: #0f1720; --a-surface: #17212c; --a-surface-2: #1c2834; --a-border: #2b3947; --a-border-strong: #7a8899;
    --a-text: #eef2f7; --a-muted: #b3bfcd; --a-accent: #ff9a40; --a-accent-hover: #ffb06a; --a-on-accent: #0f1b2d;
    --a-accent-soft: #3a2615; --a-on-accent-soft: #ffd3ad; --a-row-alt: #19232e; --a-row-hover: #22303f; --a-row-sel: #4a2e17;
    --a-focus: #ffd3ad; --a-focus-ring: #f5821f; --b-navy: #0a1220; --b-navy-2: #16243a; --b-navy-line: #22354f; --b-orange-ink: #ff9a40; --a-tooltip-bg: #e6edf3; --a-tooltip-fg: #0f1720;
    --a-shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --a-shadow-2: 0 6px 16px rgba(0, 0, 0, .5); --a-badge: #f07aa0; --a-on-badge: #0f1720; }
}
:root[data-theme="dark"] .atlas { color-scheme: dark;
  --a-bg: #0f1720; --a-surface: #17212c; --a-surface-2: #1c2834; --a-border: #2b3947; --a-border-strong: #7a8899;
  --a-text: #eef2f7; --a-muted: #b3bfcd; --a-accent: #ff9a40; --a-accent-hover: #ffb06a; --a-on-accent: #0f1b2d;
  --a-accent-soft: #3a2615; --a-on-accent-soft: #ffd3ad; --a-row-alt: #19232e; --a-row-hover: #22303f; --a-row-sel: #4a2e17;
  --a-focus: #ffd3ad; --a-focus-ring: #f5821f; --b-navy: #0a1220; --b-navy-2: #16243a; --b-navy-line: #22354f; --b-orange-ink: #ff9a40; --a-tooltip-bg: #e6edf3; --a-tooltip-fg: #0f1720;
  --a-shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --a-shadow-2: 0 6px 16px rgba(0, 0, 0, .5); --a-badge: #f07aa0; --a-on-badge: #0f1720; }

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms linear; }
}

/* ---------- Gemeinsame Basis-Bausteine ---------- */
.status {
  display: inline-block;
  padding: 0.1em 0.6em;
  border: var(--border-w) solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-upper);
  text-transform: uppercase;
  line-height: 1.6;
  white-space: nowrap;
}
.status--neu        { background: var(--status-neu-bg); color: var(--status-neu-fg); border-color: var(--status-neu-border); }
.status--gelesen    { background: var(--status-gelesen-bg); color: var(--status-gelesen-fg); }
.status--kontakt    { background: var(--status-kontakt-bg); color: var(--status-kontakt-fg); }
.status--angebot    { background: var(--status-angebot-bg); color: var(--status-angebot-fg); }
.status--irrelevant { background: var(--status-irrelevant-bg); color: var(--status-irrelevant-fg); }
.status--gewonnen   { background: var(--status-gewonnen-bg); color: var(--status-gewonnen-fg); }
.status--frei       { background: var(--status-frei-bg); color: var(--status-frei-fg); }
.status--knapp      { background: var(--status-knapp-bg); color: var(--status-knapp-fg); }
.status--voll       { background: var(--status-voll-bg); color: var(--status-voll-fg); }

.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(--sp-2); top: -100px; z-index: 1000;
  background: var(--c-primary); color: var(--c-text-invert);
  padding: var(--sp-2) var(--sp-4); font-weight: var(--fw-bold); text-decoration: none;
}
.skip-link:focus { top: var(--sp-2); }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--c-focus-ring);
}
