/* =========================================================================
   base.css – Reset, Typografie, Container, Fokus
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--a-6);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-hintergrund);
  color: var(--c-text);
  font-family: var(--schrift-text);
  font-size: var(--fs-basis);
  line-height: var(--lh-basis);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }

img, svg, video { display: block; max-width: 100%; height: auto; }
svg { fill: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(ul, ol)[class] { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--schrift-display);
  font-weight: 800;
  margin: 0 0 var(--a-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); letter-spacing: var(--ls-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: -0.01em; font-weight: 700; }
h4 { font-size: var(--fs-basis); font-weight: 700; }
p, ul, ol, dl, table, figure, details { margin: 0 0 var(--a-4); }
p { text-wrap: pretty; }

a { color: var(--c-akzent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong, b { font-weight: 700; }
small { font-size: var(--fs-klein); }
hr { border: 0; border-top: 1px solid var(--c-linie); margin: var(--a-7) 0; }
abbr[title] { text-decoration: underline dotted; }

/* Fokus: immer sichtbar bei Tastaturbedienung */
:focus-visible {
  outline: 3px solid var(--c-akzent);
  outline-offset: 3px;
  border-radius: 4px;
}
.auf-akzent :focus-visible { outline-color: var(--c-text-auf-akzent); }

/* Container */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--seitenrand));
  margin-inline: auto;
  padding-inline: var(--seitenrand);
}
.abschnitt { padding-block: var(--abschnitt-y); }
.abschnitt--eng { padding-block: calc(var(--abschnitt-y) / 2); }

/* Text-Hilfen */
.overline {
  display: block;
  font-size: var(--fs-overline);
  font-weight: var(--fw-overline);
  letter-spacing: var(--ls-overline);
  text-transform: uppercase;
  color: var(--c-akzent);
  margin-bottom: var(--a-3);
}
.lead { font-size: var(--fs-lead); color: var(--c-text-lead); line-height: 1.5; }
.leise { color: var(--c-text-leise); }
.klein { font-size: var(--fs-klein); }
.zahl { font-variant-numeric: tabular-nums; }

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

/* Sprunglink */
.sprunglink {
  position: absolute; left: var(--a-4); top: -100px; z-index: 100;
  background: var(--c-akzent); color: var(--c-text-auf-akzent);
  padding: var(--a-3) var(--a-4); border-radius: var(--r-button-klein);
  font-weight: 700; text-decoration: none;
}
.sprunglink:focus { top: var(--a-4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
