/* ==========================================================================
   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;
}

/* --- 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; }

/* Compact homepage preview. It looks like a tiny player, but is a normal
   link so the homepage never loads YouTube's player JavaScript. */
.pane-video {
  display: block;
  max-inline-size: 360px;
  margin-block: var(--sp-3);
  color: inherit;
  text-decoration: none;
}
.pane-video__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border-hard);
  border-radius: var(--radius);
  background: #000;
}
.pane-video__media img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity 160ms ease, transform 160ms ease;
}
.pane-video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.pane-video__play svg {
  inline-size: 48px;
  block-size: 48px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
  transition: transform 160ms ease;
}
.pane-video__play circle { fill: rgba(0, 0, 0, 0.62); }
.pane-video__play path { fill: #fff; }
.pane-video:hover .pane-video__media img { opacity: 0.92; transform: scale(1.03); }
.pane-video:hover .pane-video__play svg { transform: scale(1.08); }
.pane-video:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.pane-video__caption {
  display: block;
  margin-block-start: var(--sp-1);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}
