/* belschak.dev v4 — Base: Reset, Typo-Klassen, Focus, Akt-Wechsel-Schnittstelle
   Verträge: MASTER.md (Anti-Slop: cursor-pointer + sichtbare Focus-States überall, Kontrast 4.5:1) */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Akt-Wechsel-Schnittstelle: Terminal D setzt --act-bg (und --act-ink) scrub-gebunden
   per ScrollTrigger auf dem body. Ohne gesetzte Var gilt der Licht-Akt. */
body {
  background: var(--act-bg, var(--paper));
  color: var(--act-ink, var(--ink));
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Welle 2.5 (Bundle-Wrapper): clip statt hidden, damit kein Scroll-Container
     entsteht (position: sticky im Footer-Reveal bleibt intakt). hidden = Fallback. */
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg, canvas, video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  background: none;
  border: none;
  color: inherit;
}

/* Welle 2.5 (Bundle-Wrapper): Fließtext-Links sind default unterstrichen mit
   coral-Linie und dunkeln beim Hover ab. Komponenten-Links (Karten, Nav,
   Scroll-Hints, Buttons) setzen lokal text-decoration: none. */
a {
  color: inherit;
  text-decoration-color: var(--coral);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--coral-deep);
}

ul[role='list'], ol[role='list'] {
  list-style: none;
}

/* ---------- Interaktion: Pflicht-Zustände ---------- */
a, button, summary, [role='button'] {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px; /* Welle 2.5: Bundle-Wrapper-Werte */
  border-radius: 1px;
}

::selection {
  background: var(--coral);
  color: var(--paper);
}

/* ---------- Typo-Klassen ---------- */
/* Display: Fraunces, exklusiv für Momente mit Wirkung */
.t-display {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: var(--leading-display);
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
}

/* Kursives Akzent-Wort in coral: der Fraunces-Signatur-Move */
.t-accent {
  font-style: italic;
  font-weight: 460;
  color: var(--coral);
}

/* Body: Instrument Sans, unsichtbar gut */
.t-body {
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--leading-body);
}

.t-soft { color: var(--ink-soft); }

/* Meta/Data: Spline Sans Mono */
.t-meta {
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.08em;
}

/* Kicker: immer Uppercase, Letterspacing .2em+ (MASTER Typografie) */
.t-kicker {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Layout-Grundmaß ---------- */
.wrap {
  width: min(100% - clamp(40px, 8vw, 128px), 1360px);
  margin-inline: auto;
}

/* Screenreader-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;
}

/* ---------- Motion-Respekt (MASTER Prinzip 7) ---------- */
/* JS-Entrances setzen initial nur data-Attribute; ohne JS oder mit
   reduced-motion bleibt alles sofort sichtbar. Transitions aus. */
@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;
  }
}
