/* FIG. 01B, the ecosystem film (REQ-166): the sheet frame of the home around a square video. The play button is
   the only control over the film and sits on the poster, never on model geometry (REQ-028). */

.hb-film { background: var(--bc-paper); padding-block: var(--bc-space-4); }
/* #film lands under the fixed header through the page's scroll-padding-top (header height + 20 px). */
.hb-film-stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: center; }
.hb-film-copy { display: flex; flex-direction: column; gap: var(--bc-space-2); }
.hb-film-copy > * { margin: 0; }
.hb-film h2 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.12; }
.hb-film .section-intro { font-size: 16px; line-height: 1.6; }
.hb-film-facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--bc-line); }
.hb-film-facts div { display: flex; justify-content: space-between; gap: var(--bc-space-2); padding: 8px 0;
  border-bottom: 1px solid var(--bc-line); font: 11px/1.5 var(--bc-mono); letter-spacing: .06em; }
.hb-film-facts dt { text-transform: uppercase; color: var(--bc-muted); }
.hb-film-facts dd { margin: 0; color: var(--bc-ink); text-align: right; }

/* Never taller than the window under the header, so the film and its play button are whole when #film lands. */
.hb-film-side { width: min(100%, calc(100svh - var(--header-height, 80px) - 160px), 640px); justify-self: center; }
.hb-film-frame { position: relative; aspect-ratio: 1 / 1; background: var(--bc-graphite); }
.hb-film-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Full screen (REQ-171): the video keeps its square on a rectangular screen, centred, with white sides. Without this the
   `cover` above would crop and zoom it. The prefixed selectors are for Safari and older WebKit. */
.hb-film-frame video:fullscreen { object-fit: contain; background: #fff; }
.hb-film-frame video:-webkit-full-screen { object-fit: contain; background: #fff; }
.hb-film-frame video::backdrop { background: #fff; }
.hb-film-frame:fullscreen { background: #fff; }
.hb-film-frame:-webkit-full-screen { background: #fff; }
.hb-film-frame:fullscreen video { width: 100%; height: 100%; object-fit: contain; }
.hb-film-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hb-film-frame[data-state="playing"] .hb-film-play { display: none; }

@media (max-width: 899px) {
  .hb-film-stage { grid-template-columns: minmax(0, 1fr); gap: var(--bc-space-3); }
  .hb-film-facts { display: none; }
  .hb-film-side { width: 100%; max-width: 640px; }
}
@media (max-width: 480px) {
  .hb-film { padding-block: var(--bc-space-3); }
  .hb-film-copy { gap: var(--bc-space-1); }
  .hb-film .section-intro { font-size: 15px; }
  .hb-film-play { min-height: 44px; }
}
