/* The hero film inherits both site palettes. Its dimensions never change between scenes. */
:root { --hero-person: #465d96; }
:root[data-theme="dark"] { --hero-person: var(--text); }
.hero-art { min-width: 0; container-type: inline-size; }
.hero-film { position: relative; aspect-ratio: 4 / 3; isolation: isolate; }
.hero-film canvas, .hero-film .hero-poster { width: 100%; height: 100%; display: block; }
.hero-film canvas { position: absolute; inset: 0; opacity: 0; }
.hero-art[data-ready] .hero-film canvas { opacity: 1; }
.hero-art[data-ready] .hero-poster { visibility: hidden; }
.hero-art .hero-poster { overflow: hidden; }
.hero-art .hero-film-caption { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(2.8em, auto) 44px; align-items: center; gap: 0 12px; margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); font-family: var(--font); font-size: 13px; letter-spacing: 0; text-transform: none; text-align: left; }
.hero-art .hero-film-caption::before { display: none; }
.hero-scene-name { min-width: 0; color: var(--muted); line-height: 1.4; }
.hero-controls { display: none; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.hero-art[data-ready] .hero-controls { display: flex; }
.hero-art:not([data-ready]) .hero-film-caption { grid-template-rows: auto; }
.hero-scenes { display: flex; flex: 1; justify-content: space-between; gap: 4px; }
.hero-scene-button { display: grid; place-items: center; width: 25px; height: 44px; padding: 0; border: 0; background: transparent; }
.hero-scene-button::after { content: ''; display: block; width: 20px; height: 2px; background: var(--diagram-line); transition: background .2s; }
.hero-scene-button[aria-current="step"]::after, .hero-scene-button:hover::after { background: var(--blue); }
.hero-play { display: grid; place-items: center; width: 44px; height: 44px; border: 0; padding: 12px; background: transparent; color: var(--blue); border-radius: 3px; }
.hero-play:hover { background: var(--soft); }
.hero-art .hero-play svg { width: 18px; height: 18px; margin: 0; fill: none; stroke: currentColor; stroke-width: 1.8; }
.hero-play .play-symbol, .hero-play[data-paused="true"] .pause-symbol { display: none; }
.hero-play[data-paused="true"] .play-symbol { display: block; }
.hero-description { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Choose the layout from the illustration's width, before any caption is shown.
   The stacked layout reserves two text lines; the wide row also fits two lines. */
@container (min-width: 32rem) {
  .hero-art .hero-film-caption { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: max(44px, 2.8em); }
  .hero-controls { width: auto; }
  .hero-scenes { flex: 0 0 auto; }
}
@media (max-width: 760px) {
  .hero-art { width: 100%; max-width: 420px; margin-inline: auto; }
  .hero-art .hero-poster { max-width: none; }
  .hero-art .hero-film-caption { margin-top: 0; }
}
@media (max-width: 380px) {
  .hero-controls { gap: 3px; }
  .hero-scenes { gap: 0; }
  .hero-scene-button { width: 24px; }
  .hero-scene-button::after { width: 16px; }
  .hero-art .hero-film-caption { font-size: 12px; }
}
@media print {
  .hero-art .hero-film-caption { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .hero-art[data-ready] .hero-film canvas, .hero-controls { display: none !important; }
  .hero-art[data-ready] .hero-poster { visibility: visible; }
}
