/* ==========================================================================
   Seams between scenes.
   Every scene is black at its edges, so the joins are dissolved rather than
   cut: each section fades up out of black as its top edge enters, and fades
   back to black as its bottom edge leaves. The shades sit on the section box
   itself, so on a pinned scene they only show while the pin is arriving or
   releasing - never over the pinned frame.
   ========================================================================== */

/* smooth-scroll plumbing (Lenis keeps the native scroll position, so every
   position:sticky pin and IntersectionObserver keeps working) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* nothing scrolls while the intro is on screen */
html.has-intro { overflow: hidden; }

/* the scenes scroll over the fixed hero */
.flow {
  position: relative;
  z-index: 2;
}

/* The hero is position:fixed, so its scroll height has to be reserved here or
   the first scene would start at the top of the document and sit on top of it.
   The spacer's lower third darkens over the hero as the next scene rises. */
.hero-spacer {
  position: relative;
  height: 100svh;
  pointer-events: none;
}
.hero-spacer::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38svh;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
  pointer-events: none;
}

/* the fixed hero's veil, driven by scroll from main.js */
.stage-veil {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.chrono::before,
.chrono::after,
.gallery::before,
.gallery::after,
.reels::before,
.reels::after,
.web::before,
.web::after,
.bro::after,
.fin::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  height: 17svh;
  pointer-events: none;
}
/* entering: out of black */
.chrono::before,
.gallery::before,
.reels::before,
.fin::before {
  top: 0;
  background: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, 0) 100%);
}
/* leaving: back into black */
.chrono::after,
.gallery::after,
.reels::after {
  bottom: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, 0) 100%);
}
/* the reels and websites grounds are a hair lighter than pure black, so its seams blend
   to its own tone */
.reels::before { background: linear-gradient(to bottom, #000, rgba(5, 5, 6, 0)); height: 20svh; }
.reels::after  { background: linear-gradient(to top, #000, rgba(5, 5, 6, 0)); height: 20svh; }
.web::before   { top: 0; background: linear-gradient(to bottom, #000, rgba(5, 5, 6, 0)); height: 20svh; }
.web::after    { bottom: 0; background: linear-gradient(to top, #000, rgba(5, 5, 6, 0)); height: 20svh; }
.bro::after    { bottom: 0; background: linear-gradient(to top, #000, rgba(5, 5, 6, 0)); height: 20svh; }
