/* Design-Tokens: Editorial-Look mit Azulejo-Palette.
   Warmes Papier, Kobaltblau (Azulejo), Terrakotta-Akzent.
   Dark-Mode über prefers-color-scheme. */

:root {
  --paper: #f6f1e7;
  --paper-2: #ede5d4;
  --card: #fffdf8;
  --ink: #1c2b36;
  --ink-soft: #53616c;
  --line: #ddd3c0;
  /* Rahmen von BEDIENELEMENTEN – getrennt von --line, weil SC 1.4.11 nur für sie
     3:1 verlangt. Dekorative Trennlinien bleiben hell und tragen den Look. */
  --control-line: #95876d;

  --azul: #1d5c99;
  --azul-deep: #123f6d;
  --azul-tint: #e2ecf6;
  --on-azul: #ffffff;

  /* Terrakotta in drei Rollen: Fläche (--terra), Schrift auf hellem Grund
     (--terra-ink, ab 4,5:1) und Fläche unter weißer Schrift (--terra-strong).
     Ein Wert konnte alle drei nicht erfüllen. */
  --terra: #c25b33;
  --terra-ink: #8f3f1e;
  --terra-strong: #a8451f;
  --terra-tint: #f7e4da;
  --on-terra: #ffffff;

  /* Tram-Gelb – nur für den primären CTA (Hybrid-Design, Text immer Navy).
     Identisch in Light/Dark für Marken-Wiedererkennung, daher kein Dark-Override. */
  --gold: #f6b93b;
  --gold-deep: #e0a52e;
  --on-gold: #123f6d;

  --ok: #25654b;
  --ok-tint: #dff0e7;
  --err: #b23b32;
  --err-tint: #f6e2df;
  --on-err: #ffffff;
  --warn: #7d570d;
  --warn-tint: #f6ecd2;

  /* Farbe für reduzierte („verschluckte“) Vokale. Bewusst der hellste Wert, der
     4,5:1 noch hält (SC 1.4.3): Der Vokal soll blass wirken, nicht unlesbar sein.
     Deutlich blasser als --ink bleibt er damit immer noch. */
  --vr: #646e79;

  --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-ui: 'Avenir Next', Avenir, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 43, 54, 0.06), 0 10px 28px rgba(28, 43, 54, 0.07);
  --nav-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1922;
    --paper-2: #0b131a;
    --card: #17252f;
    --ink: #e9e4d8;
    --ink-soft: #9dadb9;
    --line: #2a3b48;
    --control-line: #5a7686;

    --azul: #5f97d0;
    --azul-deep: #8db8e2;
    --azul-tint: #1a3247;
    --on-azul: #0b131a;

    --terra: #dd7a51;
    --terra-ink: #e79068;
    --terra-strong: #dd7a51;
    --terra-tint: #3a2418;
    --on-terra: #0b131a;

    --ok: #5cad8b;
    --ok-tint: #16342a;
    --err: #e08076;
    --err-tint: #3b1f1c;
    /* Weiß auf dem hellen Dark-Rot ergäbe 2,79:1 – hier muss die Schrift dunkel sein. */
    --on-err: #0b131a;
    --warn: #d8a94e;
    --warn-tint: #33290f;

    --vr: #93a3b0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--azul);
}

button {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
