/* =====================================================================
   Base — Reset, Grundtypografie, fluide Typo-Skala
   Design-System Abschnitt 3, 4
   ===================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-md));
}

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

body {
  font-family: var(--font-body);
  font-size: 1.125rem;          /* Body 18px */
  line-height: 1.65;
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  hyphens: auto;
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button { cursor: pointer; }

ul, ol { padding-left: 1.25em; }

a { color: var(--color-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent-dark); }

/* --- Überschriften (Desktop-Skala, fluid via clamp) --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem);   /* 30 → 44 */
  line-height: 1.12;
}

.display-h1 {
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);   /* 34 → 60 */
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.5625rem, 1.2rem + 1.5vw, 2.125rem); /* 25 → 34 */
  line-height: 1.18;
  letter-spacing: -0.005em;
}

h3 {
  font-size: clamp(1.3125rem, 1.1rem + 0.9vw, 1.625rem); /* 21 → 26 */
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

h4 {
  font-family: var(--font-body);
  font-size: 1.3125rem;          /* 21px */
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

/* --- Overline (H5-Stil) --- */
.overline {
  font-family: var(--font-body);
  font-size: 0.8125rem;          /* 13px */
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  display: inline-block;
  margin-bottom: var(--space-sm);
}
.overline--on-dark { color: var(--color-link-on-dark); }
.overline::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--color-accent);
  margin-top: var(--space-xs);
}
.overline--centered { display: block; }
.overline--centered::after { margin-left: auto; margin-right: auto; }

/* --- Body-Varianten --- */
.body-l   { font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.3125rem); line-height: 1.6; }
.body-s   { font-size: 1rem; line-height: 1.6; }
.caption  { font-size: 0.875rem; line-height: 1.5; font-weight: 500; letter-spacing: 0.01em; }
.legal    { font-size: 0.8125rem; line-height: 1.55; color: var(--color-text-muted); }

p { max-width: 68ch; }
.text-center p, .cta-banner p { max-width: none; }

/* --- Fokus-Sichtbarkeit (A11y, DS 10) --- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.section--dark :focus-visible {
  outline-color: var(--color-accent);
}

/* --- Skiplink --- */
.skiplink {
  position: absolute;
  left: var(--space-sm);
  top: var(--space-sm);
  transform: translateY(-150%);
  background: var(--color-primary);
  color: var(--color-text-on-dark);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: transform var(--duration-micro) var(--ease-standard);
}
.skiplink:focus { transform: translateY(0); color: var(--color-text-on-dark); }

/* --- Bildschirmleser-only --- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Selektion --- */
::selection { background: var(--color-accent-tint); color: var(--color-text); }
