/* scroll.css: scroll geometry shared by the scenes (v22), and the Lenis recommended rules (scroll.js owns the behaviour).
   --hn-pin is the height of every pinned layer and the overlap between pinned sections; --hn-step is the scroll each
   stop owns (step.js reads the windows back from layout). Small-viewport units, so the collapsing Safari toolbar never
   changes a section height, a pin, or a window.
   One step is 85% of the small viewport, at most 620 px: about one normal flick on a phone (iPhone Safari's small
   viewport is 659-750 px, so 560-640 px; the cap only bites above 729), and the whole page (4 days and the reply) stays
   under ~7,800 CSS px on every screen up to 1366 px tall, under the ~8,000 px past which an iPhone was seen not drawing
   the page. */
:root { --hn-pin: 100vh; --hn-step: min(85vh, 620px); }
@supports (height: 100svh) {
  :root { --hn-pin: 100svh; --hn-step: min(85svh, 620px); }
}

/* No scroll anchoring: every section height is fixed in svh, so the browser has nothing to compensate, and on a
   rotation it moved the guest to another scene (scroll.js keeps the scene and the place in it instead). */
html { overflow-anchor: none; }

/* The passage clip (parchment -> hall) is triggered by the window boundary, not a stretch of empty scroll. */
#passage { height: 0; }

/* A flight cut (reel.js snapText): text that is fading out goes at once, for two frames no fade transitions. */
html.hn-snap #garden .chapter__card,
html.hn-snap #opening .leaf,
html.hn-snap #overture .ov-intro,
html.hn-snap #overture .ov-hint,
html.hn-snap #reply .sheet { transition: none !important; }

/* The RSVP sheet follows the film like the day cards (reel.js: .hn-gate, and .hn-wait while the film is not on the
   reply; a 2.5 s failsafe and focus inside lift it). Only the sheet's own opacity: it already has its own layer
   (will-change: transform, reply.css), so this adds no layer and leaves the reply's reveals alone. */
#reply.hn-gate .sheet { transition: opacity .24s cubic-bezier(.16, 1, .3, 1); }
#reply.hn-gate.hn-wait .sheet { opacity: 0 !important; pointer-events: none; transition: opacity .14s cubic-bezier(0, 0, .2, 1); }
html.still #reply.hn-gate .sheet { transition: none; }
@media print { #reply.hn-gate.hn-wait .sheet { opacity: 1 !important; pointer-events: auto; } }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
