/*
 * MitGah Website — Design-Fundament
 * Portiert aus src/constants/tokens.ts ("Accessible Premium").
 * Bei Token-Änderungen in der App diese Datei nachziehen.
 */

/* ---------- Schrift: Geist (Variable Font, 400-700) ---------- */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  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: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext.woff2") format("woff2");
  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;
}

/* ---------- Farb-Tokens ---------- */

:root {
  color-scheme: light dark;

  /* Light: warmer Cream, Premium-Navy, Terracotta */
  --bg: #f7f3ec;
  --surface: #fffdf9;
  --elevated: #ffffff;
  --sage: #e8e0d4;

  --text: #111214;
  --text-muted: #4b4743;

  --primary: #123c7c;
  --primary-soft: #e6eeff;
  --on-primary: #ffffff;

  --accent: #c46a2b;
  --accent-strong: #814116;
  --accent-soft: #fbe9dd;

  --border: #c5b5a1; /* nur dekorativ, keine UI-Boundary */
  --border-strong: #796e5d;

  --focus: #986500;
  --focus-inner: #ffd166;

  --shadow: 0 2px 8px rgba(26, 22, 18, 0.06);

  /* Radius-Tokens */
  --radius-card: 22px;
  --radius-control: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --surface: #171b22;
    --elevated: #202631;
    --sage: #2a3138;

    --text: #f7f3ec;
    --text-muted: #cfc7bc;

    --primary: #91b7ff;
    --primary-soft: #172a4f;
    --on-primary: #07111f;

    --accent: #ffb074;
    --accent-strong: #ffd0a8;
    --accent-soft: #3b2417;

    --border: #4b5564;
    --border-strong: #6f7b8d;

    --focus: #ffd166;
    --focus-inner: #a36d00;

    --shadow: none; /* Dark: Tiefe via elevated-Surface, kein Schatten */
  }
}

/* ---------- Basis ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem; /* 17px Body wie in der App */
  line-height: 1.55;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.625rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.35;
  font-weight: 600;
}

@media (min-width: 40em) {
  h1 {
    font-size: 2.5rem;
  }
}

p + p {
  margin-top: 0.75rem;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---------- Fokus: sichtbar nur bei Tastatur, deutlich über Minimum ---------- */

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

/* ---------- Layout ---------- */

.container {
  max-width: 44rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.site-header {
  padding-block: 1.5rem;
}

.brand {
  font-size: 1.3125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

main > section {
  margin-block: 3.5rem;
}

.hero {
  margin-top: 2.5rem;
}

.hero .lead {
  margin-top: 1rem;
  font-size: 1.1875rem; /* 19px bodyLarge */
}

section > h2 {
  margin-bottom: 1rem;
}

/* ---------- CTA-Box ---------- */

.cta {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--sage);
  border-radius: var(--radius-card);
}

.cta p:first-child {
  font-weight: 600;
}

.cta-note {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- Button (56px Höhe, Radius 14 wie in der App) ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.75rem 1.75rem;
  margin-block: 1rem 0.75rem;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.006em;
  text-decoration: none;
}

.button:hover {
  background: color-mix(in srgb, var(--primary) 86%, black);
}

@media (prefers-color-scheme: dark) {
  .button:hover {
    background: color-mix(in srgb, var(--primary) 86%, white);
  }
}

/* ---------- Schritte (bewusst KEINE Liste: H3-Navigation genügt, Doppel-Semantik vermeiden) ---------- */

.step + .step {
  margin-top: 1.75rem;
}

.steps h3 {
  margin-bottom: 0.25rem;
}

/* ---------- Karten ---------- */

.cards {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 40em) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
  .card {
    background: var(--elevated);
  }
}

.card h3 {
  margin-bottom: 0.5rem;
}

/* ---------- Legal-Seiten (Datenschutz, Richtlinien) ---------- */

.legal {
  margin-top: 2.5rem;
}

.legal .lead {
  margin-top: 0.75rem;
  font-size: 1.1875rem;
}

.legal h2 {
  font-size: 1.3125rem;
  line-height: 1.35;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

.legal ul {
  margin-top: 0.75rem;
  padding-left: 1.5rem;
}

.legal li + li {
  margin-top: 0.375rem;
}

.legal li::marker {
  color: var(--accent-strong);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 4rem;
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.site-footer .fineprint {
  margin-top: 1.25rem;
}

/* ---------- Nur für Screenreader (Standard-Clip-Pattern) ---------- */

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

/* ---------- Skip-Link ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  z-index: 10;
  background: var(--elevated);
  color: var(--primary);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-control);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  left: 0.75rem;
}
