/* Flatbed · the site · Night
   Base rules give the page with no JavaScript and with reduced motion: sections stack, every picture is a still.
   Rules under .motion (set by the inline script in <head>) turn the night into one pinned stage that scroll plays. */

@font-face { font-family: "Avio Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/avio-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Avio Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/avio-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Commit Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/commit-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/caveat-700.woff2") format("woff2"); }
/* Arial and Courier New cut to the web fonts' measure (tools/subset-fonts.py prints these), so the swap moves nothing. */
@font-face { font-family: "Avio Fallback"; font-weight: 400; src: local("Arial"); size-adjust: 108.40%; ascent-override: 89.37%; descent-override: 22.25%; line-gap-override: 0%; }
@font-face { font-family: "Avio Fallback"; font-weight: 600; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 102.73%; ascent-override: 94.30%; descent-override: 23.48%; line-gap-override: 0%; }
@font-face { font-family: "Mono Fallback"; src: local("Courier New"); size-adjust: 99.98%; ascent-override: 90.01%; descent-override: 20.00%; line-gap-override: 0%; }

:root {
  --well: #090909;
  --ink: #ededed;
  --bone: #e6d6b4;
  --on-bone: #17140d;
  --grey: #a6a6a6;
  --quiet: #858585;
  --m: clamp(20px, 5vw, 72px);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --ui: cubic-bezier(0.23, 1, 0.32, 1);
  --bh: 100vh;
  --slot-b: 30px;
}
@supports (height: 100svh) { :root { --bh: 100svh; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--well); color: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.5 "Avio Sans", "Avio Fallback", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
h1, h2, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img, video, canvas, svg { display: block; }
::selection { background: var(--bone); color: var(--on-bone); }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }

.mono { font-family: "Commit Mono", "Mono Fallback", ui-monospace, "SF Mono", Menlo, monospace; font-weight: 400; font-size: 0.8125rem; letter-spacing: 0.02em; }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--bone); color: var(--on-bone); font-weight: 600; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
main:focus { outline: none; } /* the skip link's landing place: it takes focus, it is not a control */

/* a headline is set in lines; each line is a mask its text can rise through */
h1, h2 { font-weight: 600; letter-spacing: -0.03em; line-height: 0.98; text-wrap: balance; }
.line { display: block; overflow: hidden; padding: 0.1em 0.08em 0.17em; margin: -0.1em -0.08em -0.17em; }
.line__in { display: block; }
h1 { font-size: clamp(2.875rem, 6.7vw, 7.5rem); }
h2 { font-size: clamp(2.25rem, 5vw, 5.75rem); }
.lede { font-size: clamp(1.0625rem, 1.5vw, 1.375rem); line-height: 1.4; color: var(--ink); max-width: 27em; }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--bone); color: var(--on-bone); font-weight: 600; font-size: 1rem; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; transition: transform 160ms var(--ui), background-color 200ms ease, color 200ms ease, opacity 200ms ease; }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.btn--quiet { height: 40px; padding: 0 18px; font-size: 0.9375rem; background: rgba(237, 237, 237, 0.11); color: var(--ink); }
.watch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 1rem; color: var(--ink); cursor: pointer; }
.watch .ico { width: 18px; height: 18px; fill: currentColor; stroke-width: 1.5; transition: transform 200ms var(--ui); }
.watch__time { color: var(--grey); font-weight: 400; margin-left: 2px; }
.watch--nav { font-size: 0.9375rem; font-weight: 400; gap: 8px; }
.watch--nav .ico { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #f1e5c9; }
  .btn--quiet:hover { background: var(--bone); color: var(--on-bone); }
  .watch:hover .ico { transform: translateX(2px); }
}

/* ---------- nav ---------- */
.nav { position: absolute; z-index: 40; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; height: 76px; padding: 0 var(--m); transition: transform 320ms var(--ui); }
.js .nav { position: fixed; }
.nav.is-away { transform: translateY(-110%); }
@media (prefers-reduced-motion: reduce) {
  .nav { transition: opacity 200ms ease, visibility 200ms; }
  .nav.is-away { transform: none; opacity: 0; visibility: hidden; }
}
.nav__logo { display: flex; align-items: center; min-height: 44px; }
.lockup { height: 22px; width: auto; aspect-ratio: 9462.45 / 1583; }
.lockup__mark { fill: var(--bone); }
.lockup__word { fill: var(--ink); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.9375rem; color: var(--ink); transition: color 200ms ease; }
.nav__link[aria-current="page"] { color: var(--bone); }
@media (hover: hover) and (pointer: fine) { .nav__link:hover { color: var(--bone); } }
@media (max-width: 960px) { .watch--nav { display: none; } }

/* ---------- pictures: a 16:9 frame placed inside a clipping box, so marks drawn in % of the frame stay on the picture ---------- */
.pic, .ink { position: absolute; inset: 0; overflow: hidden; }
.pic { background: var(--well); }
.ink { pointer-events: none; z-index: 2; } /* above the picture's edge falloff: a mark is never dimmed */
.frame {
  --cover: max(100vw, calc(var(--bh) * 16 / 9));
  --fw: calc(var(--k, 1) * var(--cover));
  position: absolute;
  width: var(--fw);
  aspect-ratio: 16 / 9;
  left: calc(var(--ax, 0.5) * 100% - var(--fx, 0.5) * var(--fw));
  top: calc(var(--ay, 0.5) * 100% - var(--fy, 0.5) * var(--fw) * 0.5625);
  container-type: inline-size;
}
.frame img, .frame video, .frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* fine film grain over the picture, under the type: one small tile, static. The 1280 x 720 pictures need less of it than the old 960 ones did. */
.pic::after { content: ""; position: absolute; inset: 0; background: url("../media/grain.png") 0 0 / 160px 160px; opacity: 0.14; pointer-events: none; }
@media (min-resolution: 2dppx) { .pic::after { background-size: 80px 80px; opacity: 0.2; } }
/* a frame that does not fill its box melts into the black at its edges */
.frame--float { -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 86%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 86%, transparent); mask-composite: intersect; }

/* ---------- 0 · hero ---------- */
.hero { position: relative; height: var(--bh); min-height: 560px; display: flex; align-items: center; --k: 1.06; --fx: 0.535; --ax: 0.78; --fy: 0.5; --ay: 0.5; }
/* The lit still is the picture. With motion, the film's first frame (the lamp not yet on) lies over it from the first paint,
   and the clip, which starts on that same frame, lies over both once it plays. */
.hero__first, .hero__clip { display: none; }
.motion .hero__first { display: block; }
.motion .hero__clip { display: block; visibility: hidden; }
.motion .hero__clip.is-on { visibility: visible; }
.hero__text { position: relative; z-index: 2; padding: 0 var(--m); margin-top: 2vh; }
.hero .lede { margin-top: clamp(20px, 3vh, 30px); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; margin-top: clamp(26px, 4.4vh, 40px); }
.slot { position: absolute; z-index: 3; left: var(--m); bottom: var(--slot-b); color: var(--ink); }
.slot.mono { color: var(--grey); }
.cue { position: absolute; z-index: 3; right: var(--m); bottom: calc(var(--slot-b) - 2px); width: 20px; height: 20px; color: var(--quiet); }

/* ---------- 1 · notes ---------- */
.notes { position: relative; overflow: clip; }
.beat { position: relative; height: var(--bh); --bh: min(100svh, 56.25vw); }
.beat--boots { --nx: 64.8%; --ny: 42%; --hw: 4.1cqw; }
.beat--warm { --nx: 45.6%; --ny: 33.4%; --hw: 4.1cqw; }
.beat--moon { --nx: 55.6%; --ny: 17.5%; --hw: 4.1cqw; }
.pencil { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pencil path { fill: none; stroke: var(--bone); stroke-width: var(--sw, 2.4); stroke-linecap: round; stroke-linejoin: round; }
.pencil .dash { stroke-dasharray: 13 12; }
.pencil .draw--mask { stroke: #fff; stroke-width: 14; stroke-linecap: butt; }
.note { position: absolute; left: var(--nx); top: var(--ny); white-space: nowrap; }
.beat--moon .note { text-align: center; translate: -50% 0; }
.hw { display: block; font: 700 var(--hw) / 1 "Caveat", "Bradley Hand", cursive; color: var(--bone); padding: 0.12em 0.1em 0.2em; margin: -0.12em -0.1em -0.2em; }
.ack { display: block; margin: 0.55em 0 0 0.6em; font-size: max(1rem, 1.3cqw); color: #d4d4d4; }
.beat--moon .ack { margin-left: 0; }
/* the frame steps back while a note is given, and comes up again as the next cut plays */
.dim { position: absolute; inset: -1px; opacity: 0; background: rgba(9, 9, 9, 0.4); }
/* the edges fall off a little so the lines at the top and bottom of the screen sit on dark */
.beat .pic::before, .pic--plain::before { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9, 9, 9, 0.42), rgba(9, 9, 9, 0) 15%, rgba(9, 9, 9, 0) 76%, rgba(9, 9, 9, 0.62)); }
/* stills: the line sits at the foot of the last of the three pictures, where it is on dark. (It used to ride the foot of
   the screen through all three, and crossed the bright parts of each on the way: as low as 1:1.) */
.slot--notes { font-size: clamp(1rem, 1.35vw, 1.25rem); white-space: nowrap; }
/* stills only (reduced motion): the moon is already lit, so its note sits beside it */
@media (prefers-reduced-motion: reduce) {
  .beat--moon { --nx: 80%; --ny: 62%; }
  .beat--moon .pencil { display: none; }
}

/* ---------- 2 · crew: the headline over the plain, the four tools along the foot of the screen ---------- */
.crew { position: relative; min-height: var(--bh); --bh: min(100svh, 56.25vw); display: flex; flex-direction: column; padding: clamp(96px, 14.5vh, 150px) var(--m) clamp(44px, 7.2vh, 72px); }
.crew__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(9, 9, 9, 0) 50%, rgba(9, 9, 9, 0.84) 76%, rgba(9, 9, 9, 0.95) 91%, var(--well)); }
.crew__head, .tools { position: relative; z-index: 2; }
.tools { margin-top: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tools li { display: grid; gap: 4px; justify-items: start; }
.tools .ico { width: 28px; height: 28px; margin-bottom: 14px; color: var(--ink); }
.tools__name { font-weight: 600; font-size: clamp(1.0625rem, 1.5vw, 1.375rem); letter-spacing: -0.01em; line-height: 1.2; }
.tools__with { color: var(--grey); }

/* ---------- 3 · film ---------- */
.film { position: relative; background: var(--well); }
.film__stage { min-height: var(--bh); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 96px); padding: 96px var(--m); }
.stand { justify-self: end; width: min(27vw, 42vh, 420px); margin-right: clamp(0px, 4vw, 64px); }
.stand__case { position: relative; aspect-ratio: 384 / 588; padding: 1.6%; background: #f6f2e6; container-type: inline-size; }
.face { position: absolute; inset: 1.6%; overflow: hidden; text-align: center; }
.face--blank { background: #ebe8e1; color: #262523; }
.face__x { position: absolute; left: 8%; top: 5.5%; width: 84%; height: 50%; fill: none; stroke: #b4b0a6; stroke-width: 1; }
.face__x * { vector-effect: non-scaling-stroke; }
.face__big { position: absolute; left: 0; right: 0; top: 62%; font-weight: 600; font-size: 14.2cqw; line-height: 1.06; letter-spacing: 0.05em; }
.face--made { background: #05071a; color: #f3eedd; }
.face__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.face__title { position: absolute; left: 0; right: 0; top: 72.5%; font-weight: 600; font-size: 9.4cqw; line-height: 1.07; letter-spacing: 0.02em; }
.face__by { position: absolute; left: 0; right: 0; top: 89%; font-size: 4.4cqw; letter-spacing: 0.06em; color: var(--bone); }
.stand__scan { position: absolute; inset: 1.6%; overflow: hidden; pointer-events: none; opacity: 0; }
.stand__scan i { position: absolute; inset: 0; }
.stand__scan i::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: #fffbe8; }
.stand__post { width: 30%; height: clamp(28px, 6vh, 56px); margin: 0 auto; background: #161616; }
.film__text { justify-self: start; }
.film__meta { margin-top: clamp(20px, 3vh, 30px); color: var(--grey); }
.playbtn { display: grid; place-items: center; width: 92px; height: 92px; margin-top: clamp(30px, 5vh, 48px); border-radius: 50%; background: var(--ink); color: var(--well); cursor: pointer; transition: transform 200ms var(--ui), background-color 200ms ease; }
.playbtn .ico { width: 30px; height: 30px; fill: currentColor; translate: 2px 0; }
.playbtn:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .playbtn:hover { transform: scale(1.05); background: #fff; } .playbtn:hover:active { transform: scale(0.97); } }

/* ---------- 4 · close ---------- */
.close { position: relative; min-height: var(--bh); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 6vw, 96px); padding: 120px var(--m) 132px; background: var(--well); }
.close h2 { font-size: clamp(min(3.25rem, 13.2vw), 8.6vw, 8rem); white-space: nowrap; } /* one line, and inside the margins down to 320 wide */
/* the form: what they would make (optional), then the address and the button in one pill */
.invite { display: grid; gap: 10px; width: min(100%, 35rem); margin-top: clamp(36px, 6vh, 56px); }
.invite__row { display: flex; align-items: center; height: 64px; padding: 6px; border-radius: 999px; background: #191919; transition: background-color 200ms ease; }
.invite__row:focus-within { background: #212121; }
.invite input { flex: 1; min-width: 0; height: 100%; padding: 0 20px 0 22px; border: 0; background: none; font-size: 1.0625rem; outline: none; border-radius: 999px; }
.invite .invite__make { height: 56px; padding: 0 28px; background: #141414; transition: background-color 200ms ease; }
.invite .invite__make:focus { background: #1c1c1c; }
.invite input::placeholder { color: var(--quiet); }
.invite input:focus-visible { outline: 2px solid var(--bone); outline-offset: -2px; }
.invite .btn { flex: none; }
/* what the form has to say, under the field. The line keeps its room when it is empty, so nothing moves when it speaks. */
.invite__status { min-height: 1.5rem; margin: 12px 0 0 28px; font-size: 0.9375rem; line-height: 1.5rem; color: var(--ink); }
.terms { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 10px 0 0 28px; font-size: 0.875rem; line-height: 1.25rem; color: var(--grey); }
.terms li { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.terms .ico { width: 16px; height: 16px; }
/* three in a row needs about 650 px beside the poster; with less they are a short list, never two and one */
@media (max-width: 1120px) { .terms { flex-direction: column; gap: 8px; } }
.stand--blank { justify-self: end; width: min(19vw, 30vh, 290px); margin: 0 clamp(0px, 7vw, 110px) 0 0; }
.foot { position: absolute; left: var(--m); right: var(--m); bottom: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--quiet); }
.foot .mark { width: 20px; height: 20px; fill: var(--bone); }
/* the site's links, the same on every page: pricing, the legal pages, contact */
.foot__links { display: flex; flex-wrap: wrap; gap: 0 22px; margin-left: 18px; }
.foot__links a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--quiet); font-size: 0.875rem; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .foot__links a:hover { color: var(--ink); } }
.close__in { margin: 4px 0 0 28px; color: var(--grey); font-size: 0.9375rem; }
.close__in a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(237, 237, 237, 0.35); text-underline-offset: 0.2em; }

/* ---------- the film player ---------- */
.player { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 5, 5, 0.97); color: var(--ink); overflow: hidden; }
.player:not([open]) { display: none; }
.player[open] { display: grid; place-items: center; }
.player::backdrop { background: #050505; }
/* the film is 960 x 540: it is shown no wider than 1280 */
.player__box { position: relative; width: min(92vw, calc((100dvh - 150px) * 16 / 9), 1280px); }
.player__box video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; cursor: pointer; }
.player__bar { display: flex; align-items: center; gap: 14px; height: 56px; margin-top: 6px; }
.player__btn { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: none; cursor: pointer; transition: transform 160ms var(--ui), background-color 200ms ease; }
.player__btn:active { transform: scale(0.94); }
.player__btn .ico { width: 20px; height: 20px; }
#pPlay .ico { fill: currentColor; }
.player__btn .ico--play, .player__btn .ico--off { display: none; }
.player__btn.is-paused .ico--play, .player__btn.is-muted .ico--off { display: block; }
.player__btn.is-paused .ico--pause, .player__btn.is-muted .ico--on { display: none; }
.player__time { color: var(--grey); min-width: 4ch; font-variant-numeric: tabular-nums; }
.player__seek { flex: 1; min-width: 0; height: 44px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; --p: 0%; }
.player__seek::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--ink) var(--p), rgba(237, 237, 237, 0.2) var(--p)); }
.player__seek::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(237, 237, 237, 0.2); }
.player__seek::-moz-range-progress { height: 3px; border-radius: 3px; background: var(--ink); }
.player__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: var(--ink); transition: transform 160ms var(--ui); }
.player__seek::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--ink); }
.player__close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(237, 237, 237, 0.1); cursor: pointer; transition: transform 160ms var(--ui), background-color 200ms ease; }
.player__close:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .player__btn:hover, .player__close:hover { background: rgba(237, 237, 237, 0.16); }
  .player__seek:hover::-webkit-slider-thumb { transform: scale(1.25); }
}
.player__box:fullscreen { width: 100vw; height: 100vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: #000; }
.player__box:fullscreen video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }
.player__box:fullscreen .player__bar { margin: 0; padding: 0 16px; }
.curtain { position: fixed; inset: 0; z-index: 60; background: var(--well); opacity: 0; pointer-events: none; transition: opacity 420ms ease; }
.curtain.is-down { opacity: 1; transition-duration: 220ms; }

/* Lenis: the page scrolls itself; a stopped page (the player is open) does not scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- 404: the same stop, the lamp not on ---------- */
.lost { position: relative; min-height: var(--bh); display: flex; align-items: center; --k: 1.06; --fx: 0.535; --ax: 0.78; --fy: 0.5; --ay: 0.5; }
.lost__text { position: relative; z-index: 2; padding: 0 var(--m); }
.lost .back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: clamp(22px, 4vh, 36px); font-weight: 600; }
.lost .back .ico { width: 18px; height: 18px; transition: transform 200ms var(--ui); }
@media (hover: hover) and (pointer: fine) { .lost .back:hover .ico { transform: translateX(-2px); } }

/* ============================================================
   Motion: one pinned stage. Everything hidden here is hidden only under .motion.
   ============================================================ */
@supports (height: 100lvh) { .motion { --bh: 100lvh; } }
.motion .night { --run: 508; height: calc(var(--bh) + var(--run) * 1vh); }
.motion .stage { position: sticky; top: 0; height: var(--bh); overflow: hidden; background: var(--well); }
.motion .hero, .motion .beat, .motion .crew { position: absolute; inset: 0; height: auto; min-height: 0; --bh: inherit; }
.motion .notes { position: static; overflow: visible; }
.motion .beat--boots { z-index: 1; }
.motion .beat--warm { z-index: 2; }
.motion .beat--moon { z-index: 3; }
.motion .slot--notes { z-index: 4; }
.motion .crew { z-index: 5; pointer-events: none; }
.motion .hero { z-index: 6; }
.motion .pic--plain { display: none; }
.motion .beat--warm .pic, .motion .beat--moon .pic, .motion .ink, .motion .slot--notes, .motion .crew__scrim { opacity: 0; }
.motion .hero .line__in { transform: translateY(112%); }
.motion [data-intro] { opacity: 0; }
.motion .film { height: calc(var(--bh) + 70vh); }
.motion .film__stage { position: sticky; top: 0; height: var(--bh); min-height: 0; }
.motion .slot { bottom: max(var(--slot-b), calc(100lvh - 100dvh + 22px)); }

/* ============================================================
   Portrait: the frame is wider than the screen, so each picture gets its own crop and the notes move into it.
   ============================================================ */
@media (max-aspect-ratio: 5/4) {
  /* first screen: the words are set from the bottom and the picture sits above them, smaller on a short screen so the lamp clears the nav */
  .hero, .lost { --ax: 0.54; --fx: 0.53; align-items: flex-end; }
  .hero .frame, .lost .frame { --fw: min(250vw, calc((100svh - 32.6rem) * 3.26)); top: calc(100svh - 28.6rem - var(--fw) * 0.4219); }
  .hero__text { margin: 0; padding-bottom: calc(var(--slot-b) + 3.4rem); }
  .motion .hero__text { padding-bottom: calc(var(--slot-b) + 3.4rem + 100lvh - 100svh); }
  .lost__text { padding-bottom: 6.5rem; }
  .beat { --bh: 68svh; }
  .beat--boots { --fx: 0.552; --nx: 57.4%; --ny: 21%; --hw: max(1.5rem, 2.2cqw); }
  .beat--boots .draw--lead { visibility: hidden; }
  .beat--warm { --fx: 0.5; --nx: 45%; --ny: 34.6%; --hw: max(1.75rem, 2.45cqw); }
  /* the moon is wider than a phone at full height, so its frame is a band across the top that melts into the black below;
     the band is shorter on a short screen, to leave the words their room */
  .beat--moon, .crew { --mfw: min(240vw, calc((100svh - 19.8rem) * 1.778)); }
  .beat--moon { --hw: max(1.75rem, 3.75vw); --nx: 55.6%; --ny: 106%; height: calc(var(--mfw) * 0.5625 + 9.5rem); }
  .frame--moon { --fw: var(--mfw); left: calc(50% - var(--mfw) * 0.555); top: 0; }
  .pic .frame--moon { -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent); mask-image: linear-gradient(180deg, #000 80%, transparent); }
  .crew { --bh: 100svh; padding-top: calc(var(--mfw) * 0.29); }
  .motion .crew { padding-bottom: max(40px, calc(100lvh - 100dvh + 30px)); }
  .crew__head { margin-top: auto; }
  .tools { margin-top: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
  .tools .ico { margin-bottom: 8px; }
  .crew__scrim { background: linear-gradient(180deg, rgba(9, 9, 9, 0) calc(100% - 33rem), rgba(9, 9, 9, 0.86) calc(100% - 27rem), var(--well) calc(100% - 24.5rem)); }
  .motion .beat--moon { height: auto; }
}

/* ============================================================
   Phone
   ============================================================ */
@media (max-width: 720px) {
  :root { --slot-b: 22px; }
  .mono { font-size: 0.8125rem; }
  .nav { height: 64px; }
  .lockup { height: 19px; }
  .watch--nav { display: none; }
  .btn--quiet { height: 44px; padding: 0 16px; font-size: 0.875rem; }
  .hero .lede { margin-top: 14px; max-width: 19em; }
  .actions { margin-top: 22px; gap: 6px 20px; }
  .cue { display: none; }
  .motion .night { height: calc(var(--bh) + var(--run) * 0.72vh); }
  .crew { padding-bottom: 40px; }
  .film__stage { grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: start; gap: 26px; padding: max(64px, 9svh) var(--m) 32px; }
  .stand { justify-self: start; width: min(56vw, 27svh); margin: 0; }
  .playbtn { width: 76px; height: 76px; margin-top: 24px; }
  .playbtn .ico { width: 26px; height: 26px; }
  .film__meta { margin-top: 14px; }
  .close { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 36px; padding: 96px var(--m) 120px; }
  .stand--blank { order: -1; justify-self: start; width: min(40vw, 22svh); margin: 0; }
  .invite { margin-top: 30px; }
  .invite__row { flex-direction: column; align-items: stretch; height: auto; gap: 10px; padding: 0; border-radius: 0; background: none; }
  .invite__row:focus-within { background: none; }
  .invite input { height: 56px; flex: none; background: #191919; }
  .invite .invite__make { padding: 0 20px 0 22px; }
  .invite .btn { height: 56px; }
  .invite__status { margin-left: 0; }
  .terms { gap: 10px; margin-left: 0; }
  .terms li { white-space: normal; }
  .nav__links { gap: 22px; }
  .nav__links .btn--quiet { display: none; }
  .close__in { margin-left: 0; }
  /* the form and its lines are taller here: the foot follows them instead of sitting on the screen's edge */
  .close { padding-bottom: 28px; }
  .foot { position: static; margin-top: 20px; }
  .foot__links { margin-left: 0; width: 100%; gap: 0 18px; }
}

/* A phone on its side, or a very short window: the headline follows the height */
@media (max-height: 560px) and (min-aspect-ratio: 5/4) {
  h1 { font-size: min(6.7vw, 11vh); }
  h2 { font-size: min(5vw, 10vh); }
  .hero, .lost { min-height: 0; }
  .watch--nav { display: none; }
  .hero__text { margin-top: 44px; }
  .hero .lede { margin-top: 10px; }
  .actions { margin-top: 12px; }
  .btn { height: 44px; }
  .crew { padding-top: 15vh; padding-bottom: 24px; }
  .crew__scrim { background: linear-gradient(180deg, rgba(9, 9, 9, 0.35), rgba(9, 9, 9, 0.8) 46%, var(--well) 84%); }
  .tools .ico { margin-bottom: 6px; }
}
@media (max-width: 380px) {
  .film__meta { font-size: 0.75rem; letter-spacing: 0; }
}
/* the narrowest phones: the headline keeps to three lines, and the picture gets the line it saves */
@media (max-width: 340px) and (max-aspect-ratio: 5/4) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  .hero .frame { --fw: min(250vw, calc((100svh - 29.6rem) * 3.26)); top: calc(100svh - 25.6rem - var(--fw) * 0.4219); }
  /* the film's screen has to hold the poster, the headline and the button in 568 px */
  .film__stage { gap: 20px; padding: 52px var(--m) 24px; }
  .stand { width: min(48vw, 22svh); }
  .film__meta, .stand .face__by { font-size: 0.6875rem; }
  .playbtn { width: 64px; height: 64px; margin-top: 16px; }
}
