/* Confidential landing: the explainer film beside the headline. home-film.js draws it; decisions in docs/landing/NOTES.md.
   Builds on home.css (tokens, focus ring) and home-terminal.css (the scene and the first screen's grid). */

.film { position: relative; z-index: 6; margin: 28px 0 0; min-width: 0; }
/* Beside the words on wide screens, sized so the whole player fits the first screen. */
@media (min-width: 960px) {
  .film { justify-self: end; width: min(100%, (100svh - 260px) * 1.6); margin: 0; }
}
.film-box { position: relative; aspect-ratio: 680 / 380; }
.film-box canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s var(--ease-out-quad); }
.film.ready .film-box canvas { opacity: 1; }
.film figcaption { margin-top: 16px; }

/* Without the player (reduced motion, or no script): all five steps written out under a still frame. */
.film-words { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; counter-reset: beat; font-size: 14.5px; line-height: 1.45; letter-spacing: -0.011em; color: var(--ink-2); }
.film-words li { counter-increment: beat; text-wrap: balance; }
.film-words li::before { content: counter(beat) "/5"; display: inline-block; margin-right: 12px; font: 500 12px/1 var(--mono); letter-spacing: 0; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.film-ctl { display: none; align-items: center; gap: 14px; margin-top: 10px; }

/* The player (home-film.js adds .live): the five captions share one cell, so the line never changes height as
   they swap, and only the current one shows. */
.film.live .film-words { gap: 0; font-size: 16px; color: var(--ink); }
.film.live .film-words li { grid-area: 1 / 1; opacity: 0; }
.film.live .film-words li.on { opacity: 1; }
.film.live .film-ctl { display: flex; }

/* The step bars: each fills while its step plays, and seeks there when pressed. */
.film-steps { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.film-step { display: flex; flex-direction: column; gap: 9px; width: 100%; margin: 0; padding: 7px 0 4px; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12.5px; line-height: 1.2; letter-spacing: -0.01em; text-align: left; cursor: pointer; transition: color 0.1s var(--ease-out-quad); }
.film-step:hover { color: var(--ink); }
.film-step[aria-current] { color: var(--ink); }
.film-bar { position: relative; display: block; height: 2px; overflow: hidden; border-radius: 1px; background: rgba(255, 255, 255, 0.12); }
.film-bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.film-lab { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.film-play { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; transition: color 0.1s var(--ease-out-quad); }
.film-play:hover { color: var(--ink); }
.film-play svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.film-play .i-play { display: none; fill: currentColor; stroke: none; }
.film-play.paused .i-pause { display: none; }
.film-play.paused .i-play { display: block; }

/* Phones: the stage is drawn taller (home-film.js switches its layout by shape), and the labels under the bars go. */
@media (max-width: 559px) {
  .film-box { aspect-ratio: 400 / 372; }
  .film.live .film-words { font-size: 15px; }
  .film-steps { gap: 6px; }
  .film-step { padding: 11px 0; } /* a 24px tall target once the labels go */
  .film-lab { display: none; }
}
