/* Variant B v7d, "The exhibition". Plan: ../_design/b-v7d-gallery-plan.md. Nav, hero, finale and footer kept from b-v6-showreel. */
:root {
  --screen: #000000;
  --paper: #F4F1FA;
  --dim: #A9A4B6;
  --violet: #A98BFF;
  --projector: linear-gradient(160deg, #A98BFF 0%, #D98BE0 50%, #E8A84C 100%);
  --raised: #111014;          /* placeholder behind media before a poster arrives */
  --edge: rgba(244, 241, 250, .09);

  --display: "Cormorant", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --text: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* type scale: perfect fifth from 17 */
  --t-14: 14px;
  --t-17: 17px;
  --t-21: 21px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-heading: clamp(40px, 3.9vw, 58px);
  --t-display: clamp(56px, 6.2vw, 116px);

  --gutter: clamp(16px, 5vw, 72px);
  --max: 1240px;
  --pad: 80px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--screen);
  color: var(--paper);
  font-family: var(--text);
  font-size: var(--t-17);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
/* Safari draws its own play icon over a clip it will not autoplay (Low Power Mode); the page starts the clips on the first tap instead. */
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button, video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
a { color: inherit; }
figure { margin: 0; }
h1, h2, h3, p, dl, dd { margin: 0; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 8px; }
.skip {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--paper); color: var(--screen); text-decoration: none; font-weight: 500;
}
.skip:focus { top: 12px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px max(var(--gutter), calc((100vw - var(--max)) / 2));
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.nav { border-bottom: 1px solid transparent; }
.nav.solid { background: #000; border-bottom-color: var(--edge); }
.wordmark { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.wordmark .mark { width: 30px; height: 30px; flex: none; }
.wordmark.small .mark { width: 26px; height: 26px; }
.wordmark.small { font-size: 26px; }
.nav-end { display: flex; align-items: center; gap: 12px; }
.nav-badge { display: flex; align-items: center; min-height: 44px; border-radius: 8px; }
.nav-badge img { height: 36px; width: auto; }

/* ---------- premiere (hero) ---------- */
.premiere {
  min-height: min(100vh, 1000px); min-height: min(100svh, 1000px);
  padding: 88px var(--gutter) 56px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 40px;
}
.premiere-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(28px, 3.4vw, 56px);
  width: 100%; max-width: 1360px;
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t-display);
  line-height: .9;
  letter-spacing: -.01em;
}
.half { white-space: nowrap; }
.imagine { justify-self: end; }
.create { justify-self: start; }
.film {
  position: relative;
  display: block;
  height: min(60vh, 60svh, 600px);
  min-height: 380px;
  aspect-ratio: 9 / 16;
}
.film .light {
  position: absolute; inset: 4% -22%;
  background: var(--projector);
  opacity: .32;
  border-radius: 50%;
  pointer-events: none;
}
.film video {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 18px;
  background: var(--raised);
}
/* Low Power Mode: Safari will not autoplay a video, so an animated image of the hero loops over it instead. */
.film .hero-anim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; animation: anim-in 300ms var(--ease-out) both; }
@keyframes anim-in { from { opacity: 0; } to { opacity: 1; } }
.premiere-foot { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.lede { font-size: var(--t-21); line-height: 1.45; color: var(--dim); max-width: 30em; text-wrap: balance; }
.badge { display: inline-block; border-radius: 12px; }
.badge img { height: 54px; width: auto; }
.fine { font-size: var(--t-14); color: var(--dim); max-width: 36em; text-wrap: balance; }

/* the one orchestrated moment: the frame opens and the line settles */
@keyframes frame-open { from { clip-path: inset(0 49% round 18px); } to { clip-path: inset(0 0 round 18px); } }
@keyframes light-up { from { opacity: 0; } to { opacity: .32; } }
@keyframes settle-left { from { transform: translateX(42px); } to { transform: none; } }
@keyframes settle-right { from { transform: translateX(-42px); } to { transform: none; } }
/* the page's one orchestrated moment; everything else is on 200/300 ms tokens */
.film video { animation: frame-open 900ms cubic-bezier(.65, 0, .25, 1) 100ms both; will-change: clip-path; }
.film .light { animation: light-up 1200ms var(--ease-out) 600ms both; }
.imagine { animation: settle-left 1000ms var(--ease-out) 100ms both; }
.create { animation: settle-right 1000ms var(--ease-out) 100ms both; }
/* hold the opening on its slit until the clip is actually playing (main.js adds .go; 8 s fallback) */
.js .premiere:not(.go) .film video, .js .premiere:not(.go) .film .light, .js .premiere:not(.go) .half { animation-play-state: paused; }


/* ---------- finale ---------- */
.finale {
  text-align: center;
  padding: 120px var(--gutter) 128px;
  display: flex; flex-direction: column; align-items: center; gap: 36px;
}
.finale-line {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(48px, 5.6vw, 96px); line-height: .95; letter-spacing: -.01em;
  text-wrap: balance;
}

/* ---------- footer ---------- */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px;
  padding: 28px max(var(--gutter), calc((100vw - var(--max)) / 2)) 44px;
  border-top: 1px solid var(--edge);
  color: var(--dim); font-size: var(--t-14);
}
.footer nav { display: flex; gap: 24px; }
.footer a { text-decoration: none; color: var(--dim); display: inline-flex; align-items: center; min-height: 44px; }
.footer a:hover { color: var(--paper); }
.footer .wordmark { color: var(--paper); margin-inline-end: auto; }

@media (max-width: 860px) {
  .premiere { gap: 28px; padding-top: 84px; }
  .premiere-line { grid-template-columns: 1fr; row-gap: 18px; justify-items: center; text-align: center; }
  .imagine, .create { justify-self: center; }
  .film { height: min(54vh, 54svh, 560px); min-height: 320px; }
}

@media (max-width: 700px) {
  :root { --pad: 56px; }
  body { font-size: 16px; }
  .nav { padding: 12px 16px; }
  .wordmark { font-size: 27px; }
  .nav-badge img { height: 32px; }
  .nav-end { gap: 8px; }
  .premiere { padding: 76px 16px 48px; }
  .premiere-line { font-size: 54px; }
  .film { height: min(48vh, 48svh, 520px); min-height: 300px; }
  .lede { font-size: 18px; }
  .badge img { height: 50px; }
  .finale { padding: 96px 16px; gap: 28px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 4px; padding: 28px 16px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .film video, .film .light, .imagine, .create { animation: none; }
  .nav { transition: none; }
}

/* the hero's light spills past the screen edge on phones; clip it sideways so the page never scrolls horizontally */
.premiere { overflow-x: clip; }

/* projector light without CSS blur filters (iOS Safari draws blurred boxes as hard rectangles) */
.film .light { filter: none !important; inset: -12% -60%; border-radius: 0;
  background: radial-gradient(closest-side, rgba(169,139,255,.55), rgba(217,139,224,.28) 45%, rgba(232,168,76,.10) 70%, transparent) !important; }


/* no flash: each clip sits on its poster and fades in only once it is really playing */
.screen video:not([data-hero]) { opacity: 0; transition: opacity 300ms var(--ease-out); }
.screen video.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .screen video:not([data-hero]) { transition: none; } }

/* ==========================================================================
   The exhibition (below the hero). One framing device per level:
   room = a top rule and one header (name in the margin column, wall text beside it);
   work = the mat (thin frame + generous padding); placard = plain text in a fixed spot under the mat.
   The only gradient is light: a ceiling wash above each room's principal work and the lit studio work.
   ========================================================================== */
.gallery {
  --mat: #08070A;
  --frame: rgba(244, 241, 250, .2);
  --hair: rgba(244, 241, 250, .16);
  --matpad: 20px;
  --hang: 840px;
  --margin-col: 260px;   /* the feature name and its sentence sit in this column */
  --col-gap: 48px;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 48px var(--gutter) 0;
}

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* a room: one top rule; the feature name and one outcome sentence sit in the left column, the works on the right */
.room {
  position: relative; margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--hair);
  display: grid; grid-template-columns: var(--margin-col) minmax(0, 1fr); column-gap: var(--col-gap); align-items: start;
  overflow: hidden; overflow: clip; scroll-margin-top: 80px;
}
.room:first-of-type { margin-top: 24px; }
.room-head { position: relative; z-index: 1; }
.room-name { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 2.6vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
.wall-line { margin-top: 12px; color: var(--dim); font-size: var(--t-17); line-height: 1.55; text-wrap: pretty; }
.room-body { min-width: 0; padding-top: 8px; }

/* the mat: same everywhere */
.work { position: relative; min-width: 0; }
.mat { position: relative; z-index: 1; border: 1px solid var(--frame); background: var(--mat); padding: var(--matpad); }
.screen {
  position: relative; overflow: hidden; aspect-ratio: var(--ar, 4 / 5);
  background-color: #111014; background-size: cover; background-position: var(--pos, 50% 50%);
  box-shadow: 0 0 0 1px rgba(244, 241, 250, .06);
}
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }

/* the placard: plain text, always 12 px under the mat, on the mat's left edge */
.placard { position: relative; z-index: 1; margin-top: 12px; }
.pl-title { font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.25; }
.pl-title cite { font-style: italic; }
.pl-medium { font-size: var(--t-14); line-height: 1.45; color: var(--dim); }

/* ceiling light above a principal work (radial gradient, never a blur filter) */
.wash {
  position: absolute; z-index: 0; left: -12%; right: -12%; top: -96px; height: 70%;
  background: radial-gradient(closest-side, rgba(169, 139, 255, .22), rgba(217, 139, 224, .10) 50%, rgba(232, 168, 76, .03) 75%, transparent);
  pointer-events: none;
}

/* Motion: the principal shot over a matched pair */
.hang { max-width: var(--hang); }
.hang-motion { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
.hang-motion .work-principal { grid-column: 1 / -1; }

/* Music: one work, hung alone */
.hang-music .work { max-width: 248px; }

/* In the app: Edit Video beside the Motion Lab study and its final shot. Both columns stretch to one height and
   end on a shared baseline: the tall mat fills its column, so its bottom edge meets the final shot's bottom edge,
   and the two last placards sit on the same line. */
.hang-app { display: grid; grid-template-columns: minmax(0, 400fr) minmax(0, 480fr); gap: 32px; align-items: stretch; }
.hang-app .work-tall { display: flex; flex-direction: column; }
.hang-app .work-tall .mat { flex: 1 1 auto; display: flex; }
.hang-app .work-tall .screen { aspect-ratio: auto; flex: 1 1 auto; }
.hang-app .pair { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }

/* walls: Story and Stills hang three equal works; the studio is one long wall stepped one work at a time */
.wall-track { position: relative; scrollbar-width: none; }
.wall-track::-webkit-scrollbar { display: none; }
.wall-three .wall-track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; max-width: var(--hang); }
.wall-three .wall-controls { display: none; }

.wall { --lead: 0px; }
.wall-studio { --w: 240px; }
.wall-studio .wall-track {
  display: flex; gap: 32px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  /* the lit work stands at the wall's left edge; the far padding lets the last work reach it */
  padding-inline: var(--lead) calc(100% - var(--w) - var(--lead));
  scroll-padding-inline: var(--lead);
  padding-top: 72px; margin-top: -72px; /* room for the light above the lit work */
}
.wall-studio .work { flex: 0 0 var(--w); scroll-snap-align: start; }
.wall.stepping .work .mat { opacity: .5; transition: opacity 300ms var(--ease-out); cursor: pointer; }
.wall.stepping .work.lit .mat { opacity: 1; cursor: default; }
.wall.stepping .work::before {
  content: ""; position: absolute; z-index: 0; left: -30%; right: -30%; top: -96px; height: 75%;
  background: radial-gradient(closest-side, rgba(169, 139, 255, .26), rgba(217, 139, 224, .12) 45%, rgba(232, 168, 76, .04) 70%, transparent);
  opacity: 0; transition: opacity 300ms var(--ease-out); pointer-events: none;
}
.wall.stepping .work.lit::before { opacity: 1; }
.wall-track:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }

.wall-controls { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.step {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--frame); border-radius: 50%; color: var(--paper);
  transition: background-color 200ms var(--ease-out), opacity 200ms var(--ease-out);
}
.step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.step:hover { background: rgba(244, 241, 250, .08); }
.step:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 50%; }
.step[aria-disabled="true"] { opacity: .35; cursor: default; background: none; }
.count { min-width: 56px; text-align: center; font-size: var(--t-17); font-variant-numeric: tabular-nums; }

.gallery-note { margin-top: 56px; color: var(--dim); font-size: var(--t-14); line-height: 1.5; max-width: 52em; }

@media (max-width: 1100px) {
  .gallery { --margin-col: 200px; --col-gap: 32px; --matpad: 16px; }
  .wall-three .wall-track { gap: 24px; }
}
@media (max-width: 860px) {
  /* the margin column folds away: the room name sits over the wall text */
  .room { grid-template-columns: 1fr; row-gap: 24px; }
}
@media (max-width: 700px) {
  .gallery { --matpad: 12px; padding: 16px 16px 0; }
  .room { margin-top: 56px; padding-top: 20px; row-gap: 20px; }
  .room-name { font-size: 32px; }
  .wall-line { font-size: 16px; margin-top: 8px; }
  .pl-title { font-size: 20px; }
  .hang-motion, .hang-app { grid-template-columns: 1fr; gap: 32px; }
  .hang-app .work-tall .screen { aspect-ratio: 9 / 16; }
  .hang-app .pair { gap: 32px; }
  .wash { top: -64px; }
  /* phones: Story and Stills become the same stepped wall as the studio */
  .wall-three .wall-controls { display: flex; }
  .wall-three .wall-track {
    display: flex; max-width: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    padding-inline: var(--lead) calc(100% - var(--w) - var(--lead));
    scroll-padding-inline: var(--lead);
  }
  .wall-three .work { flex: 0 0 var(--w); scroll-snap-align: start; }
  .wall-tall { --w: 64vw; }
  .wall-print { --w: 72vw; }
  .wall-studio { --w: 64vw; }
  .hang-music .work { max-width: 72vw; }
  .wall-studio .wall-track, .wall-three .wall-track { gap: 16px; padding-top: 56px; margin-top: -56px; }
  .wall-controls { margin-top: 20px; }
  .gallery-note { font-size: 13px; margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .wall.stepping .work .mat, .wall.stepping .work::before, .step { transition: none; }
}

/* Edit Video: one tall work; Motion Lab: sketch and video side by side, same size */
.hang-single-tall { max-width: 380px; }
.hang-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; align-items: start; }
.footer .foot-note { flex-basis: 100%; font-size: 12px; opacity: .8; }
@media (max-width: 700px) {
  .hang-single-tall { max-width: none; }
  .hang-pair { grid-template-columns: 1fr; gap: 24px; }
}

/* Edit Video: the walk, with its four worlds stacked beside it; the one on screen is lit */
.hang-worlds { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 156px); gap: 24px; align-items: start; }
.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.scenes li { min-height: 0; }
.scene {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; width: 100%;
  opacity: .45; transition: opacity 200ms var(--ease-out);
}
.scene-still { position: relative; flex: none; aspect-ratio: 3 / 2; border: 1px solid var(--frame); background: #111014; overflow: hidden; }
.scene-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-name { font-family: var(--display); font-weight: 500; font-size: 17px; line-height: 1.2; }
.scene-name cite { font-style: italic; }
.scene[aria-current="true"] { opacity: 1; }
.scene[aria-current="true"] .scene-still { border-color: var(--violet); }
.scene:hover { opacity: .8; }
.scene[aria-current="true"]:hover { opacity: 1; }
.scene:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
@media (max-width: 700px) {
  .hang-worlds { grid-template-columns: 1fr; gap: 16px; }
  .scenes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .scene-still { flex: none; aspect-ratio: 1 / 1; }
  .scene-name { font-size: 15px; }
  .scene { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .scene { transition: none; } }

/* Story Planner: the film hangs on a stage. Velvet curtains (frames from a real curtain-opening clip, green keyed out)
   cover the whole stage and draw back to its edges as the room scrolls into view; main.js scrubs them on a canvas. */
.stage { position: relative; aspect-ratio: 1.75 / 1; width: 100%; border: 1px solid var(--frame); background: var(--mat); overflow: hidden; }
.stage-film { position: absolute; inset: 0; }
.stage-film .mat, .stage-film .screen { height: 100%; }
.stage-film .screen { aspect-ratio: auto; box-shadow: none; }
.stage-film .mat { border: 0; padding: 0; background: none; }
.stage-film .wash { display: none; }
.stage-film .placard { display: none; }
.stage-title { margin-top: 12px; }
.curtains { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
@media (max-width: 700px) {
  .stage { aspect-ratio: 1.45 / 1; }
}

/* AI Music: the player in an iPhone frame on a softly lit stage (carried over from the keynote variant) */
.music-hang { max-width: var(--hang); }
.music-stage {
  position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden;
  background: radial-gradient(42% 70% at 50% 55%, rgba(217,139,224,.20), rgba(169,139,255,.08) 55%, transparent 80%), #0C0B0F;
}
.music-stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(244,241,250,.10); }
.music-phone {
  position: absolute; top: 6%; bottom: 6%; left: 50%; transform: translateX(-50%);
  aspect-ratio: 1 / 2.0917; border-radius: 15.5% / 7.41%; background: #050506;
  box-shadow: inset 0 0 0 1.5px #6b6a72, inset 0 0 0 3px #26252a, 0 0 0 1px rgba(0,0,0,.9), 0 24px 60px rgba(0,0,0,.55);
}
.music-phone::before, .music-phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #3d3c42; }
.music-phone::before { left: -3px; top: 20%; height: 10%; }
.music-phone::after { right: -3px; top: 25%; height: 13%; }
.music-screen {
  position: absolute; inset: 1.673% 3.5%; border-radius: 12.9% / 5.94%; overflow: hidden;
  background-color: #1C1B21; background-size: cover; background-position: 50% 50%;
}
.music-screen video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms var(--ease-out); }
.music-screen video.on { opacity: 1; }
@media (max-width: 700px) {
  .music-stage { aspect-ratio: 4 / 5; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .music-screen video { transition: none; } }

/* Rounded frames everywhere (matching the AI Music stage): outer frame 24 px; the picture inside follows the same curve */
.gallery { --r-frame: 24px; --r-pic: 8px; }
.mat { border-radius: var(--r-frame); }
.mat .screen { border-radius: var(--r-pic); }
.stage { border-radius: var(--r-frame); }
.stage-film .screen { border-radius: 0; }
.scene-still { border-radius: 12px; }
@media (max-width: 700px) {
  .gallery { --r-frame: 18px; --r-pic: 6px; }
}

/* Story Planner scene row (preview): the four scenes of the film under the stage; the one on screen is lit */
.scenes-row { margin-top: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.scenes-row .scene-still { aspect-ratio: 16 / 9; }
@media (max-width: 700px) {
  .scenes-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
  .scenes-row .scene-still { aspect-ratio: 16 / 9; }
}

/* ---------- Languages ---------- */
/* language picker in the footer: plain links, so it works without JS and every page is linked */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.lang[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.lang ul { list-style: none; margin: 0; padding: 8px; position: absolute; bottom: 100%; inset-inline-start: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(2, max-content); gap: 2px 16px; inset-inline-start: auto; inset-inline-end: 0;
  background: #0C0B0F; border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.lang li a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--dim); white-space: nowrap; }
.lang li a:hover, .lang li a:focus-visible { color: var(--paper); background: rgba(244,241,250,.06); }
.lang li a[aria-current="page"] { color: var(--paper); }

/* type for scripts the Latin web fonts don't cover */
:lang(ja) { --display: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; --text: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif; }
:lang(ko) { --display: "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif; --text: "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif; }
:lang(zh-Hans) { --display: "Songti SC", "Noto Serif SC", serif; --text: "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh-Hant) { --display: "Songti TC", "Noto Serif TC", serif; --text: "PingFang TC", "Noto Sans TC", system-ui, sans-serif; }
:lang(hi) { --display: "Kohinoor Devanagari", "Noto Serif Devanagari", serif; --text: "Kohinoor Devanagari", "Noto Sans Devanagari", system-ui, sans-serif; }
:lang(ar) { --display: "Noto Naskh Arabic", "Geeza Pro", serif; --text: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", system-ui, sans-serif; }
:lang(he) { --display: "Noto Serif Hebrew", "New Peninim MT", serif; --text: "SF Hebrew", "Arial Hebrew", "Noto Sans Hebrew", system-ui, sans-serif; }
:lang(ja) cite, :lang(ko) cite, :lang(zh-Hans) cite, :lang(zh-Hant) cite, :lang(hi) cite, :lang(ar) cite, :lang(he) cite { font-style: normal; }
/* never letter-space Arabic (it breaks letter joining); keep Hebrew neutral too */
:lang(ar) *, :lang(he) * { letter-spacing: 0 !important; }

/* right-to-left: page layout mirrors; the stepped walls keep left-to-right scrolling (their stepping is measured from the left) */
[dir="rtl"] .wall-track, [dir="rtl"] .wall-controls { direction: ltr; }
@media (max-width: 700px) {
  /* the footer stacks on phones, so the picker sits at the start edge: open the menu from there */
  .lang ul { inset-inline-end: auto; inset-inline-start: 0; }
}

/* Low Power Mode: WebCodecs canvas drawn over a clip iOS will not autoplay. */
.wc-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); animation: anim-in 300ms var(--ease-out) both; }

/* Low Power Mode opening: the same slit, made by two curtains in the page colour that shrink to the card's edges.
   Transforms run on Safari's compositor, while the clip-path opening runs on the main thread, which Low Power Mode
   holds to 30 fps. main.js adds the curtains and .reveal-curtain. */
@keyframes curtain-open { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.film .curtain { position: absolute; top: -1px; bottom: -1px; width: calc(49% + 1px); z-index: 2; background: var(--screen); pointer-events: none;
  animation: curtain-open 900ms cubic-bezier(.65, 0, .25, 1) 100ms both; will-change: transform; }
.film .curtain-l { left: -1px; transform-origin: left center; }
.film .curtain-r { right: -1px; transform-origin: right center; }
.reveal-curtain .film video { animation: none; }
.reveal-curtain .film .hero-anim { animation: none; }
.js .premiere:not(.go) .film .curtain { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .film .curtain { display: none; } }
