/* The fire page's scroll story. Site type only. The stage is sticky, so the scroll stays the browser's own.
   Without .film-live (no JS, reduced motion) the same markup reads as a plain story under the poster. */
/* iOS Safari 26 ignores theme-color and tints the status bar and the toolbar from the page background,
   so the page itself is the film's night (solar-home.css does this only for .shs). */
html:has(.film), html:has(.film) body { background-color: #050b14; }
html:has(.film) .navbar-area { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.film { position: relative; background: #050b14; color: #F4F2EC; }
.film-stage { position: relative; }
.film-scene, .film-ember, .film-plume, .film-haze, .film-red, .film-blast, .film-dying, .film-gaswall,
.film-vignette, .film-cue { display: none; }
.film-poster { display: block; width: 100%; height: 56vh; object-fit: cover; }
.film-story { padding: 40px clamp(22px, 5vw, 72px) 24px; }
.film-copy { margin: 0 0 34px; max-width: 640px; }
.film-copy h1, .film-copy h2 {
    margin: 0 0 12px; font-family: var(--f-serif, "Playfair Display", Georgia, serif); font-weight: 500;
    line-height: 1.04; letter-spacing: -0.02em; color: #F4F2EC;
}
.film-copy h1 { font-size: clamp(44px, 6.6vw, 92px); }
.film-copy h2 { font-size: clamp(30px, 4.2vw, 58px); }
.film-copy em { font-style: italic; color: #7FA8D8; }
.film-copy p { margin: 0; max-width: 46ch; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; color: rgba(244, 242, 236, .88); }
.film-steps-title { margin-top: 56px !important; }

.film-live { height: 2120vh; }
.film-live .film-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; isolation: isolate; --ex: 54vw; --ey: 33vh; }
.film-live .film-stage > * { position: absolute; }
.film-live .film-poster { inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.film-live .film-scene { display: block; inset: 0; visibility: hidden; overflow: hidden; will-change: transform; }
.film-plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-panel-on { opacity: 0; }
/* the pan from the ceiling to the panel: each picture fades out along the edge where it meets the other */
.film-live .film-ceiling { --feather: 0%; -webkit-mask-image: linear-gradient(to left, transparent, #000 var(--feather)); mask-image: linear-gradient(to left, transparent, #000 var(--feather)); }
.film-live .film-panel { --feather: 0%; -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--feather)); mask-image: linear-gradient(to right, transparent, #000 var(--feather)); }

.film-live .film-ember { display: block; left: var(--ex); top: var(--ey); width: 26vmin; height: 26vmin; margin: -13vmin 0 0 -13vmin; border-radius: 50%; mix-blend-mode: screen; opacity: 0;
    background: radial-gradient(closest-side, rgba(255, 170, 70, .95), rgba(255, 80, 20, .35) 38%, rgba(255, 60, 10, 0)); will-change: transform, opacity; }
.film-live .film-plume { display: block; left: var(--ex); top: var(--ey); width: 46vmin; margin-left: -23vmin; transform-origin: 50% 100%; opacity: 0; will-change: transform, opacity; }
.film-live .film-haze { display: block; inset: 0; opacity: 0; background: radial-gradient(120% 120% at var(--ex) var(--ey), #808a99, #6c7686 60%, #4c5563); }

/* the whole width of the ceiling, even where a tall screen shows only part of it: the camera moves along it */
.film-ceiling-strip { position: absolute; left: 50%; top: 50%; height: max(100%, 56.25vw); aspect-ratio: 16 / 9; will-change: transform; }
.film-ceiling-strip img, .film-ceiling-strip svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-led { fill: #ff4a30; opacity: 0; filter: drop-shadow(0 0 7px #ff2a18) drop-shadow(0 0 18px rgba(255, 42, 24, .7)); }

/* the system's own length, on one strip: the camera travels it with the gas */
.film-run-strip { position: absolute; left: 0; top: 0; height: max(100%, 28.13vw); aspect-ratio: 4800 / 1350; will-change: transform; }
.film-run-strip img, .film-run-strip svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-gas-core, .film-gas-glow, .film-branch-core, .film-hose-gas { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.film-gas-core, .film-branch-core { stroke: #eaf3fb; stroke-width: 16; }
.film-gas-glow { stroke: rgba(180, 215, 255, .45); stroke-width: 60; filter: blur(12px); }
.film-hose-gas { stroke: rgba(226, 240, 252, .85); stroke-width: 60; filter: blur(9px); }
.film-fire { fill: #ff3a22; opacity: 0; filter: blur(22px); }
.film-needle { stroke: #c4140e; stroke-width: 7; stroke-linecap: round; }

/* the red is its own layer so the hole cuts only the red: the digits stay whole on top of it */
.film-live .film-red { display: block; inset: 0; visibility: hidden; --hole: 0px; --hx: 50%; --hy: 50%; }
.film-red-wall { position: absolute; inset: 0;
    background: radial-gradient(120% 120% at 50% 45%, #ff3a22, #c4140e 62%, #8c0c08);
    -webkit-mask-image: radial-gradient(ellipse calc(var(--hole) * .54) var(--hole) at var(--hx) var(--hy), transparent 99.4%, #000 100%);
    mask-image: radial-gradient(ellipse calc(var(--hole) * .54) var(--hole) at var(--hx) var(--hy), transparent 99.4%, #000 100%); }
.film-count { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.film-count-label { font-family: var(--f-ui, "Space Grotesk", system-ui, sans-serif); font-size: clamp(12px, 1.1vw, 15px); letter-spacing: .28em; text-transform: uppercase; color: rgba(244, 242, 236, .9); }
.film-digits { position: relative; font-family: var(--f-serif, "Playfair Display", Georgia, serif); font-weight: 500; font-size: min(46vw, 60vh); line-height: 1; letter-spacing: -.04em; font-variant-numeric: lining-nums tabular-nums; will-change: transform; }
.film-digit { display: block; text-align: center; padding: 0 .06em; }
.film-digit + .film-digit { position: absolute; inset: 0; }
.film-digit-solid { color: #120406; }
.film-digit-beacon, .film-digit-aisle, .film-digit-valve { color: transparent; opacity: 0; -webkit-background-clip: text; background-clip: text; background-size: cover; background-position: 50% 50%; }

/* the discharge: rings of pressure and gas leaving the nozzle on every side */
.film-live .film-blast { display: block; inset: 0; overflow: hidden; visibility: hidden; --nx: 50%; --ny: 40%; }
.film-ring { position: absolute; left: var(--nx); top: var(--ny); width: 40vmin; height: 40vmin; margin: -20vmin 0 0 -20vmin; border-radius: 50%; opacity: 0;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0) 62%, rgba(236, 245, 252, .9) 84%, rgba(255, 255, 255, 0)); will-change: transform, opacity; }
.film-spray { position: absolute; left: var(--nx); top: var(--ny); width: 40vmin; margin: -60vmin 0 0 -20vmin; transform-origin: 50% 100%; opacity: 0; will-change: transform, opacity; }
.film-live .film-dying { display: block; left: 50%; top: 56%; width: 56vmin; height: 56vmin; margin: -28vmin 0 0 -28vmin; border-radius: 50%; opacity: 0; mix-blend-mode: screen;
    background: radial-gradient(closest-side, rgba(255, 190, 90, .95), rgba(255, 90, 24, .5) 36%, rgba(255, 60, 10, 0)); will-change: transform, opacity; }
.film-live .film-gaswall { display: block; inset: 0; opacity: 0; pointer-events: none; }
.film-gas-digits { font-family: var(--f-serif, "Playfair Display", Georgia, serif); font-weight: 500; font-size: min(62vw, 82vh); letter-spacing: -.04em; font-variant-numeric: lining-nums; }


/* a picture the reader has scrolled to is still on its way: a quiet ring, late enough that a short wait never shows it */
.film-wait { display: none; }
.film-live .film-wait {
    display: block; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 4; pointer-events: none;
    border-radius: 50%; border: 1px solid rgba(244, 242, 236, .18); border-top-color: rgba(244, 242, 236, .8);
    opacity: 0; transition: opacity .2s ease; animation: film-spin 1.1s linear infinite;
}
.film-live.film-waiting .film-wait { opacity: 1; transition-delay: .3s; }
@keyframes film-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .film-wait { animation: none; } }

.film-live .film-vignette { display: block; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(5, 11, 20, .62), rgba(5, 11, 20, 0) 40%); }


.film-live .film-story { inset: 0; padding: 0; pointer-events: none; z-index: 3; }
.film-live .film-copy {
    position: absolute; margin: 0; left: clamp(22px, 5vw, 72px); right: clamp(22px, 5vw, 72px);
    bottom: calc(clamp(44px, 9vh, 96px) + env(safe-area-inset-bottom, 0px));
    visibility: hidden; pointer-events: auto; text-shadow: 0 1px 22px rgba(5, 11, 20, .9), 0 0 3px rgba(5, 11, 20, .55);
}
.film-live .film-copy-intro { visibility: visible; }
.film-line-clip { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }

.film-live .film-cue {
    display: block; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 1px; height: 34px; z-index: 3;
    background: linear-gradient(rgba(244, 242, 236, 0), rgba(244, 242, 236, .75));
}

/* on iOS the stage runs under the Safari toolbar: keep the copy above it while the toolbar shows */
@supports (height: 100svh) {
    .film-live .film-copy { bottom: calc(clamp(44px, 9vh, 96px) + env(safe-area-inset-bottom, 0px) + 100lvh - 100svh); }
    .film-live .film-cue { bottom: calc(18px + env(safe-area-inset-bottom, 0px) + 100lvh - 100svh); }
}

@media (max-width: 800px) {
    .film-live { height: 1770vh; }
    .film-digits { font-size: min(70vw, 42vh); }
    .film-gas-digits { font-size: min(86vw, 52vh); }
}

/* ── the bleed: on a phone the page dissolves into the status bar and the Safari toolbar, as on the solar page ──
   One fade per edge, drawn by one of two layers with the stage's geometry (top 0, 100lvh), so they line up:
     - on the stage (z 3: over the pictures, under the titles) while the film owns that edge;
     - pinned to the screen (z 2: over the service content and the footer, under the header) once the content's own
       shading reaches that edge (html.film-bleed-t / html.film-bleed-b, set by fire-film.js).
   The fixed layer spans 100lvh from the top, not bottom: 0, which would sit above Safari's collapsed toolbar.
   Five stops, not two: a linear ramp bands on an OLED screen. Touch screens only. */
@media (hover: none) and (pointer: coarse) {
    .film {
        --film-safe-b: calc(100lvh - 100svh + env(safe-area-inset-bottom, 0px));
        --film-bleed-th: calc(env(safe-area-inset-top, 0px) + 140px);
        --film-bleed-bh: calc(var(--film-safe-b) + 120px);
        --film-bleed-t: linear-gradient(180deg, #050b14 env(safe-area-inset-top, 0px), rgba(5, 11, 20, .86) calc(env(safe-area-inset-top, 0px) + 24px),
            rgba(5, 11, 20, .52) calc(env(safe-area-inset-top, 0px) + 62px), rgba(5, 11, 20, .2) calc(env(safe-area-inset-top, 0px) + 100px), rgba(5, 11, 20, 0) 100%);
        --film-bleed-b: linear-gradient(0deg, #050b14 env(safe-area-inset-bottom, 0px), rgba(5, 11, 20, .9) 22%, rgba(5, 11, 20, .6) 45%,
            rgba(5, 11, 20, .25) 70%, rgba(5, 11, 20, 0) 100%);
    }
    .film-live .film-stage::before, .film-live .film-stage::after, .film-live::before, .film-live::after {
        content: ""; top: 0; left: 0; right: 0; height: 100lvh; pointer-events: none; background-repeat: no-repeat;
    }
    .film-live .film-stage::before, .film-live .film-stage::after { position: absolute; z-index: 3; }
    .film-live::before, .film-live::after { position: fixed; z-index: 2; display: none; }
    .film-live .film-stage::before, .film-live::before { background-image: var(--film-bleed-t); background-position: top; background-size: 100% var(--film-bleed-th); }
    .film-live .film-stage::after, .film-live::after { background-image: var(--film-bleed-b); background-position: bottom; background-size: 100% var(--film-bleed-bh); }
    html.film-bleed-t .film-live::before, html.film-bleed-b .film-live::after { display: block; }
    html.film-bleed-t .film-live .film-stage::before, html.film-bleed-b .film-live .film-stage::after { display: none; }
    /* the titles, the scroll cue and the ring stay over the fade */
    .film-live .film-story, .film-live .film-cue { z-index: 4; }
    .film-live .film-wait { z-index: 5; }
    /* the page ends clear of the bottom fade, so the last links are not dimmed */
    html:has(.film) .footer { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); }
}

/* after the film closes into its card (the hand-off), a breath before the first section of the page */
.film + .shs-act2 > .shs-panel:first-child { padding-top: clamp(104px, 12vw, 168px); }
