/* ==========================================================================
   Video UI — the real embed lives on /movie/. The compact preview on the
   homepage reuses the same play-button language without loading the player.
   ========================================================================== */

.video-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.video-embed__frame {
  position: relative;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-embed__frame iframe,
.video-embed__frame > div {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
}

/* Vertical variant, for YouTube Shorts / TikTok-shaped clips — used on
   /clips/ and nowhere near the main 16:9 movie player. */
.video-embed__frame--vertical {
  aspect-ratio: 9 / 16;
  max-inline-size: 300px;
  margin-inline: auto;
}

/* --- lazy-load facade: shown until the viewer actually wants to play ---- */
.video-facade {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #000;
}
.video-facade__img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  opacity: 0.82;
}
.video-facade__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-facade__play svg {
  inline-size: 68px;
  block-size: 68px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}
.video-facade:hover .video-facade__play svg { transform: scale(1.06); }
.video-facade__play circle { fill: rgba(0, 0, 0, 0.55); }
.video-facade__play path { fill: #fff; }

.video-embed__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.video-embed__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-dim);
}

.source-tabs { display: flex; gap: 5px; }
.source-tab {
  inline-size: 28px;
  block-size: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-hard);
  background: var(--surface-2);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  cursor: pointer;
  padding: 0;
}
.source-tab[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.source-tab:hover { border-color: var(--gold); }

.video-embed__note { font-size: var(--step--1); color: var(--ink-faint); margin: 0; }

/* --- movie-infobox: poster beside the fact table, wiki-infobox style -----
   Lives next to "Film record" now, not the video — the poster is reference
   art for the film's identity, not a viewing aid. */
.movie-infobox {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 200px);
  gap: var(--sp-4);
  align-items: start;
}
.movie-infobox .pane-poster { inline-size: 100%; margin-block: 0; }
.movie-infobox .pane-poster figcaption {
  margin-block-start: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  line-height: 1.4;
}
@media (max-width: 680px) {
  .movie-infobox { grid-template-columns: 1fr; }
  .movie-infobox .pane-poster { inline-size: clamp(140px, 42vw, 200px); margin-inline: auto; order: -1; }
}

/* --- hero-video: homepage panel that links out to /movie/#watch ---------- */
.hero-video { display: block; color: inherit; text-decoration: none; }
.hero-video__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border-hard);
  border-radius: var(--radius-lg);
  background: #000;
}
.hero-video__media img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  opacity: 0.82;
  transition: opacity 160ms ease, transform 160ms ease;
}
.hero-video__play {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  inline-size: 56px;
  block-size: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  text-indent: 2px;
  transition: transform 160ms ease;
}
.hero-video:hover .hero-video__media img { opacity: 0.94; transform: scale(1.03); }
.hero-video:hover .hero-video__play { transform: translate(-50%, -50%) scale(1.08); }
.hero-video:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.hero-video__caption {
  display: block;
  margin-block-start: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-dim);
  text-align: center;
}
