/* Base Styles — Fonts, Typografie, Grundlayout */

/*
 * Self-hosted Variable Fonts (DSGVO: kein fonts.googleapis.com).
 * Space Grotesk = Headline, Archivo = Body. Beide werden in partials/head.php
 * per <link rel="preload"> VOR dem ersten Stylesheet vorgeladen;
 * font-display: optional verhindert FOUT/FOIT. Die metrisch angepassten
 * Fallback-@font-face verhindern Layout-Shift im Ausnahmefall.
 */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
}

/* Metrisch angepasste Fallbacks — greifen nur, wenn die Schrift ausnahmsweise
   nicht rechtzeitig geladen ist. */
@font-face {
  font-family: 'Heading Fallback';
  src: local('Arial');
  size-adjust: 99%;
  ascent-override: 98%;
  descent-override: 29%;
}
@font-face {
  font-family: 'Body Fallback';
  src: local('Arial');
  size-adjust: 97%;
  ascent-override: 90%;
  descent-override: 22%;
}

:root {
  --font-heading: 'Space Grotesk', 'Heading Fallback', Arial, sans-serif;
  --font-body: 'Archivo', 'Body Fallback', Arial, sans-serif;

  /* Weichere, markige Radius-Sprache — ein Token, ueberall referenziert */
  --radius: 0.625rem;
  --radius-sm: 0.4rem;

  /* Schatten: slate-getoent + geschichtet (wirkt hochwertiger als reines Schwarz) */
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 3px rgb(15 23 42 / 0.06);
  --shadow-md: 0 2px 4px rgb(15 23 42 / 0.04), 0 10px 24px -8px rgb(15 23 42 / 0.11);
  --shadow-lg: 0 14px 32px -10px rgb(15 23 42 / 0.18), 0 4px 10px -4px rgb(15 23 42 / 0.07);
  --shadow-primary: 0 6px 18px -6px oklch(0.545 0.138 254 / 0.45);
  --shadow-primary-hover: 0 10px 24px -8px oklch(0.545 0.138 254 / 0.55);
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.65;
  color: var(--color-ink);
}

/* Typografie-Hierarchie */
.heading-1 {
  font-family: var(--font-heading);
  font-size: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.heading-2 {
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.375rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.heading-3 {
  font-family: var(--font-heading);
  font-size: clamp(1.185rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
}

.subheading {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
  color: #4b5563;
}

.eyebrow {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-700);
}

/* Fokus-Styles fuer Barrierefreiheit */
:focus-visible {
  outline: 2px solid var(--color-primary-600);
  outline-offset: 2px;
}

/* Scroll-Reveal — dezent, respektiert prefers-reduced-motion */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
