/* Geteiltes Stylesheet für die statische Fläche (Platzhalterseite,
   Rechtstexte) unter www.<domain> und der Wurzel — Feature 021.
   Werte 1:1 aus dem TEM Design System (designitems/TEM Design System/
   tokens/) übernommen, damit diese Fläche und die Konsole (tem-web) dieselbe
   Sprache sprechen, ohne dass diese Fläche die Konsole lädt (FR-013, FR-007
   — sie muss ohne den Anwendungsprozess ausgeliefert werden).

   Schrift selbstgehostet aus tem-web/node_modules/@fontsource-variable/inter
   (Latin + Latin Extended reichen — alle Texte hier sind deutschsprachig)
   statt aus einem Font-CDN: dieselbe Quelldatei, die die Konsole ausliefert,
   ohne einen dritten Laufzeit-Ursprung für die einzige öffentlich freie
   Fläche des Dienstes hinzuzufügen. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  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: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-surface: #ffffff;
  --color-on-surface: #1a1a1a;
  --color-panel: #f4f4f5;
  --color-on-panel: #1a1a1a;
  --color-muted: #52525b;
  --color-border: #71717a;
  --color-accent: #1d4ed8;
  --color-on-accent: #ffffff;
  --color-warning: #92400e;
  --color-warning-bg: #fff3cd;
  --color-warning-border: #ffe69c;
  --color-danger: #b91c1c;
  --color-danger-bg: #f8d7da;
  --color-danger-border: #f5c2c7;

  --font-sans: "Inter Variable", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;

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

  --leading-tight: 1.25;
  --leading-normal: 1.5;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-10: 2.5rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;

  --control-height: 2.75rem;
  --content-max-width: 34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-surface: #18181b;
    --color-on-surface: #f4f4f5;
    --color-panel: #27272a;
    --color-on-panel: #f4f4f5;
    --color-muted: #a1a1aa;
    --color-border: #71717a;
    --color-accent: #60a5fa;
    --color-on-accent: #0b1220;
    --color-warning: #fbbf24;
    --color-warning-bg: #3a2e05;
    --color-warning-border: #7c5e10;
    --color-danger: #f87171;
    --color-danger-bg: #3a0d0d;
    --color-danger-border: #7c2020;
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-on-surface);
  background: var(--color-surface);
  text-wrap: pretty;
}

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

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}

/* — Layout: eine einzige, schmale Spalte. Diese Fläche ist eine Auskunftsseite,
   keine dichte Konsole — daher schmaler als --page-max-width (64rem) im
   Design-System. */

.page {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-10) var(--space-6);
}

.legal-page {
  max-width: 42rem;
}

/* — Markenzeile: das Signet, ausschließlich hier und in den Rechtstexten
   verwendet — nie in der Konsole (siehe designitems/.../readme.md
   "Visual foundations"). Zwei Fassungen, je Farbschema eine sichtbar. */

.brand {
  display: block;
  margin-bottom: var(--space-10);
}

.brand img {
  display: block;
  height: 2.75rem;
  width: auto;
}

.brand img.for-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .brand img.for-light {
    display: none;
  }
  .brand img.for-dark {
    display: block;
  }
}

/* — Inhalt */

h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

.lede {
  font-size: var(--text-lg);
  color: var(--color-muted);
  margin: 0 0 var(--space-10);
  text-wrap: balance;
}

/* — Wege: primärer Weg (Anmelden) hebt sich ab, der Rest bleibt zurückhaltend
   — höchstens eine Primärhandlung je Ansicht, wie in Button.jsx festgelegt. */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control-height);
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 120ms;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: 1px solid transparent;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-on-surface);
  border: 1px solid var(--color-border);
}

/* — Fußbereich: Rechtstexte und Kontakt, deutlich zurückgenommen gegenüber
   den Wegen oben — Kartenrahmen statt Fläche, wie Card.jsx es für
   nebensächliche, gruppierte Information vorsieht. */

.footer {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.legal-links a {
  color: var(--color-on-surface);
}

.contact {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin: 0;
}

/* — Rechtstexte (build_legal.py) */

.legal-page article {
  font-size: var(--text-base);
}

.legal-page article h1 {
  font-size: var(--text-xl);
}

.legal-page article h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin: var(--space-10) 0 var(--space-2);
}

.legal-page article h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin: var(--space-6) 0 var(--space-2);
}

.legal-page article p,
.legal-page article ul {
  margin: 0 0 var(--space-4);
}

.legal-page .back-link {
  display: inline-block;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}

.notice {
  border-radius: var(--radius-sm);
  border: 1px solid;
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-6);
  font-size: var(--text-sm);
}

.superseded-notice {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
  color: var(--color-warning);
}

.placeholder-notice {
  background: var(--color-danger-bg);
  border-color: var(--color-danger-border);
  color: var(--color-danger);
}
