/* The film's page. It takes its colours and its three faces from the film: sans for the product,
   serif italic for people, mono for what agents and clocks say. */
:root {
  --ground: #1A0C10;
  --oxblood: #421D24;
  --wisteria: #D6D3FE;
  --purple: #714CB6;
  --text: #F7F5F2;
  --muted: rgba(247, 245, 242, .68);
  --line: rgba(214, 211, 254, .16);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* the light the film's last scene sits in: purple from above, oxblood at the edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(64vw 44vw at 50% -10%, rgba(113, 76, 182, .36), transparent 70%),
    radial-gradient(60vw 54vw at 104% 34%, rgba(66, 29, 36, .95), transparent 70%),
    radial-gradient(56vw 54vw at -6% 70%, rgba(66, 29, 36, .85), transparent 70%);
}
/* One column for everything, no wider than lets the whole film sit on the first screen with its chapters. */
.wrap {
  --column: min(1280px, max(560px, calc((100svh - 196px) * 16 / 9)));
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- the corner lockups, as in the film's frame ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0; }
.top p { margin: 0; }
.lock { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; font-size: 16px; letter-spacing: -.012em; white-space: nowrap; }
.mark { display: block; width: 25px; height: 25px; color: var(--wisteria); }
.builton { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.builton img { display: block; width: auto; height: 18px; }

/* ---- the line the film ends on, under the film ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: clamp(24px, 5vw, 72px); margin-top: clamp(56px, 8vw, 112px); }
.kicker { margin: 0 0 20px; font: 500 12.5px/1 var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--wisteria); }
h1 {
  margin: 0;
  font: italic 400 clamp(42px, 5.4vw, 76px)/1 var(--serif);
  letter-spacing: -.028em;
  text-wrap: balance;
}
.lede { margin: 0 0 .35em; max-width: 46ch; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.52; color: var(--muted); text-wrap: pretty; }
.back { color: var(--wisteria); text-underline-offset: .22em; }

/* ---- the film ---- */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(10px, 1.5vw, 20px);
  background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 60px 120px -50px rgba(0, 0, 0, .9), 0 30px 80px -40px rgba(113, 76, 182, .35);
}
.player video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
/* the whole poster starts the film; the pill says so, and reads on a light frame or a dark one */
.play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(12px, 2.4vw, 32px);
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.play[hidden] { display: none; }
.play .pill {
  display: inline-flex;
  align-items: center;
  gap: clamp(11px, 1.3vw, 17px);
  max-width: 100%;
  padding: 9px clamp(18px, 2.2vw, 28px) 9px 9px;
  border-radius: 999px;
  background: rgba(26, 12, 16, .9);
  box-shadow: 0 0 0 1px rgba(214, 211, 254, .2), 0 18px 44px rgba(0, 0, 0, .34);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.play:hover .pill { transform: translateY(-2px); }
.play .disc {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(44px, 4.6vw, 62px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--wisteria);
  color: var(--oxblood);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.play .disc svg { width: 44%; height: 44%; fill: currentColor; transform: translateX(5%); }
.play:hover .disc { transform: scale(1.06); }
.play:focus-visible { outline: 2px solid var(--wisteria); outline-offset: -6px; border-radius: inherit; }
.play .words { display: grid; gap: 4px; min-width: 0; }
.play .label { font-weight: 600; font-size: clamp(15px, 1.5vw, 19px); letter-spacing: -.015em; line-height: 1.1; }
.play .meta { font: 400 12px/1.3 var(--mono); letter-spacing: .02em; color: rgba(247, 245, 242, .78); }

/* chapters: a rail under the film, each part as wide as it is long */
.chapters { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 20fr 32.5fr 25fr 50fr 27.5fr 28.5fr; gap: 6px; }
.chapters li { min-width: 0; }
.chapters button {
  --p: 0;
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 15px 2px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .2s;
}
.chapters button::before, .chapters button::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; border-radius: 2px; }
.chapters button::before { width: 100%; background: var(--line); transition: background .2s; }
.chapters button::after { width: calc(var(--p) * 100%); background: var(--wisteria); }
.chapters time { font: 500 12px/1 var(--mono); color: var(--wisteria); }
.chapters span { overflow: hidden; font-size: 14.5px; font-weight: 500; line-height: 1.25; letter-spacing: -.008em; white-space: nowrap; text-overflow: ellipsis; }
.chapters button:hover, .chapters button.now { color: var(--text); }
.chapters button:hover::before { background: rgba(214, 211, 254, .32); }
.chapters button:focus-visible { outline: 2px solid var(--wisteria); outline-offset: 4px; border-radius: 4px; }

/* ---- what the film is about ---- */
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); margin-top: clamp(44px, 6vw, 80px); }
.counts p { margin: 0; display: flex; align-items: baseline; gap: 14px; }
.counts b { font: 500 clamp(44px, 5.4vw, 72px)/1 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.counts span { font: 400 13px/1.35 var(--mono); letter-spacing: .01em; color: var(--muted); max-width: 26ch; text-wrap: balance; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); margin-top: clamp(28px, 3.4vw, 44px); }
.pillars article { border-top: 1px solid var(--line); padding-top: 22px; }
.pillars h2 { margin: 0 0 10px; font-size: clamp(19px, 1.75vw, 23px); font-weight: 500; line-height: 1.2; letter-spacing: -.022em; color: var(--muted); }
.pillars h2 b { font-weight: 600; color: var(--text); }
.pillars h2 em { font: italic 400 1.14em/1 var(--serif); letter-spacing: -.015em; color: var(--wisteria); }
.pillars p { margin: 0; font-size: 16px; line-height: 1.56; color: var(--muted); text-wrap: pretty; }

/* ---- the narration, for anyone who would rather read ---- */
.script { margin-top: clamp(48px, 6.4vw, 88px); border-top: 1px solid var(--line); }
.script summary { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; font-weight: 500; letter-spacing: -.01em; list-style: none; cursor: pointer; }
.script summary::-webkit-details-marker { display: none; }
.script summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--wisteria); }
.script[open] summary::after { content: "\2212"; }
.script summary:focus-visible { outline: 2px solid var(--wisteria); outline-offset: 2px; border-radius: 4px; }
.script .acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); padding: 8px 0 30px; }
.script h3 { margin: 0 0 12px; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--wisteria); }
.script .acts p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; color: var(--muted); }

footer { display: grid; gap: 8px; padding: 26px 0 60px; border-top: 1px solid var(--line); }
footer p { margin: 0; }
footer .by { font-weight: 500; letter-spacing: -.01em; }
footer .note { max-width: 80ch; font-size: 14px; line-height: 1.55; color: var(--muted); }

@media (max-width: 860px) {
  .hero, .counts, .pillars, .script .acts { grid-template-columns: 1fr; }
  .hero { gap: 20px; }
  .lede { max-width: 56ch; }
  .counts { gap: 14px; }
  .counts span { max-width: none; }
  .script .acts { gap: 22px; }
}
@media (max-width: 760px) {
  .top { flex-wrap: wrap; row-gap: 8px; padding: 18px 0; }
  .lock { gap: 9px; font-size: 14.5px; }
  .mark { width: 22px; height: 22px; }
  .builton { gap: 8px; font-size: 12.5px; }
  .builton img { height: 14px; }
  /* on a small poster the pill is just the button and its name */
  .play .pill { padding: 7px 18px 7px 7px; }
  .play .disc { width: 38px; }
  .play .meta { display: none; }
  .chapters { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .play .pill, .play .disc, .chapters button, .chapters button::before { transition: none; }
}
