/* The marketing video with chapters (/embed/{slug}), framed by the public websites. Dark like the films themselves. */
:root {
    color-scheme: dark;
    --mv-bg: #0b0f1a;
    --mv-rail: #121730;
    --mv-card: #1b2140;
    --mv-line: #2c3352;
    --mv-text: #eef1f7;
    --mv-muted: #9aa3bb;
    --mv-accent: #ff6a3d;
    --mv-done: #4f8fd8;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--mv-bg); color: var(--mv-text); font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }

.mv { display: grid; grid-template-columns: minmax(0, 1fr) 300px; height: 100%; }
.mv.mv-no-chapters { grid-template-columns: minmax(0, 1fr); }
.mv-stage { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; background: #000; }
.mv-stage video { display: block; width: 100%; height: 100%; max-height: 100vh; object-fit: contain; background: #000; }

.mv-chapters { display: flex; flex-direction: column; min-height: 0; background: var(--mv-rail); border-left: 1px solid var(--mv-line); }
.mv-kicker { margin: 0; padding: 18px 20px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mv-accent); }
.mv-langs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 20px 12px; }
.mv-lang { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--mv-muted); text-decoration: none; box-shadow: inset 0 0 0 1px var(--mv-line); }
.mv-lang:hover { color: var(--mv-text); box-shadow: inset 0 0 0 1px var(--mv-accent); }
.mv-lang.is-current { color: var(--mv-text); background: var(--mv-card); box-shadow: inset 0 0 0 1px var(--mv-accent); }
.mv-lang:focus-visible { outline: 2px solid var(--mv-accent); outline-offset: 2px; }
.mv-list { list-style: none; margin: 0; padding: 0 10px 16px; overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.mv-chapter {
    all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
    display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
    padding: 10px 10px; border-radius: 10px; color: var(--mv-muted); font-size: 14px; line-height: 1.3;
}
.mv-chapter:hover { background: var(--mv-card); color: var(--mv-text); }
.mv-chapter:focus-visible { outline: 2px solid var(--mv-accent); outline-offset: 1px; }
.mv-no { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--mv-muted); text-align: center; }
.mv-title { font-weight: 500; text-wrap: balance; }
.mv-length { font-size: 12px; font-variant-numeric: tabular-nums; }
.mv-chapter.is-done .mv-no { color: var(--mv-done); }
.mv-chapter.is-current { background: var(--mv-card); color: var(--mv-text); box-shadow: inset 3px 0 0 var(--mv-accent); }
.mv-chapter.is-current .mv-no { color: var(--mv-accent); }
.mv-chapter.is-current .mv-title { font-weight: 700; }

/* Narrow frames (phones): the video on top, the chapters scroll below it. */
@media (max-width: 760px) {
    .mv { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
    .mv-stage video { height: auto; aspect-ratio: var(--mv-ratio, 16 / 9); }
    /* A standing (9:16) film fills most of the phone's height; the list scrolls below it. */
    .mv-tall .mv-stage video { height: 72vh; width: 100%; aspect-ratio: auto; }
    .mv-chapters { border-left: 0; border-top: 1px solid var(--mv-line); }
}

/* Playlists (/embed/playlist/{slug}): two video layers and a picture layer cross-fade, so the videos play on as one film. */
.pl-stage { position: relative; overflow: hidden; }
.pl-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; opacity: 0; transition: opacity 0.3s ease; }
.pl-layer.is-active { opacity: 1; z-index: 1; }
.pl-layer.is-leaving { opacity: 1; z-index: 0; transition: none; }
.pl-picture.is-active { animation: pl-zoom var(--pl-seconds, 4s) linear forwards; }
.pl-stage.is-paused .pl-picture.is-active { animation-play-state: paused; }
@keyframes pl-zoom { from { transform: scale(1); } to { transform: scale(1.05); } }
.pl-big-play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 42px; background: rgba(255, 106, 61, 0.92); color: #fff; font-size: 30px; cursor: pointer; z-index: 3; }
.pl-big-play[hidden] { display: none; }
.pl-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent); opacity: 0; transition: opacity 0.2s ease; }
.pl-stage:hover .pl-controls, .pl-stage.is-paused .pl-controls, .pl-controls:focus-within { opacity: 1; }
.pl-button { all: unset; cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; border-radius: 8px; }
.pl-button:focus-visible { outline: 2px solid var(--mv-accent); }
.pl-track { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); cursor: pointer; }
.pl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--mv-accent); }
.pl-tick { position: absolute; top: -3px; width: 2px; height: 12px; background: rgba(255, 255, 255, 0.8); }
.pl-time { font-size: 12px; color: #fff; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; }
@media (max-width: 760px) {
    .pl .pl-stage { aspect-ratio: var(--mv-ratio, 16 / 9); }
    .pl.mv-tall .pl-stage { aspect-ratio: auto; height: 72vh; }
}

/* The voluntary rating when a playlist has played to the end: over the stage, 1–6 stars, an optional comment. */
.pl-rate { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11, 15, 26, 0.82); backdrop-filter: blur(3px); }
.pl-rate[hidden] { display: none; }
.pl-rate-box { width: min(440px, 100%); padding: 22px 22px 18px; border-radius: 16px; background: var(--mv-card); box-shadow: 0 0 0 1px var(--mv-line), 0 18px 50px rgba(0, 0, 0, 0.45); text-align: center; }
.pl-rate-box[hidden] { display: none; }
.pl-rate-title { margin: 0; font-size: 20px; font-weight: 700; }
.pl-rate-lead { margin: 6px 0 14px; font-size: 13px; color: var(--mv-muted); }
.pl-rate-stars { display: flex; justify-content: center; gap: 4px; margin-bottom: 14px; }
.pl-rate-star { padding: 2px 4px; border: 0; background: none; font-size: 32px; line-height: 1; color: var(--mv-line); cursor: pointer; transition: color 0.12s, transform 0.12s; }
.pl-rate-star.is-on { color: var(--mv-accent); }
.pl-rate-star:hover, .pl-rate-star:focus-visible { transform: scale(1.12); outline: none; }
.pl-rate-comment { width: 100%; resize: vertical; min-height: 54px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--mv-bg); color: var(--mv-text); font: inherit; font-size: 14px; box-shadow: inset 0 0 0 1px var(--mv-line); }
.pl-rate-comment:focus { outline: none; box-shadow: inset 0 0 0 1px var(--mv-accent); }
.pl-rate-actions { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.pl-rate-send, .pl-rate-skip { padding: 9px 18px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.pl-rate-send { background: var(--mv-accent); color: #fff; }
.pl-rate-send:disabled { opacity: 0.4; cursor: default; }
.pl-rate-skip { background: none; color: var(--mv-muted); box-shadow: inset 0 0 0 1px var(--mv-line); }
.pl-rate-skip:hover { color: var(--mv-text); }
.pl-rate-thanks { margin: 0; padding: 18px 26px; border-radius: 14px; background: var(--mv-card); font-size: 18px; font-weight: 700; }
/* The call to action at the end: the same card as the rating, with the button as a link. */
.pl-cta-button { display: inline-flex; align-items: center; text-decoration: none; }
.pl-cta-button:hover, .pl-cta-button:focus-visible { filter: brightness(1.08); outline: none; }
.pl-cta .pl-rate-lead { margin-bottom: 4px; }
.mv-tall .pl-rate-box { padding: 18px 16px 14px; }
.mv-tall .pl-rate-star { font-size: 28px; }
