/* Einblenden beim Scrollen. Ohne JS bleibt alles sichtbar: .js-reveal setzt erst scroll.js. */
html { scroll-behavior: smooth; }
html.lenis, html.lenis body { scroll-behavior: auto !important; } /* Lenis übernimmt am Desktop, sonst glätten beide gleichzeitig */
[id] { scroll-margin-top: 100px; } /* Anker landen unter der fixen Navigation */
.js-reveal .reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); transition-delay: var(--rd, 0s); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
/* Nachgeladene Bilder blenden weich ein, statt aufzuploppen */
img[data-srcset], img.lade-weich { opacity: 0; transition: opacity .4s ease; }
img.ist-geladen { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js-reveal .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    img[data-srcset], img.lade-weich { transition: none; }
}
/* Abschnitte unterhalb des ersten Bildschirms erst beim Hinscrollen berechnen (schnellerer Start auf dem Handy).
   Nur auf Touch-Geräten: Am Desktop mit Lenis würden sich die Abschnittshöhen während eines Ankersprungs ändern
   und Lenis am Ziel vorbeigleiten. Der Desktop startet ohnehin schnell genug. */
@media (hover: none), (pointer: coarse) {
    body > section:nth-of-type(n+3) { content-visibility: auto; contain-intrinsic-size: auto 900px; }
}
