/* Scroll film on the home page (Zaire, 2026-10-07: "keep the old website look, and
   add this section only to the page"). Static by default: a poster and the three
   lines of copy. scroll-film.js adds .is-live when motion and canvas are available,
   which pins the stage and plays the frames with the scroll. Used only by index.html. */

.scroll-film { position: relative; background: #0b0d09; color: #f3f2e9; }
.scroll-film-stage { position: relative; padding: clamp(4rem, 8vw, 6rem) 0; }
.scroll-film-canvas { display: none; }
.scroll-film-poster { width: min(calc(100% - 2rem), 1040px); height: auto; margin: 0 auto 2.5rem; border-radius: 18px; }
.scroll-film-beats { display: grid; gap: 2rem; }
.scroll-film-beat .eyebrow { color: #a9bd84; }
.scroll-film-beat h2 { margin: .4rem 0 .6rem; color: #f3f2e9; font-size: clamp(2rem, 4vw, 3.6rem); }
.scroll-film-beat p { max-width: 40ch; color: #c7cabd; line-height: 1.6; }
.scroll-film-beat a { color: #f3f2e9; text-decoration: underline; text-underline-offset: .2em; }

.scroll-film.is-live { height: 300vh; }
.scroll-film.is-live .scroll-film-stage { position: sticky; top: var(--sf-top, 0px); height: calc(100vh - var(--sf-top, 0px)); height: calc(100svh - var(--sf-top, 0px)); padding: 0; overflow: hidden; }
.scroll-film.is-live .scroll-film-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.scroll-film.is-live .scroll-film-poster { display: none; }
.scroll-film.is-live .scroll-film-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(9, 11, 8, .82) 0%, rgba(9, 11, 8, .35) 45%, transparent 70%), linear-gradient(0deg, rgba(9, 11, 8, .7) 0%, transparent 40%); pointer-events: none; }
.scroll-film.is-live .scroll-film-beats { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(3rem, 10vh, 6rem); margin: 0 auto; display: block; }
.scroll-film.is-live .scroll-film-beat { position: absolute; left: 0; bottom: 0; max-width: 36rem; opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.scroll-film.is-live .scroll-film-beat.is-on, .scroll-film.is-live .scroll-film-beat:focus-within { opacity: 1; transform: none; pointer-events: auto; }

.scroll-film.is-live.is-portrait .scroll-film-stage::after { background: linear-gradient(0deg, rgba(9, 11, 8, .5) 0%, transparent 30%); }
.scroll-film.is-live.is-portrait .scroll-film-beats { top: var(--sf-copy-top, 60%); bottom: auto; }
.scroll-film.is-live.is-portrait .scroll-film-beat { top: 0; bottom: auto; }

@media (max-width: 900px) {
  .scroll-film.is-live { height: 260vh; }
  .scroll-film.is-live:not(.is-portrait) .scroll-film-beats { bottom: 3rem; }
}
