/* ============================================================
   FONTS — selbst gehostet, keine externen CDNs. SIL OFL 1.1
   (siehe assets/fonts/*/LICENSE.txt).
   ============================================================ */
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans/ibm-plex-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Fraunces — bewusst nur der Italic-Schnitt (variabel, opsz+wght-Achse),
   ausschließlich für den einen Pull-Quote-Akzent. Kein Normalschnitt
   vendort, um kein ungenutztes Gewicht auszuliefern. */
@font-face {
  font-family: "Fraunces Variable";
  src: url("../fonts/fraunces/fraunces-variable-italic.woff2") format("woff2-variations");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}

/* ============================================================
   TOKENS — exakte Markenfarben. Light-Blue (--c-lightblue) NIE
   als Fließtextfarbe, nur Akzent/Großformat/Hintergrundfläche.
   ============================================================ */
:root {
  --c-blue: #3f63af;
  --c-violet: #791075;
  --c-lightblue: #90b7fc;
  --c-ink: #111827;
  --c-muted: #5b6475;
  --c-paper: #ffffff;
  --c-paper-soft: #f7f9ff;

  /* Text auf dunklem Grund — vom Marken-"Muted" abgeleitet und
     aufgehellt für AA/AAA-Kontrast auf --c-ink (reines #5b6475
     auf #111827 läge bei ~3:1, zu wenig für Fließtext). Geprüft:
     #b5b9c1 auf #111827 = 9.02:1 (AAA). */
  --text-secondary: #b5b9c1;
  --text-secondary: color-mix(in srgb, var(--c-muted) 45%, white 55%);
  --text-primary: var(--c-paper-soft);

  --bg-0: var(--c-ink);
  --bg-1: #0b0f1a;
  --bg-1: color-mix(in srgb, var(--c-ink) 82%, black 18%);
  --bg-glow-a: rgba(63, 99, 175, 0.28);
  --bg-glow-b: rgba(121, 16, 117, 0.2);

  --line-faint: rgba(144, 183, 252, 0.1);
  --line-soft: rgba(144, 183, 252, 0.18);
  --panel-bg: rgba(144, 183, 252, 0.045);
  --panel-border: rgba(144, 183, 252, 0.16);

  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-quote: "Fraunces Variable", ui-serif, Georgia, serif;

  --container: 1240px;
  --pad-inline: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;

  --ease-precise: cubic-bezier(0.16, 0.84, 0.24, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }

html, body {
  background: var(--bg-0);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   A11Y HELPERS
   ============================================================ */
::selection { background: var(--c-blue); color: #fff; }

a:focus-visible,
button:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--c-lightblue);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--c-lightblue);
  color: var(--c-ink);
  padding: 0.75rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: top 0.25s var(--ease-precise);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* ============================================================
   REVEAL-ON-SCROLL — nur aktiv, wenn JS lief (html.js gesetzt).
   Ohne JS bleibt .reveal reguläres, sofort sichtbares Markup.
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-precise), transform 0.7s var(--ease-precise);
}
html.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
html.js .reveal-stagger.is-visible { transition-delay: var(--stagger, 0ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal {
    transform: none;
    transition: opacity 0.4s ease;
  }
}
