/* ==================================================================
   Grundlagen: Reset, Typografie, Zugänglichkeit
   ================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h-compact) + 1.5rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-serif);
  font-weight: 380;
  line-height: var(--lh-head);
  letter-spacing: var(--ls-head);
  text-wrap: balance;
}
h1 { font-size: var(--t-display); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); font-family: var(--f-sans); font-weight: 500; letter-spacing: -0.005em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

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

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
}
button { cursor: pointer; }

::selection { background: var(--au-500); color: var(--ink-900); }

/* --- Fokus: immer sichtbar, nie unterdrückt ---------------------- */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}
:focus:not(:focus-visible) { outline: none; }

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

/* --- Sprungmarke zum Inhalt --------------------------------------- */
.skip-link {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ag-50);
  color: var(--ink-900);
  font-size: var(--t-small);
  font-weight: 500;
  transition: transform var(--d-fast) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* --- Typografische Bausteine -------------------------------------- */
.label {
  font-family: var(--f-sans);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-dim);
}

.mark {                       /* winzige technische Marginalie */
  font-family: var(--f-sans);
  font-size: var(--t-mark);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: var(--text-max);
}

.prose { max-width: var(--text-max); color: var(--text-muted); }

/* --- Bewegung nur, wenn gewünscht --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Einblendungen beim Scrollen ---------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out);
  transition-delay: var(--verzug, 0ms);
}
.reveal.ist-sichtbar { opacity: 1; transform: none; }

.reveal-zeile { display: block; }

[data-reveal-bild] {
  opacity: 0;
  transform: translateY(20px) scale(1.012);
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out);
}
[data-reveal-bild].ist-sichtbar { opacity: 1; transform: none; }

/* Ohne aktives JavaScript bleibt alles sichtbar. */
html:not(.js) .reveal,
html:not(.js) [data-reveal-bild] { opacity: 1; transform: none; }

/* Der Zeichen-Vorrat (WhatsApp-Symbol) hängt unsichtbar im Dokument.
   Als Klasse statt als style-Attribut — so darf die Sicherheitsregel
   (Content-Security-Policy) Inline-Styles komplett verbieten. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
