/* KRS-Design-Tokens (Karl-Rehbein-Schule), übernommen aus
   docs/design/KRS Design System/tokens/: colors, typography, spacing,
   surfaces, motion. Werte unverändert, mit drei Abweichungen (siehe
   docs/entscheidungen.md, Etappe 12):
   - Schrift lokal statt Google Fonts (fonts.css entfällt), nur Libre Franklin
     400–700 als variable Datei.
   - Newsreader entfällt: --font-editorial zeigt auf die Grundschrift,
     --text-lead und --text-quote nutzen 400 statt 300.
   - Ergänzt: Hintergründe der Hinweise (aus Notice.jsx) und Phasenfarben. */

@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/LibreFranklin-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* --- colors --- */
:root{
  /* ---- Ground: white first, warm paper second ---- */
  --krs-white:#FFFFFF;
  --krs-paper:#F2EFE8;        /* warm off-white from the slide template */
  --krs-paper-2:#F2F1EB;      /* panel gap / gutter tone */
  --krs-mortar:#E6E3DA;       /* hairline between panels */

  /* ---- Greens: the facade's dominant family ---- */
  --krs-green-900:#12331F;
  --krs-green-800:#1B4528;
  --krs-green-700:#225A35;    /* BRAND GREEN - template subtitle colour */
  --krs-green-600:#2F653A;
  --krs-green-500:#5C9238;
  --krs-lime-600:#7FA51E;
  --krs-lime-500:#9DC423;     /* bright facade panel */
  --krs-lime-300:#C6DF7A;
  --krs-lime-100:#EAF2D6;

  /* ---- Warms: the minority accents in the glass ---- */
  --krs-yellow-500:#FDB815;
  --krs-yellow-600:#F6BA09;
  --krs-orange-500:#EE7F1E;   /* BRAND ORANGE - template title colour */
  --krs-orange-600:#DA6A11;
  --krs-red-500:#E4572E;      /* rarest panel colour: use sparingly */

  /* ---- Neutrals: aluminium mullions ---- */
  --krs-graphite-900:#1E211F;
  --krs-graphite-700:#3A3F3C;
  --krs-graphite-500:#6E7571;
  --krs-graphite-300:#A9AEAA;
  --krs-graphite-200:#CDD1CD;
  --krs-graphite-100:#E8EAE7;

  /* ---- Semantic aliases ---- */
  --surface-page:var(--krs-white);
  --surface-paper:var(--krs-paper);
  --surface-card:var(--krs-white);
  --surface-sunken:var(--krs-paper);
  --surface-inverse:var(--krs-green-700);
  --surface-accent:var(--krs-lime-100);

  --text-heading:var(--krs-green-700);
  --text-body:var(--krs-graphite-900);
  --text-muted:var(--krs-graphite-500);
  --text-on-dark:var(--krs-white);
  --text-accent:var(--krs-orange-500);
  --text-link:var(--krs-green-700);
  --text-link-hover:var(--krs-orange-500);

  --border-hairline:var(--krs-graphite-200);
  --border-strong:var(--krs-graphite-700);
  --border-mullion:var(--krs-graphite-500);

  --action-primary:var(--krs-green-700);
  --action-primary-hover:var(--krs-green-800);
  --action-primary-press:var(--krs-green-900);
  --action-accent:var(--krs-orange-500);
  --action-accent-hover:var(--krs-orange-600);
  --focus-ring:var(--krs-lime-600);

  --state-success:var(--krs-green-500);
  --state-info:var(--krs-green-700);
  --state-warning:var(--krs-yellow-500);
  --state-danger:var(--krs-red-500);

  /* ---- Facade panel sequence: the canonical accent rotation ---- */
  --panel-1:var(--krs-green-700);
  --panel-2:var(--krs-lime-500);
  --panel-3:var(--krs-yellow-500);
  --panel-4:var(--krs-green-500);
  --panel-5:var(--krs-orange-500);
  --panel-6:var(--krs-green-800);
}

/* --- typography --- */
:root{
  --font-core:"Libre Franklin","Helvetica Neue",Arial,sans-serif;
  --font-editorial:var(--font-core); /* Newsreader entfällt */
  --font-mono:ui-monospace,"SFMono-Regular",Menlo,monospace;

  --weight-light:300;
  --weight-regular:400;
  --weight-medium:500;
  --weight-semibold:600;
  --weight-bold:700;

  /* Type scale - 1.25 major third, 16px base */
  --size-3xs:11px;
  --size-2xs:12px;
  --size-xs:13px;
  --size-sm:15px;
  --size-base:17px;
  --size-md:19px;
  --size-lg:23px;
  --size-xl:29px;
  --size-2xl:36px;
  --size-3xl:46px;
  --size-4xl:58px;
  --size-5xl:76px;

  --leading-tight:1.06;
  --leading-snug:1.22;
  --leading-normal:1.55;
  --leading-loose:1.7;

  --tracking-display:-0.022em;
  --tracking-heading:-0.012em;
  --tracking-normal:0em;
  --tracking-label:0.08em;
  --tracking-eyebrow:0.16em;

  /* Semantic roles */
  --text-display:var(--weight-semibold) var(--size-4xl)/var(--leading-tight) var(--font-core);
  --text-h1:var(--weight-semibold) var(--size-3xl)/var(--leading-tight) var(--font-core);
  --text-h2:var(--weight-semibold) var(--size-2xl)/var(--leading-snug) var(--font-core);
  --text-h3:var(--weight-medium) var(--size-xl)/var(--leading-snug) var(--font-core);
  --text-h4:var(--weight-medium) var(--size-lg)/var(--leading-snug) var(--font-core);
  --text-lead:var(--weight-regular) var(--size-md)/var(--leading-normal) var(--font-editorial);
  --text-copy:var(--weight-regular) var(--size-base)/var(--leading-normal) var(--font-core);
  --text-small:var(--weight-regular) var(--size-sm)/var(--leading-normal) var(--font-core);
  --text-meta:var(--weight-medium) var(--size-2xs)/var(--leading-normal) var(--font-core);
  --text-quote:var(--weight-regular) var(--size-xl)/1.35 var(--font-editorial);
}

/* --- spacing --- */
:root{
  /* 4px base, facade-grid friendly */
  --space-0:0;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:24px;
  --space-6:32px;
  --space-7:48px;
  --space-8:64px;
  --space-9:96px;
  --space-10:128px;

  /* The facade gap: the thin paper line between glass panels */
  --panel-gap:3px;
  --panel-gap-lg:6px;

  --gutter-page:var(--space-6);
  --gutter-page-lg:var(--space-8);
  --measure-prose:66ch;
  --measure-narrow:48ch;
  --container-max:1200px;
  --container-wide:1440px;

  --control-h-sm:32px;
  --control-h-md:44px;
  --control-h-lg:52px;
}

/* --- surfaces --- */
:root{
  /* Corners are square. The facade has no radii; only controls get a hairline
     softening so they read as interactive, never as pills. */
  --radius-none:0px;
  --radius-xs:2px;
  --radius-sm:3px;
  --radius-md:0px;
  --radius-full:999px; /* status dots only, never buttons */

  --border-width-hair:1px;
  --border-width-mullion:2px;
  --border-width-marker:6px;

  /* Light, low, cool shadows - glass sits flush, it does not float */
  --shadow-none:none;
  --shadow-sm:0 1px 2px rgba(30,33,31,.06);
  --shadow-md:0 2px 10px rgba(30,33,31,.08);
  --shadow-lift:0 6px 24px rgba(30,33,31,.10);
  --shadow-inset-hair:inset 0 0 0 1px var(--border-hairline);

  --glass-tint:rgba(34,90,53,.08);
  --glass-blur:blur(10px);
  --scrim-photo:linear-gradient(to top,rgba(18,51,31,.82) 0%,rgba(18,51,31,.35) 45%,rgba(18,51,31,0) 100%);

  --skew-panel:-1.4deg; /* the facade's mullions lean; use at most once per view */
}

/* --- motion --- */
:root{
  --ease-standard:cubic-bezier(.2,0,.2,1);
  --ease-out:cubic-bezier(0,0,.2,1);
  --duration-fast:120ms;
  --duration-base:180ms;
  --duration-slow:320ms;
  --transition-control:background-color var(--duration-fast) var(--ease-standard),color var(--duration-fast) var(--ease-standard),border-color var(--duration-fast) var(--ease-standard);
}
@media (prefers-reduced-motion:reduce){:root{--duration-fast:0ms; --duration-base:0ms; --duration-slow:0ms}}


/* --- Ergänzungen für den Vokabeltrainer --- */
:root{
  /* Flächen der Hinweise, Werte aus components/feedback/Notice.jsx */
  --notice-info-bg:var(--krs-lime-100);
  --notice-success-bg:var(--krs-lime-100);
  --notice-warning-bg:#FEF6E0;
  --notice-danger-bg:#FCEDE8;

  /* Fortschritt nach Phasen: Graphit = noch nicht begonnen, dann Grüntöne
     von hell (Phase 1) nach dunkel (Phase 6). Zwischen den Segmenten
     weiße Fugen von --panel-gap. */
  --phase-0:var(--krs-graphite-200);
  --phase-1:var(--krs-lime-100);
  --phase-2:var(--krs-lime-300);
  --phase-3:var(--krs-lime-500);
  --phase-4:var(--krs-green-500);
  --phase-5:var(--krs-green-700);
  --phase-6:var(--krs-green-900);

  /* Kopfzeile: auf dem Handy niedriger als die 88 px der Website */
  --header-h:56px;
  --header-h-lg:72px;
}
