/* ==========================================================================
   BrigitteDoll · landing page
   Design read: premium consumer app launch, cinematic fashion-editorial.
   One fixed film stage (the doll), one pinned viewport of scenes on top of it.

   Layout modes
     portrait (default)  : phone-first. Copy sits in the lower third over a scrim.
     wide (landscape ≥ 700px) : asymmetric editorial compositions around the doll.

   z-index scale
     0  stage (doll, lights)      1  story (scene copy)
     25 progress rail             30 nav        40 loader      50 skip link
   ========================================================================== */

/* ---------- Fonts ---------------------------------------------------------
   Apple devices (the main audience) already ship Didot and Futura, so nothing
   is downloaded there. Everywhere else falls back to self-hosted OFL fonts
   (Bodoni Moda, Jost), which the browser only fetches when it needs them.   */
@font-face {
  font-family: "Bodoni Moda";
  src: url("../assets/fonts/bodoni-moda-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("../assets/fonts/bodoni-moda-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Tokens -------------------------------------------------------- */
:root {
  --bg: #05060a;
  --ink: #f5f3ef;
  --ink-2: rgba(245, 243, 239, .68);
  --ink-3: rgba(245, 243, 239, .42);
  --line: rgba(245, 243, 239, .18);

  /* The accent follows her outfit (see html[data-look]). */
  --red: #ff454c;       /* chic */
  --amber: #ffbe5c;     /* casual */
  --violet: #b98cff;    /* sporty */
  --rose: #ff9cc6;      /* boho */
  --ice: #a9d9ff;       /* ski */
  --accent: var(--red);

  --serif: "Didot", "Bodoni Moda", "Times New Roman", serif;
  --sans: "Futura", "Jost", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --gutter: clamp(20px, 5.6vw, 104px);
  --nav-h: 56px;
  --pad-b: calc(18px + var(--safe-b));

  /* Doll frame inside the stage (portrait: starts right under the nav). */
  --doll-h: calc(100% - var(--nav-h) - var(--safe-t) - 4.2%);
  --doll-bottom: 3.6%;
}
html[data-look="casual"] { --accent: var(--amber); }
html[data-look="sporty"] { --accent: var(--violet); }
html[data-look="boho"] { --accent: var(--rose); }
html[data-look="ski"] { --accent: var(--ice); }

/* ---------- Base ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #262a38 var(--bg);
  scrollbar-width: thin;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, ul { margin: 0; padding: 0; }
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #05060a; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 6px;
}

.skip {
  position: fixed; z-index: 50; left: 12px; top: calc(12px + var(--safe-t));
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ---------- Loader -------------------------------------------------------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg);
  transition: opacity 1s ease .05s, visibility 0s linear 1.1s;
}
.is-ready .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__mark {
  font-size: 11px; line-height: 1; letter-spacing: .42em; padding-left: .42em;
  text-transform: uppercase; color: var(--ink-2);
}
.loader__bar { position: relative; width: 72px; height: 1px; background: var(--line); overflow: hidden; }
.loader__bar::after {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: translateX(-100%);
  animation: loader 1.15s cubic-bezier(.6, 0, .3, 1) infinite;
}
@keyframes loader { to { transform: translateX(100%); } }

/* ==========================================================================
   STAGE
   ========================================================================== */
.stage {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  background: var(--bg);
  pointer-events: none;
  contain: layout paint;
}
.stage__ambient {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 62% at 50% 112%, #0e1224 0%, rgba(14, 18, 36, 0) 62%),
    radial-gradient(92% 58% at 50% -12%, rgba(132, 144, 190, .13) 0%, rgba(132, 144, 190, 0) 70%),
    linear-gradient(180deg, #080a11 0%, #05060a 58%, #030406 100%);
}
/* Studio floor: a soft seam behind her ankles, fading out toward the wings. */
.stage__floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 15.5%;
  border-top: 1px solid rgba(255, 255, 255, .075);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .02) 24%, rgba(255, 255, 255, 0) 100%);
  -webkit-mask-image: radial-gradient(78% 170% at 50% 0%, #000 18%, transparent 80%);
          mask-image: radial-gradient(78% 170% at 50% 0%, #000 18%, transparent 80%);
}
/* Darkens the set (never the doll) for the last scene. Opacity is scroll-driven. */
.stage__dim { position: absolute; inset: 0; background: #020203; opacity: 0; }
/* The top and bottom edges melt into the page colour: on iOS the browser chrome floats over
   zones that fixed layers cannot reach, and the set must not end on a visible line there. */
.stage__vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(5, 6, 10, 0) 7%, rgba(5, 6, 10, 0) 93.5%, var(--bg) 100%),
    radial-gradient(125% 92% at 50% 44%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, .62) 100%);
}
/* Film grain: static, on a fixed non-scrolling layer only. */
.stage__grain {
  position: absolute; inset: 0; opacity: .085;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 93.5%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 7%, #000 93.5%, transparent 100%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- The doll ------------------------------------------------------ */
.doll {
  position: absolute; left: 50%; bottom: var(--doll-bottom);
  height: var(--doll-h);
  aspect-ratio: 720 / 1448;
  transform: translate3d(-50%, 0, 0);     /* JS takes over: pan, scale */
  transform-origin: 50% 100%;             /* she scales from her feet */
  will-change: transform, opacity;
}
.doll__lights, .doll__figure, .doll__intro { position: absolute; inset: 0; }

/* Follow spot from above. */
.doll__beam {
  position: absolute; left: 50%; top: -14%; width: 288%; height: 122%;   /* % of the 720-wide canvas */
  margin-left: -144%;
  background: radial-gradient(50% 100% at 50% 0%, rgba(255, 246, 234, .14) 0%, rgba(255, 246, 234, .05) 40%, rgba(255, 246, 234, 0) 74%);
}
/* Back light behind the silhouette. One layer per look; they crossfade with the outfit. */
.doll__halo {
  position: absolute; left: 50%; top: 40%;
  width: 288%; aspect-ratio: 1;
  margin: -144% 0 0 -144%;
  will-change: transform;
}
.doll__glow { position: absolute; inset: 0; border-radius: 50%; will-change: opacity; }
.doll__glow--chic   { background: radial-gradient(closest-side, rgba(226, 38, 46, .50) 0%, rgba(226, 38, 46, .17) 44%, rgba(226, 38, 46, 0) 74%); }
.doll__glow--casual { background: radial-gradient(closest-side, rgba(236, 150, 42, .46) 0%, rgba(236, 150, 42, .15) 44%, rgba(236, 150, 42, 0) 74%); opacity: 0; }
.doll__glow--sporty { background: radial-gradient(closest-side, rgba(146, 70, 255, .52) 0%, rgba(146, 70, 255, .18) 44%, rgba(146, 70, 255, 0) 74%); opacity: 0; }
.doll__glow--boho   { background: radial-gradient(closest-side, rgba(255, 96, 160, .44) 0%, rgba(255, 96, 160, .15) 44%, rgba(255, 96, 160, 0) 74%); opacity: 0; }
.doll__glow--ski    { background: radial-gradient(closest-side, rgba(92, 176, 255, .46) 0%, rgba(92, 176, 255, .15) 44%, rgba(92, 176, 255, 0) 74%); opacity: 0; }
.doll__glow--core { inset: 22%; background: radial-gradient(closest-side, rgba(255, 244, 228, .17) 0%, rgba(255, 244, 228, 0) 70%); }

/* Pool of light on the floor with a contact shadow in its centre. */
.doll__shadow {
  position: absolute; left: 50%; bottom: -1.5%;
  width: 81%; height: 5.2%; margin-left: -40.5%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .5) 52%, rgba(0, 0, 0, 0) 100%);
}
.doll__shadow::before {
  content: ""; position: absolute; left: -110%; right: -110%; top: -130%; bottom: -130%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 246, 234, .10) 0%, rgba(255, 246, 234, 0) 100%);
}

.doll__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: 50% 100%;   /* never cropped, never stretched */
  display: block;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.doll__img--casual, .doll__img--sporty, .doll__img--boho, .doll__img--ski { opacity: 0; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-t));
  padding: var(--safe-t) max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l));
  display: flex; align-items: center; justify-content: space-between;
}
.nav::before {
  content: ""; position: absolute; inset: 0 0 -24px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 10, .78) 0%, rgba(5, 6, 10, 0) 100%);
}
.nav__brand {
  font-size: 12px; line-height: 1; letter-spacing: .34em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  padding: 12px 0;
}
.nav__links { display: none; }
.nav__link {
  position: relative;
  font-size: 11.5px; line-height: 1; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2);
  padding: 12px 0;
  transition: color .35s ease;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: .22em; bottom: 6px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .5s var(--ease);
}
.nav__link:hover, .nav__link:focus-visible { color: var(--ink); }
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

.nav__cta {
  display: inline-flex; align-items: center; min-height: 36px;
  padding: 0 16px 0 calc(16px + .22em);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 10.5px; line-height: 1; letter-spacing: .22em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  background: rgba(5, 6, 10, .35);
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, transform .5s var(--ease);
}
.nav__cta:hover, .nav__cta:focus-visible { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav__cta:active { transform: scale(.97); }

/* ==========================================================================
   STORY: one tall scroll track, one pinned viewport, scenes stacked inside
   ========================================================================== */
.story { position: relative; z-index: 1; }
.pin { position: relative; }
.beat {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
}

.js .story {
  height: calc(var(--screens, 8) * 100vh);
  height: calc(var(--screens, 8) * 100lvh);   /* stable while the iOS toolbar moves */
}
.js .pin {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  overflow: hidden;
}
.js .beat {
  position: absolute; inset: 0; min-height: 0;
  visibility: hidden; pointer-events: none;
}
.js .hero { visibility: visible; }
.js .beat[data-state="on"] { visibility: visible; will-change: opacity, transform; }
.js .beat[data-state="off"] { visibility: hidden; }
.js .beat a, .js .beat button, .js .beat video { pointer-events: auto; }

/* Portrait: copy lives in the lower third, on a scrim that melts into the set. */
.beat--scrim::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 66%;
  z-index: -1; pointer-events: none;
  background: linear-gradient(to top,
    rgba(5, 6, 10, .97) 0%, rgba(5, 6, 10, .88) 24%, rgba(5, 6, 10, .52) 56%, rgba(5, 6, 10, 0) 100%);
}

/* ---------- Type ---------------------------------------------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -.012em;
  line-height: .95;
  text-shadow: 0 0 .6em rgba(5, 6, 10, .45);
}
.display em { font-style: italic; color: var(--accent); transition: color .9s ease; }

/* Masked line reveal. Padding keeps italics and punctuation from being clipped. */
.line {
  display: block; overflow: hidden;
  padding: .07em .14em .1em; margin: -.07em -.14em -.1em;
}
.line__in { display: block; will-change: transform; }

.lead {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 5vw, 30px); line-height: 1.22;
  padding-bottom: .08em;
}
.body { color: var(--ink-2); font-size: 15.5px; line-height: 1.62; }

/* ---------- App Store badge ----------------------------------------------
   Built to read as Apple's badge at a glance. For final release, Apple's
   official artwork can be dropped in here (developer.apple.com/app-store/
   marketing/guidelines): keep the <a data-store-link> wrapper.             */
.store-badge {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 17px 0 13px;
  border-radius: 10px;
  background: #000; color: #fff;
  border: 1px solid rgba(255, 255, 255, .58);
  font-family: var(--ui); line-height: 1; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform .6s var(--ease), border-color .35s ease, box-shadow .6s var(--ease);
}
.store-badge:not([href]) { cursor: default; }
.store-badge__logo { width: 25px; height: 25px; flex: none; fill: currentColor; margin-top: -3px; }
.store-badge__text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.store-badge__small { font-size: 10.5px; font-weight: 400; letter-spacing: .01em; }
.store-badge__big { font-size: 20.5px; font-weight: 600; letter-spacing: -.015em; }
.store-badge::after {                       /* light sweeping across the glass on hover */
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 46%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-130%) skewX(-12deg);
  transition: transform .9s var(--ease);
  pointer-events: none;
}
.store-badge:hover, .store-badge:focus-visible {
  transform: translateY(-2px);
  border-color: #fff;
  box-shadow: 0 18px 44px -18px rgba(255, 255, 255, .34), 0 0 0 5px rgba(255, 255, 255, .06);
}
.store-badge:hover::after, .store-badge:focus-visible::after { transform: translateX(260%) skewX(-12deg); }
.store-badge:active { transform: translateY(0) scale(.98); }

.store-badge--lg { height: 58px; padding: 0 21px 0 16px; gap: 12px; border-radius: 12px; }
.store-badge--lg .store-badge__logo { width: 29px; height: 29px; }
.store-badge--lg .store-badge__small { font-size: 11.5px; }
.store-badge--lg .store-badge__big { font-size: 24px; }

/* ==========================================================================
   SCENE 1 · HERO (portrait)
   ========================================================================== */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center;
  padding: 0 var(--gutter) var(--pad-b);
}
.hero__title { font-size: clamp(46px, 16.2vw, 132px); line-height: .9; }
.hero__aside {
  display: flex; flex-direction: column; align-items: center; gap: 15px;
  margin-top: 12px;
}
.hero__sub {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(18px, 5vw, 30px); line-height: 1.2;
}

.cue {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  margin-top: 14px; color: var(--ink-2);
}
.cue__label { font-size: 9.5px; line-height: 1; letter-spacing: .34em; padding-left: .34em; text-transform: uppercase; }
.cue__line { position: relative; width: 1px; height: 24px; background: var(--line); overflow: hidden; }
.cue__line::after {
  content: ""; position: absolute; inset: 0; background: var(--ink);
  transform: translateY(-101%);
  animation: cue-y 2.4s cubic-bezier(.65, 0, .25, 1) infinite;
}
@keyframes cue-y { 0% { transform: translateY(-101%); } 60%, 100% { transform: translateY(101%); } }
@keyframes cue-x { 0% { transform: translateX(-101%); } 60%, 100% { transform: translateX(101%); } }

/* ==========================================================================
   SCENE 2 · THE LOOKS (portrait)
   ========================================================================== */
.looks {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center;
  padding: 0 var(--gutter) var(--pad-b);
}
.looks__copy { display: flex; flex-direction: column; align-items: center; }
.looks__title { font-size: clamp(36px, 11.6vw, 100px); }
.looks__lead { display: none; }
/* The switch shows five looks; the app has many more. */
.looks__more {
  margin-top: 12px;
  font-size: 10.5px; line-height: 1; letter-spacing: .28em; padding-left: .28em; text-transform: uppercase;
  color: var(--ink-2);
}

.switch {
  position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(372px, calc(100vw - 2 * var(--gutter)));   /* five tap targets, never wider than the screen */
  margin-top: 18px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(5, 6, 10, .55);
}
.switch__thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 5);
  border-radius: 999px;
  background: rgba(245, 243, 239, .13);
  box-shadow: inset 0 0 0 1px rgba(245, 243, 239, .2);
  transition: transform .7s var(--ease);
}
html[data-look="casual"] .switch__thumb { transform: translateX(100%); }
html[data-look="sporty"] .switch__thumb { transform: translateX(200%); }
html[data-look="boho"] .switch__thumb { transform: translateX(300%); }
html[data-look="ski"] .switch__thumb { transform: translateX(400%); }
.switch__opt {
  position: relative;
  appearance: none; -webkit-appearance: none; background: none; border: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 4px 0 2px;
  border-radius: 999px;
  font-family: var(--sans); font-size: 10px; line-height: 1; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .45s ease;
}
.switch__opt:hover { color: var(--ink-2); }
.switch__opt[aria-checked="true"] { color: var(--ink); }
.switch__dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  transition: transform .6s var(--ease);
}
.switch__opt[aria-checked="true"] .switch__dot { transform: scale(1.18); }
.switch__dot--chic { background: #d2232b; }
.switch__dot--casual { background: #f2c230; }
.switch__dot--sporty { background: #8a2be2; }
.switch__dot--boho { background: #f29ab8; }
.switch__dot--ski { background: #eef2f8; }
@media (max-width: 399px) { .switch__dot { display: none; } }

/* ==========================================================================
   SCENE 3 · THE SHOW (portrait)
   ========================================================================== */
.show {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center;
  padding: 0 var(--gutter) var(--pad-b);
}
.show__title { font-size: clamp(34px, 11.2vw, 96px); }
.show__body { margin: 14px auto 0; max-width: 31em; }

.words__list { list-style: none; }
.word__name {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(64px, 23vw, 168px); line-height: .98; letter-spacing: -.02em;
  text-shadow: 0 0 .5em rgba(5, 6, 10, .45);
}
.word__desc { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.word { padding: 0 var(--gutter) 28px; text-align: center; }

/* One word at a time, crossfading as the scroll advances (--on / --off come from JS). */
.js .words__list {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--pad-b); height: 0;
}
.js .word {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0;
  opacity: calc(var(--on, 0) - var(--off, 0));
  transform: translate3d(0, calc((1 - var(--on, 0)) * 28px - var(--off, 0) * 28px), 0);
}
.js .word__desc { margin: 8px auto 0; max-width: 21em; min-height: 4.5em; }

/* Demo slot */
.demo__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: calc(var(--nav-h) + var(--safe-t) + 4px) var(--gutter) var(--pad-b);
  text-align: center;
}
.demo__frame {
  --r: clamp(22px, 4.4vh, 44px);
  height: 56vh; height: 56dvh; aspect-ratio: 9 / 19.5; flex: none;
  padding: 5px; border-radius: var(--r);
  background: linear-gradient(155deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .06) 38%, rgba(255, 255, 255, .16) 100%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
}
.demo__screen {
  position: relative; width: 100%; height: 100%;
  border-radius: calc(var(--r) - 5px); overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #131727 0%, #080a12 70%);
  display: grid; place-items: center;
}
.demo__screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.demo__placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.demo__play { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); }
.demo__play::after {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -7px 0 0 -4px;
  border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--ink-2);
}
.demo__tag { font-size: 10px; line-height: 1; letter-spacing: .32em; padding-left: .32em; text-transform: uppercase; color: var(--ink-2); }
.demo__soon { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.1; color: var(--ink); }
.demo__title { font-size: clamp(28px, 8.6vw, 72px); }
.demo__body { margin-top: 8px; }

/* ==========================================================================
   SCENE 4 · CALL TO ACTION (portrait)
   ========================================================================== */
.final {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center;
  padding: 0 var(--gutter) var(--pad-b);
}
.final__title { font-size: clamp(30px, 10.6vw, 92px); }
.final__cta { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.final__sub { margin-bottom: 16px; }
.final__note {
  margin-top: 13px;
  font-size: 10.5px; line-height: 1; letter-spacing: .28em; padding-left: .28em; text-transform: uppercase;
  color: var(--ink-2);
}
.legal { margin-top: 14px; max-width: 32em; font-size: 10.5px; line-height: 1.45; letter-spacing: .03em; color: var(--ink-3); }
.legal__link {
  display: inline-block; padding: 6px 2px;          /* a bigger tap target than the small type */
  color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px;
}
.legal__link:hover { color: var(--ink); text-decoration-color: var(--accent); }
.legal__link:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ==========================================================================
   PROGRESS RAIL
   ========================================================================== */
.rail {
  position: fixed; z-index: 25; top: 50%;
  right: max(6px, var(--safe-r));
  width: 28px; height: 128px; margin-top: -64px;
}
.rail__track { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--line); overflow: hidden; }
.rail__fill {
  position: absolute; inset: 0; background: var(--accent);
  transform: scaleY(0); transform-origin: 50% 0;
  transition: background-color .9s ease;
}
.rail__stop {
  position: absolute; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rail__stop::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: #6d6f78;
  transition: transform .5s var(--ease), background-color .4s ease;
}
.rail__stop[aria-current="true"]::before { background: var(--ink); transform: scale(1.7); }
.rail__label {
  position: absolute; right: 30px; top: 50%;
  white-space: nowrap; font-size: 10px; line-height: 1; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-2);
  opacity: 0; transform: translate(8px, -50%); pointer-events: none;
  transition: opacity .4s ease, transform .5s var(--ease);
}
.rail__stop:focus-visible .rail__label { opacity: 1; transform: translate(0, -50%); }

/* ==========================================================================
   WIDE: desktop and landscape. Asymmetric compositions around the doll.
   ========================================================================== */
@media (orientation: landscape) and (min-width: 700px) {
  :root {
    --nav-h: clamp(52px, 9vh, 76px);
    --doll-h: 91%;
    --doll-bottom: 4%;
  }
  .beat--scrim::before { display: none; }

  .nav__links { display: flex; gap: clamp(22px, 2.6vw, 40px); margin-left: auto; margin-right: clamp(22px, 2.6vw, 40px); }

  /* Hero: the title runs across her legs like a film poster; her face stays clear. */
  .hero { display: block; padding: 0; text-align: left; }
  .hero__title {
    position: absolute; left: 0; right: 0; bottom: 17.5%;
    text-align: center; white-space: nowrap;
    font-size: min(10.5vw, 23vh); line-height: .95;
  }
  .hero__title .line { display: inline-block; vertical-align: top; }
  .hero__aside {
    position: absolute; left: max(var(--gutter), var(--safe-l)); top: 31%;
    align-items: flex-start; gap: min(26px, 3.6vh); margin: 0;
  }
  .hero__sub { font-size: min(2.8vw, 5.6vh); line-height: 1.12; max-width: 8.6em; }
  .cue {
    position: absolute; left: max(var(--gutter), var(--safe-l)); bottom: 5.5%;
    flex-direction: row; gap: 14px; margin: 0;
  }
  .cue__line { width: 46px; height: 1px; }
  .cue__line::after { transform: translateX(-101%); animation-name: cue-x; }

  /* Looks: she steps right, the copy takes the left. */
  .looks { display: block; padding: 0; text-align: left; }
  .looks__copy {
    position: absolute; left: max(var(--gutter), var(--safe-l)); top: 50%;
    transform: translateY(-50%);
    align-items: flex-start;
  }
  .looks__title { font-size: min(6.5vw, 14.2vh); }
  .looks__lead { display: block; margin-top: 2.6vh; font-size: min(2.2vw, 4.6vh); }
  .looks__more { margin-top: 2vh; padding-left: 4px; }
  .switch { margin-top: 3.6vh; width: auto; }
  .switch__opt { gap: 7px; padding: 0 12px 0 10px; font-size: 10.5px; letter-spacing: .16em; }   /* five options beside her */
  .switch__dot { display: none; }   /* below 1100px the dots would push the switch under her widest look */
  .switch__dot { width: 10px; height: 10px; }

  /* Show: she crosses to the left, the copy takes the right. */
  .show { display: block; padding: 0; text-align: left; }
  .show__copy {
    position: absolute; left: 47vw; right: calc(var(--gutter) + 28px); top: 50%;
    transform: translateY(-50%);
  }
  .show__title { font-size: min(6.1vw, 13.6vh); }
  .show__body { margin: 3.2vh 0 0; font-size: clamp(15px, 1.24vw, 20px); max-width: 30em; }

  .js .words__list, .words__list {
    position: absolute; left: 47vw; right: calc(var(--gutter) + 28px); top: 50%; bottom: auto; height: auto;
    transform: translateY(-50%);
    display: grid; row-gap: 1.2vh;
  }
  .js .word, .word {
    position: static; padding: 0;
    display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    column-gap: 2.4vw; align-items: baseline;
    text-align: left; transform: none;
  }
  /* All four stay on screen; the one being told is lit, the ones already told stay half lit. */
  .js .word { opacity: calc(.2 + .8 * (var(--on, 0) - var(--off, 0) * .7)); }
  .word__name { font-size: min(7.1vw, 14.4vh); line-height: 1.02; }
  .js .word__desc, .word__desc { margin: 0; min-height: 0; max-width: 19em; font-size: clamp(13.5px, 1.08vw, 17px); }

  .demo__inner {
    left: 47vw; right: calc(var(--gutter) + 28px);
    flex-direction: row; justify-content: flex-start; gap: 4vw;
    padding: 0; text-align: left;
  }
  .demo__frame { height: 66vh; }
  .demo__title { font-size: min(3.3vw, 7.4vh); }
  .demo__title .line { white-space: nowrap; }
  .demo__body { margin-top: 2vh; font-size: clamp(15px, 1.24vw, 20px); }

  /* Finale: she is back in the centre, flanked by the question and the answer. */
  .final {
    display: grid; grid-template-columns: minmax(0, 1fr) 43vh minmax(0, 1fr);
    align-items: center; column-gap: 2.4vw;
    padding: 0 max(var(--gutter), var(--safe-r)) 0 max(var(--gutter), var(--safe-l));
    text-align: left;
  }
  .final__title { grid-column: 1; justify-self: end; text-align: right; font-size: min(5.5vw, 12.6vh); }
  .final__cta { grid-column: 3; align-items: flex-start; margin: 0; }
  .final__sub { font-size: min(2.6vw, 5.4vh); margin-bottom: 3.4vh; }
  .final__note { margin-top: 2.2vh; padding-left: 0; }
  .legal {
    position: absolute; left: max(var(--gutter), var(--safe-l)); bottom: 4.6%;
    margin: 0; text-align: left;
  }

  .rail { right: max(calc(var(--gutter) * .42), var(--safe-r)); height: 190px; margin-top: -95px; }
  .rail__stop:hover .rail__label { opacity: 1; transform: translate(0, -50%); }
}

/* Short landscape screens (a phone on its side): the four words take turns instead of stacking. */
@media (orientation: landscape) and (min-width: 1100px) {
  .switch__dot { display: block; }
}

@media (orientation: landscape) and (min-width: 700px) and (max-height: 540px) {
  .js .words__list { display: block; height: 0; transform: none; }
  .js .word {
    position: absolute; left: 0; right: 0; top: 0;
    display: block;
    opacity: calc(var(--on, 0) - var(--off, 0));
    transform: translate3d(0, calc(-50% + (1 - var(--on, 0)) * 22px - var(--off, 0) * 22px), 0);
  }
  .word__name { font-size: min(9vw, 24vh); }
  .js .word__desc { margin-top: 1.5vh; max-width: 24em; }
  .hero__aside { top: 24%; gap: 12px; }
  .looks__title { font-size: min(5.4vw, 11.5vh); }
  .looks__lead { display: none; }
  .switch { margin-top: 2.6vh; }
  .store-badge--lg { height: 50px; }
}

/* ==========================================================================
   OPENING SEQUENCE (plays once, when the hero artwork is decoded)
     set fades up → lights reveal the silhouette → she rises into the light
     → the title unrolls → the badge and the scroll cue arrive
   ========================================================================== */
.js:not(.is-ready) .doll__lights,
.js:not(.is-ready) .doll__intro,
.js:not(.is-ready) .doll__shadow,
.js:not(.is-ready) .nav,
.js:not(.is-ready) .rail,
.js:not(.is-ready) .hero__sub,
.js:not(.is-ready) .hero__badge,
.js:not(.is-ready) .cue { opacity: 0; }
.js:not(.is-ready) .hero .line__in { transform: translate3d(0, 110%, 0); }

.is-ready .doll__lights { animation: lights-in 2.2s cubic-bezier(.25, .6, .2, 1) .15s backwards; }
.is-ready .doll__intro  { animation: doll-in 1.8s cubic-bezier(.22, .7, .18, 1) .55s backwards; }
.is-ready .doll__shadow { animation: fade-in 1.2s ease 1.1s backwards; }
.is-ready .nav          { animation: drop-in 1.1s var(--ease) 1s backwards; }
.is-ready .hero .line__in { animation: line-in 1.2s var(--ease) calc(1.2s + var(--i, 0) * .14s) backwards; }
.is-ready .hero__sub    { animation: rise-in 1.1s var(--ease) 1.7s backwards; }
.is-ready .hero__badge  { animation: rise-in 1.1s var(--ease) 1.9s backwards; }
.is-ready .cue          { animation: fade-in 1s ease 2.4s backwards; }
.is-ready .rail         { animation: fade-in 1s ease 2.3s backwards; }

@keyframes lights-in { from { opacity: 0; transform: scale(.78); } to { opacity: 1; transform: none; } }
@keyframes doll-in {
  0%   { opacity: 0; transform: translate3d(0, 3.4%, 0); filter: brightness(0); }
  32%  { opacity: 1; filter: brightness(.03); }
  100% { opacity: 1; transform: none; filter: brightness(1); }
}
@keyframes line-in { from { transform: translate3d(0, 110%, 0); } to { transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 20px, 0); } to { opacity: 1; transform: none; } }
@keyframes drop-in { from { opacity: 0; transform: translate3d(0, -10px, 0); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ?still in the URL: no opening sequence (used for stills / the Open Graph image). */
.is-still *, .is-still *::before, .is-still *::after {
  animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important;
}

/* ?og in the URL: title and artwork only, for the Open Graph image. */
.is-og .nav, .is-og .rail, .is-og .hero__aside, .is-og .cue { display: none; }

/* ==========================================================================
   NO JAVASCRIPT: plain stacked sections over the fixed doll
   ========================================================================== */
html:not(.js) .stage .doll { opacity: .55; }
html:not(.js) .rail { display: none; }
html:not(.js) .demo { min-height: 100vh; }

/* ==========================================================================
   REDUCED MOTION: fades only, no travel, no parallax, hard cuts between poses
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .js:not(.is-ready) .hero .line__in { transform: none; opacity: 0; }
  .is-ready .doll__lights, .is-ready .doll__intro, .is-ready .doll__shadow, .is-ready .nav,
  .is-ready .hero .line__in, .is-ready .hero__sub, .is-ready .hero__badge, .is-ready .cue, .is-ready .rail {
    animation: fade-in .6s ease .1s backwards;
  }
  .cue__line::after, .loader__bar::after { animation: none; transform: none; }
  .doll { transition: opacity .22s linear; }
  .stage.is-cut .doll { opacity: 0 !important; }
  .js .word { transform: none; }
  .store-badge, .store-badge::after, .nav__cta, .switch__thumb, .switch__dot, .rail__label, .rail__stop::before {
    transition-duration: .01s;
  }
  .store-badge:hover, .store-badge:focus-visible { transform: none; }
}
