/* ==========================================================================
   Basis: Design-Tokens, Reset, Typografie, Hilfsklassen
   Wird von allen Seiten geladen.
   ========================================================================== */

:root {
  /* Farben */
  --navy-dark: #0a1c40;
  --navy-mid: #0f2a5c;
  --blue-accent: #2e74e6;
  --blue-hover: #1f5fc9;
  --blue-bright: #4a90f0;
  --white: #ffffff;
  --grey-bg: #f3f5f9;
  --card-bg: #eef1f7;
  --ink: #1a2436;
  --muted: #5b6472;
  --border: #dbe1ea;
  --error: #c62828;
  --star: #f5a623;

  /* Typografie */
  --font-body: 'Segoe UI', 'Inter', Arial, sans-serif;
  --font-headline: 'Arial Black', 'Segoe UI', sans-serif;

  /* Maße */
  --radius: 8px;
  --topbar-height: 64px;
  --shadow: 0 10px 30px rgba(10, 28, 64, .18);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* Sprungziele nicht unter der fixierten Topbar verstecken */
  scroll-padding-top: var(--topbar-height);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; text-decoration: none; }

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* Mit dem hidden-Attribut ausgeblendete Elemente bleiben immer unsichtbar */
[hidden] { display: none !important; }

/* ---------- Typografie ---------- */
.headline {
  font-family: var(--font-headline);
  font-weight: 900;
  letter-spacing: .5px;
}

/* ---------- Barrierefreiheit ---------- */
:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 2px;
}

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* „Zum Inhalt springen“ – erscheint erst bei Tastaturfokus */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy-dark);
  font-weight: 600;
  border-radius: 4px;
}
.skip-link:focus { top: 12px; }

/* Nutzer, die weniger Bewegung wünschen, sehen alles sofort */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}
