/* Homepage introduction only: a complete frame above persistent controls. */
body[data-page="home"] .scene-hero {
  --hero-controls-height: 65px;
  height: auto;
  min-height: 0;
  padding: var(--header-height) 0 0;
  background: #030d1e;
}
body[data-page="home"] .scene-hero .scene-media {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: calc(75svh - var(--hero-controls-height));
  aspect-ratio: 1844 / 1124;
  transform: none;
  background: #030d1e;
}
body[data-page="home"] .scene-hero :is(.scene-video, .scene-poster) {
  object-fit: contain;
  transform: none;
  background: #030d1e;
}
body[data-page="home"] .scene-hero .scene-video.has-frame { visibility: visible; }
.hero-playback {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px clamp(20px, 5vw, 80px);
  border-top: 1px solid #77d9fb38;
  background: #05132eee;
}
.hero-playback[hidden] { display: none; }
.hero-playback :is(.background-motion, .hero-fullscreen) {
  position: static;
  min-height: 44px;
  max-width: none;
  padding: 8px 14px;
  border: 1px solid #8edffb66;
  border-radius: 8px;
  background: #0d2a4d;
  color: white;
  font-size: .875rem;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.hero-playback :is(.background-motion, .hero-fullscreen):hover { background: #124269; border-color: #00c8f8; }
.hero-playback .background-motion { grid-column: 1; grid-row: 1; }
.hero-seek { display: flex; align-items: center; min-width: 0; min-height: 44px; grid-column: 2; grid-row: 1; }
.hero-seek input {
  --hero-progress: 0%;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
.hero-seek input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, #00c8f8 var(--hero-progress), #41617d var(--hero-progress));
}
.hero-seek input::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, #00c8f8 var(--hero-progress), #41617d var(--hero-progress));
}
.hero-seek input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid #b9f5ff;
  border-radius: 50%;
  background: #00c8f8;
  box-shadow: 0 0 10px #00c8f899;
}
.hero-seek input::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #b9f5ff;
  border-radius: 50%;
  background: #00c8f8;
  box-shadow: 0 0 10px #00c8f899;
}
.hero-seek input:focus-visible { outline: 2px solid #00c8f8; outline-offset: 3px; }
.hero-seek input:disabled { cursor: wait; opacity: .5; }
.hero-time { grid-column: 3; grid-row: 1; color: #fff; font-size: .875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-fullscreen { grid-column: 4; grid-row: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.hero-fullscreen svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hero-player-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.hero-player-expanded { overflow: hidden; }
body[data-page="home"] .hero-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #030d1e;
}
body[data-page="home"] .hero-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) .scene-media {
  z-index: 0;
  min-height: 0;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
}
.hero-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) .hero-playback {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
@media (min-width: 1051px) {
  body[data-page="home"] .scene-hero {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: calc(var(--header-height) + 75svh);
  }
  body[data-page="home"] .scene-hero .scene-media { height: 100%; aspect-ratio: auto; }
  .hero-playback { padding-right: max(80px, env(safe-area-inset-right)); }
  body[data-page="home"] .hero-player:is(:fullscreen, :-webkit-full-screen, .is-expanded) .scene-media { max-height: none; }
}
@media (max-width: 600px) {
  body[data-page="home"] .scene-hero { --hero-controls-height: 115px; }
  .hero-playback { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; }
  .hero-seek { grid-column: 1 / -1; grid-row: 2; }
  .hero-time { grid-column: 2; justify-self: end; }
  .hero-fullscreen { grid-column: 3; padding-inline: 12px; }
  .hero-fullscreen span { display: none; }
}
