/* =================================================================
   STRUKTURLABS — Design Tokens
   Übernommen aus dem Strukturlabs Design System (Palette „Clay“).
   Alle Schriften liegen lokal unter /assets/fonts — es werden keine
   Google Fonts oder anderen Drittanbieter-Server angefragt (DSGVO).
   ================================================================= */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* Farbe — Primitive */
  --paper: #f4eee3;
  --surface: #fbf7f0;
  --raise: #ffffff;
  --ink-bg: #211c15;
  --ink-bg-soft: #2e2820;
  --ink: #23201a;
  --fg-2: #5c554a;
  --fg-3: #8c8273;
  --fg-on-ink: #f0e9dc;
  --line: #e0d7c6;
  --line-strong: #cbbea8;
  --line-on-ink: #43392c;
  --clay: #b85230;
  --clay-deep: #8e3c1f;
  --clay-bright: #cc6038;
  --clay-tint: #ebd9c9;
  --clay-tint-2: #f3e7da;
  --ochre: #d2913b;
  --ochre-deep: #a66e22;
  --ochre-tint: #f1e2c4;
  --umber: #6e4a30;
  --success: #5e7a48;
  --success-tint: #e2e5ce;
  --warning: #c98a2e;
  --warning-tint: #f3e4c2;
  --danger: #ae3a2b;
  --danger-tint: #f0d7cf;
  --info: #3d6660;
  --info-tint: #d6e2de;

  /* Farbe — semantische Rollen */
  --bg-page: var(--paper);
  --bg-card: var(--surface);
  --text-1: var(--ink);
  --text-2: var(--fg-2);
  --text-3: var(--fg-3);
  --border: var(--line);
  --accent: var(--clay);
  --accent-hover: var(--clay-bright);
  --accent-press: var(--clay-deep);
  --focus-ring: #b8523073;

  /* Schatten (warm getönt) */
  --shadow-xs: 0 1px 2px rgba(53, 38, 22, 0.06);
  --shadow-sm: 0 1px 3px rgba(53, 38, 22, 0.08), 0 1px 2px rgba(53, 38, 22, 0.05);
  --shadow-md: 0 4px 16px rgba(53, 38, 22, 0.09), 0 1px 3px rgba(53, 38, 22, 0.06);
  --shadow-lg: 0 12px 40px rgba(53, 38, 22, 0.12), 0 2px 8px rgba(53, 38, 22, 0.07);

  /* Abstände — 4px-Raster */
  --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;
  --space-11: 192px;

  /* Radien */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* Bewegung */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-slow: 420ms;

  /* Typografie */
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 18px;
  --text-lg: 21px;
  --text-xl: 26px;
  --text-2xl: 33px;
  --text-3xl: 42px;
  --text-4xl: 54px;
  --text-5xl: 68px;
  --text-6xl: 88px;
  --leading-tight: 1.04;
  --leading-snug: 1.18;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --tracking-tight: -0.02em;
  --tracking-normal: 0em;
  --tracking-wide: 0.04em;
  --tracking-label: 0.14em;
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* =================================================================
   DUNKLES FARBSCHEMA
   Abgeleitet aus den Inverse-Farben des Design Systems (ink-bg,
   fg-on-ink, clay-bright, dunkle Strata-Marke). Überschreibt nur
   Primitive — alle Komponenten ziehen automatisch mit.
   Greift per Systemeinstellung oder über den Schalter im Header
   (data-theme auf <html>).
   ================================================================= */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #1b1712;
    --surface: #231e18;
    --raise: #2b251e;
    --ink-bg: #120f0b;
    --ink-bg-soft: #1b1712;
    --ink: #f0e9dc;
    --fg-2: #bfb5a5;
    --fg-3: #8a8072;
    --line: #342d24;
    --line-strong: #4d4436;
    --line-on-ink: #2b251e;
    --clay-tint: #3b271d;
    --clay-tint-2: #2a1f18;
    --ochre-tint: #3a2c16;
    --umber: #8a6244;
    --success: #9db883;
    --success-tint: #2a3020;
    --warning-tint: #3a2e17;
    --danger: #e0806f;
    --danger-tint: #3b201b;
    --info: #7fa8a1;
    --info-tint: #1f2b29;
    --focus-ring: #cc603899;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b1712;
  --surface: #231e18;
  --raise: #2b251e;
  --ink-bg: #120f0b;
  --ink-bg-soft: #1b1712;
  --ink: #f0e9dc;
  --fg-2: #bfb5a5;
  --fg-3: #8a8072;
  --line: #342d24;
  --line-strong: #4d4436;
  --line-on-ink: #2b251e;
  --clay-tint: #3b271d;
  --clay-tint-2: #2a1f18;
  --ochre-tint: #3a2c16;
  --umber: #8a6244;
  --success: #9db883;
  --success-tint: #2a3020;
  --warning-tint: #3a2e17;
  --danger: #e0806f;
  --danger-tint: #3b201b;
  --info: #7fa8a1;
  --info-tint: #1f2b29;
  --focus-ring: #cc603899;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}
