/* Gemeinsame Grundlage aller Entwürfe: Reset, Einblenden, Bildansicht. Farben kommen aus den Tokens des Entwurfs. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, ul, ol, address { margin: 0; padding: 0; font-style: normal; }
ul, ol { list-style: none; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 3px; }
html { scrollbar-color: var(--muted) var(--bg); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Aufsteigen beim Scrollen, rein in CSS. Bewusst ohne Deckkraft: Inhalt ist nie unsichtbar. */
@keyframes rise { from { translate: 0 56px; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] { animation: rise linear both; animation-timeline: view(); animation-range: entry calc(var(--i, 0) * 9%) entry calc(38% + var(--i, 0) * 9%); }
  }
}

/* Bildansicht */
.lightbox { border: 0; padding: 0; margin: auto; background: transparent; color: #fff; max-width: 100vw; max-height: 100dvh; overflow: visible; }
.lightbox::backdrop { background: rgb(12 11 10 / 0.92); }
.lightbox figure { display: grid; justify-items: center; gap: 12px; }
.lightbox img { max-width: min(92vw, 1500px); max-height: 82dvh; width: auto; }
.lightbox figcaption { font-size: 0.9375rem; }
.lightbox button { position: fixed; display: grid; place-items: center; width: 56px; height: 56px; border: 0; background: #fff; color: #111; transition: background 0.15s, transform 0.15s; }
.lightbox button:hover { background: var(--accent); }
.lightbox button:active { transform: scale(0.94); }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lb-close { right: 16px; top: 16px; }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}
