/* The 30-second tour (#tour on the home page). Tokens come from the page's :root (the Claude Design export). */
.tour { max-width: 1120px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-direction: column; gap: 20px; box-sizing: border-box; }
.tour-head { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.tour-head h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; text-wrap: balance; }
.tour-head p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--mist); }

/* The film: 16:9 on wide screens, the 4:5 cut on phones. */
.film { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 24px; overflow: hidden; background: var(--deep);
        box-shadow: inset 0 0 0 1px rgba(244,245,247,.08), 0 60px 110px -60px rgba(0,0,0,.95); isolation: isolate; }
@media (max-width: 640px) { .film { aspect-ratio: 4 / 5; border-radius: 20px; } }
/* With JavaScript, the frame takes the shape of the cut actually loaded; the width rule above is only the fallback. */
.film[data-cut="wide"] { aspect-ratio: 16 / 9; }
.film[data-cut="tall"] { aspect-ratio: 4 / 5; }
/* contain, not cover: if the frame and the film ever disagree, the film letterboxes instead of losing its edges. */
.film video { display: block; width: 100%; height: 100%; object-fit: contain; }
.film::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity .5s var(--fluid);
               background: radial-gradient(ellipse at 50% 55%, rgba(16,17,22,0) 30%, rgba(16,17,22,.55) 100%), linear-gradient(to top, rgba(16,17,22,.55), rgba(16,17,22,0) 45%); }
.film[data-state="playing"]::after, .film[data-state="buffering"]::after { opacity: 0; }

/* The control sits bottom left, where the film never puts text, and only changes its label; its heart draws the progress. */
.film-play { position: absolute; z-index: 1; left: 20px; bottom: 20px; white-space: nowrap;
             display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 18px; border-radius: 999px;
             border: 1px solid rgba(244,245,247,.18); background: rgba(16,17,22,.62); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
             color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; letter-spacing: -.01em; cursor: pointer;
             transition: background .2s, height .4s var(--glide), padding .4s var(--glide); }
.film-play:hover { background: rgba(35,37,43,.78); }
.film-play:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.film[data-state] .film-play { height: 48px; }
.film-time { color: var(--mist); font-weight: 600; font-variant-numeric: tabular-nums; }
.film-heart { display: block; overflow: visible; flex: none; margin-left: 6px; }
/* Play or pause, always shown: the heart alone reads as "like" on a phone. */
.film-glyph { display: block; flex: none; fill: var(--ink); }
.film-glyph .g-pause { display: none; }
.film[data-state="playing"] .g-play, .film[data-state="buffering"] .g-play { display: none; }
.film[data-state="playing"] .g-pause, .film[data-state="buffering"] .g-pause { display: inline; }
.film-track, .film-progress { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 89.56 100; }
.film-track { stroke: rgba(244,245,247,.22); }
.film-progress { stroke: var(--s1); stroke-dashoffset: 0; }
.film[data-state] .film-progress { stroke-dashoffset: 89.56; }
.film-node { fill: var(--s1); transform-origin: 54px 44.5px; }
.film[data-state="buffering"] .film-node { animation: film-pulse 1s var(--fluid) infinite; }
@keyframes film-pulse { 50% { transform: scale(1.6); opacity: .5; } }
.film-noscript { position: absolute; left: 20px; right: 20px; bottom: 20px; margin: 0; font-size: 14px; color: var(--mist); }
.film-noscript a { color: var(--ink); }
@media (max-width: 640px) {
  .film-play { left: 14px; bottom: 14px; height: 50px; padding: 0 16px 0 16px; font-size: 15px; gap: 9px; }
  .film[data-state] .film-play { height: 44px; gap: 10px; }
  /* While it plays, the phone cut keeps the pause symbol, the heart and the time (paused shows Resume); the aria-label names the action. */
  .film[data-state="playing"] .film-label, .film[data-state="buffering"] .film-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* Chapters: a real sequence with real times, so they carry their timestamps. The line above each fills while it plays. */
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.chapters button { position: relative; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 6px 6px 0; border: 0; background: none;
                   color: var(--mist); font: inherit; text-align: left; cursor: pointer; }
.chapters button::before, .chapters button::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; }
.chapters button::before { background: rgba(244,245,247,.12); }
.chapters button::after { background: var(--c); transform-origin: left; transform: scaleX(var(--fill, 0)); }
.ch-time { font-size: 13px; font-weight: 600; color: var(--dim); font-variant-numeric: tabular-nums; }
.ch-name { font-size: 14px; font-weight: 700; letter-spacing: -.005em; line-height: 1.3; }
.chapters button:hover .ch-name, .chapters button[aria-current] .ch-name { color: var(--ink); }
.chapters button[aria-current] .ch-time { color: var(--c); }
.chapters button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.ch-short { display: none; }
@media (max-width: 860px) {
  .chapters { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
}
@media (max-width: 640px) {
  .ch-long { display: none; }
  .ch-short { display: inline; }
}

.captions { color: var(--mist); font-size: 15px; }
.captions summary { cursor: pointer; font-weight: 700; color: var(--ink); width: fit-content; }
.captions summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.captions ol { margin: 12px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.5; max-width: 720px; }
.captions b { color: var(--ink); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .film-play, .film::after { transition: none; }
  .film[data-state="buffering"] .film-node { animation: none; opacity: .5; }
}
