/* AI Buddy · Film v2 (scroll driven). Every rule is scoped under .f2, which film-scroll.js adds to
   section.film and .hero-stage only while the scroll film is active (wide, not tall, not phone preview).
   Values that move are written inline by the controller; this file only kills timed transitions,
   sets stacking and styles the helper layers. */

/* stacking inside .film-pin: bg 1 · release 2 · scenes 4..12 (shade between) · caption scrim 30 · captions/HUD 31 · cue 32 · dark scrim 33 · line 34 */
.film.f2 .film-pin::after{z-index:30;transition:none}
.film.f2 .cap,.film.f2 .fhud{z-index:31}
.film.f2 .fhud{transition:none}
.film.f2 .iris{display:none}
.film.f2 .fv{transition:none}

.film.f2 .f2-bg,.film.f2 .f2-scrim,.film.f2 .f2-shade{position:absolute;inset:0;pointer-events:none;opacity:0;visibility:hidden}
.film.f2 .f2-bg{z-index:1;background:#09090b}
.film.f2 .f2-shade{background:#050507}
.film.f2 .f2-scrim{z-index:33;background:radial-gradient(120% 90% at 50% 50%,#0b0a10,#060609)}

/* the intertitle: no class-driven transitions, no blur; opacity and lift come from scroll */
.film.f2 .cline{z-index:34;transition:none}
.film.f2 .cline::before{display:none}
.film.f2 .cline .cl-k,.film.f2 .cline .cl-h>span,.film.f2 .cline .cl-s>span,.film.f2 .cline .cl-bar,.film.f2 .cline .cl-bar>i{transition:none !important;filter:none !important}

/* captions: words sit in their final state, the container is always shown, its parts fade by progress */
.film.f2 .ch{opacity:1 !important;transition:none !important}
.film.f2 .ch *{transition:none !important}
.film.f2 .ch .mh .wm>span,.film.f2 .ch .k span,.film.f2 .ch .k i{transform:none !important;filter:none !important;opacity:1 !important}

/* scroll cue: opacity from scroll (--f2q), no timed fade */
.film.f2 .scue2.dk{z-index:32;transition:none;opacity:var(--f2q,0);transform:translate(-50%,0)}
/* on the release clip, a light picture, the cue wears the dark colours of the first screen's cue */
.film.f2 .scue2.dk.is-lt{color:#3a3940}
.film.f2 .scue2.dk.is-lt:focus-visible{outline-color:rgba(58,57,64,.6)}

@media (prefers-reduced-motion:reduce){.film.f2 .fv{will-change:auto !important}}

/* A window wider than the 16:9 footage. Fahad's hero is a 16:9 box at full width, so on such a window it runs below
   the fold and the robot's legs are never on screen. Here the hero is the window instead and the footage covers it.
   The robot's soles sit at 96% of the frame, so at most 2% (bare floor) comes off the bottom and the rest of the
   overflow comes off the top, above the puppeteer's fingers. y = min(0, boxHeight - 0.55125 * boxWidth).
   The release clip gets the same framing so the robot stands in the same place before and after the intertitle. */
/* A window taller than the footage (a tablet held sideways, a 16:10 laptop in full screen): the 16:9 box would stop
   short of the bottom of the window and leave a dark band under the robot. The hero is the window there too, and the
   footage covers it, cut evenly left and right. The release clip fills the same box, so it gets the same cut. */
.hero-stage.f2 .hero{aspect-ratio:auto;height:max(var(--vh,100vh),560px)}
@media (min-aspect-ratio:16/9){
.hero-stage.f2 .hero .stage{object-position:50% min(0px,calc(max(var(--vh,100vh),560px) - 55.125cqw))}
.film.f2 .fv.tvx{object-position:50% min(0px,calc(var(--vh,100vh) - 55.125cqw))}
}
