/* Prompt Driven Studio landing page.
   Color carries the app's own meaning: cyan is the camera and its path (and the
   one primary action), magenta is the selected lens, purple is a pointed part. */

:root {
  --navy: #0A0A23;
  --deep: #15152B;
  --graphite: #1A1B26;
  --raised: #2B2C40;
  --line: #39394C;
  --sleet: #F5F7FA;
  --muted: #A1A6BC;
  --dim: #4A4D66;
  --cyan: #00D8FF;
  --magenta: #FF2AA6;
  --purple: #8C47FF;

  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--sleet);
  font: 400 1.0625rem/1.65 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: var(--gutter); top: -48px; z-index: 10;
  padding: 8px 14px; border-radius: 8px;
  background: var(--cyan); color: var(--navy); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 750;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h3 {
  font-size: 1.375rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.018em;
}
.data { font-family: var(--mono); font-size: .8125rem; font-weight: 500; letter-spacing: 0; }

/* Masthead ---------------------------------------------------------------- */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.brand-word { display: grid; line-height: 1.05; font-weight: 650; font-size: 1rem; letter-spacing: -0.01em; }
/* Two-line wordmark from the brand guide: Prompt Driven / STUDIO. */
.brand-sub { font-size: .625rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--cyan); }
.get {
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  padding: 10px 18px; border-radius: 999px;
  background: var(--cyan); color: var(--navy);
  transition: background-color .15s;
}
.get:hover { background: #5CE6FF; }

/* Hero -------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(16px, 4vh, 48px) clamp(24px, 4vw, 56px);
}

.beats {
  display: grid;
  font-size: clamp(3.5rem, 7.4vw, 6.75rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -0.05em;
  margin-left: -0.04em;
}
.beat { color: var(--sleet); transition: color .5s var(--ease); }

/* The headline follows the stage: each beat lights when the stage does it. */
.js .hero:has(.stage[data-phase="idle"]) .beat,
.js .hero:has(.stage[data-phase="speak"]) .beat:not(.beat-speak),
.js .hero:has(.stage[data-phase="shape"]) .beat-shoot { color: var(--dim); }

.lede {
  max-width: 34ch;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
}
.badge { display: inline-block; margin-top: 32px; border-radius: 10px; }
.badge img { height: 56px; width: auto; }

/* The stage is the room: the car, the cyan path, the travelling camera. */
.stage {
  position: relative;
  aspect-ratio: 5 / 4;
  min-width: 0;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.prompt-pill {
  position: absolute; top: 4%; left: 2%;
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 92%;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  background: var(--graphite);
  border: 1px solid var(--raised);
  font-size: 1rem; font-weight: 500;
  white-space: nowrap;
}
#prompt-text { min-height: 1.5em; }
#prompt-text::before, .prompt-pill .q { color: var(--muted); }
#prompt-text::before { content: "“"; }
.prompt-pill .q { margin-left: -10px; }
.mic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--cyan); fill: none; stroke: var(--navy); stroke-width: 2.4; stroke-linecap: round; }
.mic rect { fill: var(--navy); stroke: none; }
.stage[data-phase="speak"] #prompt-text::after {
  content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px;
  vertical-align: -0.15em; background: var(--cyan);
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.viewfinder {
  position: absolute; right: 2%; bottom: 3%;
  width: 40%; aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 10px;
  opacity: 0;
  transition: opacity .6s var(--ease);
  pointer-events: none;
}
.viewfinder figcaption {
  position: absolute; left: 0; bottom: calc(100% + 8px);
  display: flex; align-items: center; gap: 10px;
  font-size: .8125rem; font-weight: 500; color: var(--sleet);
}
#vf-lens, #vf-time { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.vf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.stage[data-phase="live"] .viewfinder { opacity: 1; }

.stage-poster { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage[data-phase="fallback"] .stage-poster { display: block; }
.stage[data-phase="fallback"] canvas,
.stage[data-phase="fallback"] .viewfinder { display: none; }

/* Compare: draft and render side by side, like the app's Compare ----------- */

.compare {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px clamp(24px, 4vw, 64px);
  align-items: end;
  padding-block: clamp(48px, 8vw, 96px);
}
.compare-copy { display: contents; }
.compare-copy p { max-width: 52ch; color: var(--muted); }
.pair { grid-column: 1 / -1; margin-top: clamp(16px, 3vw, 32px); }
.pair-frames { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pair-frame { position: relative; }
.pair-frame img {
  width: 100%; height: auto; aspect-ratio: 968 / 540; object-fit: cover;
  border-radius: 14px; background: var(--graphite);
}
.pair-tag {
  position: absolute; top: 12px; left: 12px;
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 10px; border-radius: 999px;
  font-size: .8125rem; font-weight: 600;
  background: rgb(10 10 35 / .78);
}
.pair figcaption { margin-top: 14px; font-size: .875rem; color: var(--muted); max-width: 70ch; }

/* Steps: the page's camera path ------------------------------------------ */

.steps { padding-block: clamp(24px, 4vw, 56px); }
.path {
  list-style: none;
  padding: 0;
  margin-top: clamp(40px, 6vw, 72px);
  position: relative;
}
/* The cyan line is the path; each stop is a white camera point on it. */
.path::before {
  content: "";
  position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 2px; background: var(--cyan);
}
.stop {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 5fr) minmax(0, 5fr);
  column-gap: clamp(16px, 3vw, 48px);
  padding-left: 32px;
  padding-bottom: clamp(48px, 6vw, 80px);
}
.stop:last-child { padding-bottom: 0; }
/* End the path at the last point. */
.stop:last-child::after {
  content: ""; position: absolute; left: 0; top: 18px; bottom: -8px;
  width: 12px; background: var(--navy);
}
.stop::before {
  content: "";
  position: absolute; left: 0; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--sleet);
  box-shadow: 0 0 0 4px var(--navy);
}
.stop-space { padding-top: 1px; font-size: .875rem; font-weight: 600; color: var(--cyan); }
.stop-copy p { max-width: 46ch; margin-top: 12px; color: var(--muted); }

/* Small replicas of the app's panels. */
.panel {
  align-self: start;
  max-width: 400px;
  padding: 18px;
  border-radius: 18px;
  background: var(--graphite);
  border: 1px solid var(--raised);
  font-size: .9375rem;
  display: grid; gap: 14px;
}
.panel-label { font-size: .8125rem; color: var(--muted); }
.panel-quote { margin-top: -8px; font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.panel-head .data { color: var(--muted); }
.panel-actions, .moves { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .875rem; font-weight: 600;
}
.btn-cyan { background: var(--cyan); border-color: var(--cyan); color: var(--navy); }
.btn.is-on { border-color: var(--sleet); background: var(--raised); }

.versions { display: flex; gap: 8px; }
.versions span {
  width: 64px; padding: 10px 10px 18px; border-radius: 10px;
  background: var(--raised); border: 1px solid transparent; color: var(--muted);
}
.versions .is-on { border-color: var(--cyan); color: var(--sleet); }
.pointing {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: #30204F; color: #EBDDFF; font-weight: 500;
}
.pointing-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 3px rgb(140 71 255 / .35); }

.lens-now { color: var(--magenta) !important; }
.lens-rail {
  display: flex; justify-content: space-between;
  padding: 10px 4px 0;
  border-top: 2px solid var(--raised);
  color: var(--muted);
}
.lens-rail span { position: relative; }
.lens-rail .is-on { color: var(--magenta); }
.lens-rail .is-on::before {
  content: ""; position: absolute; left: 50%; top: -17px;
  width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: var(--magenta);
}

.confirm {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 14px; border-top: 1px solid var(--raised);
  font-size: .8125rem; color: var(--muted);
}

.field { display: grid; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--raised); }
.field span:first-child { font-size: .75rem; color: var(--muted); }

/* Facts ------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
  padding-block: clamp(32px, 4vw, 64px);
}
.facts > div { border-top: 1px solid var(--line); padding-top: 24px; }
.facts h2 { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.3; }
.facts p, .facts ul { margin-top: 12px; color: var(--muted); max-width: 40ch; }
.facts ul { padding-left: 1.1em; }
.facts li + li { margin-top: 4px; }

/* Closer and footer ------------------------------------------------------- */

.closer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 48px;
  padding-block: clamp(40px, 5vw, 80px);
}
.closer h2 { font-size: clamp(2.5rem, 6vw, 4.75rem); font-weight: 800; letter-spacing: -0.045em; }
.closer .badge { margin-top: 0; }

.footer {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--muted);
}
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--sleet); text-decoration: underline; text-underline-offset: 3px; }

/* Responsive -------------------------------------------------------------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; }
  .lede { max-width: 46ch; }
  .compare { grid-template-columns: 1fr; }
  .stop { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .stop .panel { margin-top: 8px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts > div { padding-block: 24px; }
}

@media (max-width: 560px) {
  .stage { aspect-ratio: 4 / 5; margin-inline: calc(-1 * var(--gutter)); }
  .prompt-pill { left: var(--gutter); font-size: .9375rem; }
  .viewfinder { width: 58%; right: var(--gutter); }
  .badge img { height: 52px; }
  .get { padding: 9px 14px; font-size: .875rem; }
  .pair-frames { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Recording state and the real edit pair in the timeline. */
.rec { display: inline-flex; align-items: center; gap: 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #F34842; box-shadow: 0 0 0 3px rgb(243 72 66 / .3); }
.edit-pair { align-self: start; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-pair figcaption { grid-column: 1 / -1; }
/* The real edit gets the full width under its copy. */
.stop-wide .stop-copy p { max-width: 60ch; }
.stop-wide .edit-pair { grid-column: 2 / -1; margin-top: 24px; }
.edit-frame { position: relative; }
.edit-frame img { width: 100%; height: auto; aspect-ratio: 968 / 544; object-fit: cover; border-radius: 12px; background: var(--graphite); }
.edit-pair .pair-tag { top: 10px; left: 10px; }
.edit-pair .pair-tag .data { font-size: .75rem; color: var(--muted); }
.edit-pair figcaption { font-size: .8125rem; color: var(--muted); }
@media (max-width: 960px) {
  .stop-wide .edit-pair { grid-column: auto; margin-top: 8px; }
}
@media (max-width: 560px) {
  .edit-pair { grid-template-columns: 1fr; }
}

/* Steps: one camera point, one small live demonstration. */
.steps .path { --path-start: 0px; --path-length: 100%; --path-progress: 1; }
.steps .path::before, .steps .path::after {
  content: ""; position: absolute; left: 5px; top: var(--path-start);
  bottom: auto; width: 2px; height: var(--path-length);
  background: var(--raised); pointer-events: none;
}
.steps .path::after {
  background: var(--cyan); transform: scaleY(var(--path-progress)); transform-origin: top;
}
.steps .stop {
  min-height: 78vh;
  grid-template-columns: 96px minmax(0, 4fr) minmax(0, 6fr);
  align-items: center;
  padding-block: 12vh;
}
.steps .stop:last-child { padding-bottom: 12vh; }
.steps .stop:last-child::after { display: none; }
.steps .stop::before {
  top: calc(50% - 6px); z-index: 1;
  background: var(--dim); box-shadow: 0 0 0 4px var(--navy);
}
.steps .stop.is-reached::before {
  background: #fff;
  box-shadow: 0 0 0 4px var(--navy), 0 0 0 7px rgb(0 216 255 / .35);
}
.steps .stop-space { color: var(--dim); transition: color .35s var(--ease); }
.steps .stop-space.is-current { color: var(--cyan); }
.steps .stop-copy { transition: opacity .4s var(--ease); }
.steps .stop-copy h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
.steps .stop-copy p, .steps .stop-wide .stop-copy p { max-width: 38ch; }
.steps [data-demo] {
  position: sticky; top: calc(50vh - var(--visual-height, 260px) / 2);
  align-self: start; justify-self: end; width: 100%; max-width: 480px;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.steps .panel { padding: 24px; gap: 18px; font-size: 1rem; }
.steps .panel-label { font-size: .875rem; }
.steps .panel-quote { font-size: 1.375rem; line-height: 1.45; }
.steps .data { font-size: .875rem; }
.steps .btn { font-size: .9375rem; }
.steps .path.is-live .stop:not(.is-active) .stop-copy { opacity: .32; }
.steps .path.is-live .stop:not(.is-active) [data-demo] {
  opacity: 0; transform: translateY(24px) scale(.97); pointer-events: none;
}
.steps .type-line { display: grid; }
.steps .type-space, .steps .type-ink { grid-area: 1 / 1; }
.steps .type-space { visibility: hidden; }
.steps .is-typing .type-ink::after {
  content: ""; display: inline-block; width: 2px; height: 1em;
  margin-left: 3px; vertical-align: -.12em; background: var(--cyan);
  animation: caret .8s steps(1) infinite;
}
.steps .moves .is-demo-on { border-color: var(--cyan); background: var(--raised); }
.steps .lens-rail { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); padding-inline: 0; }
.steps .lens-rail span { text-align: center; }
.steps .lens-rail .is-on::before { display: none; }
.steps .lens-knob {
  position: absolute; top: -7px; left: 0; width: 20%; height: 12px;
  transform: translateX(200%); pointer-events: none;
}
.steps .lens-knob::after {
  content: ""; display: block; margin-inline: auto;
  width: 12px; height: 12px; border-radius: 50%; background: var(--magenta);
  box-shadow: 0 0 0 4px rgb(255 42 166 / .12);
}
.steps .render-controls { display: grid; gap: 18px; }
.steps .timeline-media {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: 12px; background: var(--deep); isolation: isolate;
}
.steps .timeline-media picture { display: block; position: absolute; inset: 0; }
.steps .timeline-media img { width: 100%; height: 100%; object-fit: cover; }
.steps .media-result { opacity: 1; }
.steps .media-tag, .steps .edit-prompt, .steps .edit-time {
  position: absolute; z-index: 2; padding: 5px 10px;
  background: rgb(10 10 35 / .88); border-radius: 999px;
  font-size: .75rem; font-weight: 600; line-height: 1.5;
}
.steps .media-tag { left: 10px; top: 10px; }
.steps .stop-wide .edit-pair {
  grid-column: auto; grid-template-columns: 1fr; gap: 12px;
  max-width: 520px; margin-top: 0;
}
.steps .edit-circle { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.steps .edit-circle path {
  fill: none; stroke: var(--purple); stroke-width: 5;
  stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0;
}
.steps .edit-prompt { left: 12px; bottom: 12px; border: 1px solid var(--purple); font-size: .875rem; }
.steps .edit-time { right: 12px; bottom: 14px; color: var(--muted); }
.steps .edit-status { font-size: .8125rem; color: var(--cyan); min-height: 1.65em; }
.steps .edit-pair figcaption { grid-column: auto; }
.steps .upload-track { height: 3px; background: var(--raised); overflow: hidden; border-radius: 3px; }
.steps .upload-track span { display: block; height: 100%; background: var(--cyan); transform-origin: left; transform: scaleX(0); }

@media (max-width: 960px) {
  .steps .stop {
    min-height: 0; grid-template-columns: minmax(0, 1fr); row-gap: 18px;
    padding-block: 0 88px;
  }
  .steps .stop:last-child { padding-bottom: 0; }
  .steps .stop::before { top: 7px; }
  .steps .stop-space:empty { display: none; }
  .steps .stop-space { padding-top: 0; }
  .steps .stop-copy h3 { font-size: 1.5rem; }
  .steps .stop-copy p, .steps .stop-wide .stop-copy p { max-width: 52ch; }
  .steps [data-demo] { position: relative; top: auto; justify-self: start; }
  .steps .path.is-live .stop:not(.is-active) .stop-copy { opacity: 1; }
  .steps .path.is-live .stop:not(.is-active) [data-demo] { opacity: 1; transform: none; }
  .steps .stop-wide .edit-pair { margin-top: 8px; }
}
@media (max-width: 560px) {
  .steps .stop { padding-left: 26px; }
  .steps .panel { padding: 18px; gap: 16px; border-radius: 16px; }
  .steps .panel-quote { font-size: 1.25rem; }
  .steps .btn { font-size: .8125rem; padding: 7px 11px; }
  .steps .confirm { gap: 10px; font-size: .75rem; }
  .steps .confirm .btn { flex-shrink: 0; }
  .steps .panel-render .panel-actions { gap: 6px; }
  .steps .panel-render .panel-actions .btn { padding-inline: 9px; }
  .steps .edit-status { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .steps [data-demo] { position: relative; top: auto; align-self: center; }
  .steps .path.is-live .stop:not(.is-active) .stop-copy,
  .steps .path.is-live .stop:not(.is-active) [data-demo] { opacity: 1; transform: none; }
  .steps .path::after { transform: scaleY(1); }
  .steps .stop::before {
    background: #fff; box-shadow: 0 0 0 4px var(--navy), 0 0 0 7px rgb(0 216 255 / .35);
  }
  .steps .media-result { opacity: 1; }
  .steps .edit-circle { opacity: 0; }
}

/* Larger step type on wide screens so each chapter reads like a slide. */
@media (min-width: 961px) {
  .steps h3 { font-size: clamp(1.75rem, 2.6vw, 2.5rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.08; }
  .steps .stop-copy p { font-size: 1.1875rem; line-height: 1.6; margin-top: 16px; }
}
/* A sentence becomes a shot. Color is the only moving part. */

/* The frame opens into the room, then one clock drives both renders. */
.cinema-scroll { display: none; }
.cinema-posters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cinema-posters figure { position: relative; overflow: hidden; border-radius: 14px; }
.cinema-posters img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cinema-posters figcaption, .cinema-tag {
  position: absolute; top: 16px; padding: 5px 12px; border-radius: 999px;
  background: rgb(10 10 35 / .82); font-size: .8125rem; font-weight: 600;
}
.cinema-posters figcaption { left: 16px; }
.cinema.is-live .cinema-posters { display: none; }
.cinema.is-live .cinema-scroll { display: block; height: 320vh; }
.cinema-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.cinema-frame {
  position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate;
  background: var(--deep); clip-path: inset(var(--iy, 0px) var(--ix, 0px) round var(--radius, 20px));
}
.cinema-media {
  position: absolute; left: 50%; top: 50%;
  width: max(100vw, 177.777778vh); height: max(100vh, 56.25vw);
  transform: translate(calc(-50% - var(--pan, 0px)), -50%) scale(var(--media-scale, 1));
}
.cinema-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinema-draft { clip-path: inset(0 0 0 var(--wipe, 0%)); }
.cinema-wipe {
  position: absolute; left: var(--wipe, 0%); top: 0; bottom: 0; width: 2px;
  background: var(--cyan); transform: translateX(-1px); opacity: 0;
}
.cinema-tag { top: var(--gutter); transition: opacity .15s; }
/* The wipe reveals the render on the left of the line, so the draft keeps the right side. */
.cinema-tag-draft { right: var(--gutter); transform: translate(calc(-1 * var(--ix, 0px)), var(--iy, 0px)); }
.cinema-tag-real { left: var(--gutter); transform: translate(var(--ix, 0px), var(--iy, 0px)); opacity: 0; }
.cinema-overlay {
  position: absolute; left: var(--gutter); bottom: var(--gutter);
  max-width: calc(100% - 2 * var(--gutter)); padding: 18px 24px;
  background: rgb(10 10 35 / .8); border-radius: 12px;
  transform: translate(var(--ix, 0px), calc(-1 * var(--iy, 0px)));
}
.cinema-lines { position: relative; font-size: clamp(2rem, 4.5vw, 4.5rem); font-weight: 750; line-height: 1.02; letter-spacing: -.045em; }
.cinema-lines > span { position: absolute; bottom: 0; left: 0; opacity: 0; transition: opacity .18s; width: max-content; max-width: 100%; }
.cinema-lines > .is-current { position: relative; display: block; opacity: 1; }
.cinema-time { margin-top: 14px; font: 400 .8125rem/1.5 var(--mono); color: var(--muted); }
.cinema-copy {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px clamp(32px, 8vw, 120px);
  padding-block: clamp(32px, 4vw, 64px);
}
.cinema-copy h2 { font-weight: 800; letter-spacing: -.045em; }
.cinema-copy p { max-width: 52ch; color: var(--muted); }
.cinema-copy .cinema-caption { margin-top: 24px; font-size: .8125rem; line-height: 1.6; }

/* A reel with room to look, and a glimpse of where each shot began. */
.reel { padding-block: clamp(32px, 4vw, 64px); }
.reel-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.reel-head h2 { font-weight: 800; letter-spacing: -.045em; }
.reel-head p { margin-top: 16px; color: var(--muted); max-width: 50ch; }
.reel-controls { display: none; gap: 10px; flex-shrink: 0; }
.reel.is-live .reel-controls { display: flex; }
.reel-controls button {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--deep);
  color: var(--sleet); cursor: pointer;
}
.reel-controls button:hover:enabled { border-color: var(--muted); }
.reel-controls button:disabled { opacity: .3; cursor: default; }
.reel-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.reel-strip {
  --reel-gutter: max(var(--gutter), calc((100vw - var(--max)) / 2));
  display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 4px var(--reel-gutter) 16px; scroll-padding-inline: var(--reel-gutter);
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.reel-strip::-webkit-scrollbar { display: none; }
.reel-card { flex: 0 0 min(78vw, 520px); min-width: 0; scroll-snap-align: start; }
.reel-player { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--deep); }
.reel-player > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.reel-draft { position: absolute; bottom: 14px; left: 14px; width: 104px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.reel-draft img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.reel-draft span { position: absolute; bottom: 3px; left: 4px; padding: 1px 5px; border-radius: 4px; background: rgb(10 10 35 / .88); font-size: .625rem; line-height: 1.5; }
.reel-card > figcaption { margin-top: 18px; max-width: 34ch; font-size: 1.125rem; font-weight: 600; line-height: 1.45; letter-spacing: -.015em; }
@media (max-width: 960px) {
  .cinema-copy { grid-template-columns: 1fr; gap: 24px; }
  .cinema-copy h2 br { display: none; }
  .reel-head { align-items: start; }
}
@media (max-width: 560px) {
  .cinema-overlay { padding: 14px 16px; max-width: calc(100% - 2 * var(--gutter) - 2 * var(--ix, 0px)); }
  .cinema-tag { top: 20px; font-size: .6875rem; padding: 4px 9px; }
  .cinema-posters { gap: 8px; }
  .cinema-posters figcaption { left: 6px; top: 6px; font-size: .625rem; padding: 3px 6px; }
  .reel-head { flex-wrap: wrap; gap: 20px; }
  .reel-controls { margin-left: auto; }
  .reel-strip { gap: 16px; }
  .reel-draft { width: 88px; bottom: 10px; left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cinema.is-live .cinema-scroll { display: none; }
  .cinema.is-live .cinema-posters { display: grid; }
}

/* Hero actions: the store badge. */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.hero-actions .badge { margin-top: 0; }

/* The film: poster until clicked, then the YouTube player. */
.film { padding-block: clamp(32px, 4vw, 64px); }
.film h2 { font-weight: 800; letter-spacing: -.045em; margin-bottom: clamp(20px, 3vw, 32px); }
.film-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: var(--graphite); }
.film-frame iframe, .film-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film-play { padding: 0; cursor: pointer; background: none; }
.film-play img { width: 100%; height: 100%; object-fit: cover; }
.film-icon {
  position: absolute; left: 50%; top: 50%;
  width: clamp(64px, 8vw, 96px); height: clamp(64px, 8vw, 96px); margin: calc(clamp(64px, 8vw, 96px) / -2) 0 0 calc(clamp(64px, 8vw, 96px) / -2);
  display: grid; place-items: center; border-radius: 50%;
  background: var(--cyan); color: var(--navy);
  transition: transform .2s var(--ease);
}
.film-icon svg { width: 42%; height: 42%; margin-left: 6%; fill: currentColor; }
.film-play:hover .film-icon { transform: scale(1.06); }
.film-play:focus-visible { outline: 3px solid var(--cyan); outline-offset: -3px; }
.film-note { margin-top: 12px; font-size: .8125rem; color: var(--muted); }
.film-item figcaption { margin-top: 12px; font-weight: 600; }
/* Film carousel: one film at a time, arrows over the player. */
.film-carousel {
  position: relative;
  /* Full-bleed so the other film clearly peeks in beside the centred one. */
  margin-inline: calc(50% - 50vw);
  --film-w: min(960px, calc(100vw - 2 * var(--gutter) - 320px));
}
.film-track {
  display: flex; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: calc((100% - var(--film-w)) / 2);
}
.film-track::-webkit-scrollbar { display: none; }
.film-track > .film-item {
  flex: 0 0 var(--film-w); scroll-snap-align: center; margin: 0;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.film-track > .film-item:not(.is-current) { opacity: .4; transform: scale(.92); cursor: pointer; }
.film-track > .film-item:not(.is-current) figcaption { visibility: hidden; }
.film-arrow {
  position: absolute; top: calc((100% - 2.25rem) / 2); transform: translateY(-50%);
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid rgb(245 247 250 / .25); border-radius: 50%;
  background: rgb(10 10 35 / .6); color: var(--sleet); cursor: pointer;
  transition: opacity .2s, background-color .2s;
}
.film-arrow:hover:enabled { background: rgb(10 10 35 / .85); }
.film-arrow:disabled { opacity: 0; pointer-events: none; }
.film-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Arrows straddle the edges of the centred film. */
.film-prev { left: calc((100% - var(--film-w)) / 2 - 24px); }
.film-next { right: calc((100% - var(--film-w)) / 2 - 24px); }

/* Phones: a narrower centred film and smaller arrows (after the base film rules). */
@media (max-width: 560px) {
  .film-carousel { --film-w: 78vw; }
  .film-arrow { width: 40px; height: 40px; }
  .film-prev { left: calc((100% - var(--film-w)) / 2 - 20px); }
  .film-next { right: calc((100% - var(--film-w)) / 2 - 20px); }
  .film-track { gap: 12px; }
}
