/* What's My Line website. Every color, font and motion curve is a token in the first block,
   mirroring the app's design system (ios/Sources/WMLDesign/Tokens): a dark stage with a purple
   spotlight, and a light mode that follows the visitor's system setting. */

/* ─── Tokens ──────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light dark;

  /* Palette (WMLDesign Colors.xcassets, light / dark) */
  --stage: light-dark(#f7f5fa, #09090b);
  --card: light-dark(#ffffff, #16141b);
  --card-edge: light-dark(rgba(36, 20, 60, .08), rgba(255, 255, 255, .07));
  --raised: light-dark(#e8e4ef, #363240);
  --ink: light-dark(#141218, #fafafa);
  --muted: light-dark(#6b6875, #9e9ead);
  --spotlight: light-dark(#8e24c4, #a12dd2);
  --spotlight-ink: light-dark(#7a1caf, #d08cf0);
  --spotlight-soft: light-dark(rgba(142, 36, 196, .1), rgba(161, 45, 210, .18));
  --partner: light-dark(#2879c4, #45a3e5);
  --partner-soft: light-dark(rgba(40, 121, 196, .1), rgba(69, 163, 229, .16));
  --recording: light-dark(#ef296b, #ff377e);
  --shadow: light-dark(rgba(36, 20, 60, .14), rgba(0, 0, 0, .55));

  /* The logo's neon */
  --neon-pink: #ff4fd8;
  --neon-violet: #a24bf0;
  --neon-cyan: #3fd0f0;
  /* Glow and grain strength (numbers, so set per scheme below; light-dark() takes colors only) */
  --glow: .35;
  --grain: .035;

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Libre Baskerville", Georgia, serif;

  /* Shape and space */
  --radius: 28px;
  --radius-small: 16px;
  --page: min(1180px, 100% - 40px);

  /* Motion (WMLDesign Motion: gentle springs, never abrupt) */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --quick: .25s;
  --gentle: .7s;
}
@media (prefers-color-scheme: dark) { :root { --glow: 1; --grain: .06; } }

/* ─── Base ────────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stage);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
::selection { background: var(--spotlight-soft); }

:focus-visible { outline: 3px solid var(--spotlight); outline-offset: 4px; border-radius: 10px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--spotlight); color: #fff; font-weight: 600; transition: top var(--quick) var(--ease-out); }
.skip:focus { top: 16px; }

.wrap { width: var(--page); margin-inline: auto; }

.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--spotlight-ink); }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); text-wrap: pretty; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }

/* Words that glow in the logo's neon */
.neon {
  background: linear-gradient(100deg, var(--neon-pink), var(--neon-violet) 45%, var(--neon-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; animation: shimmer 8s ease-in-out infinite alternate;
}
@keyframes shimmer { to { background-position: 100% 0; } }

/* Grain over everything, like film on a stage */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── App Store badge ─────────────────────────────────────────────────────── */

.store { display: inline-block; border-radius: 12px; transition: transform var(--quick) var(--ease-spring), box-shadow var(--quick); }
.store img { height: 54px; width: auto; }
.store:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 34px -10px var(--spotlight); }
.store:active { transform: scale(.97); }
.store.small img { height: 40px; }
.store .on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .store .on-light { display: none; }
  .store .on-dark { display: block; }
}


/* ─── Navigation ──────────────────────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background var(--gentle) var(--ease-out), box-shadow var(--gentle) var(--ease-out), backdrop-filter var(--gentle);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--stage) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--card-edge);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 4px 14px -4px var(--spotlight); transition: transform var(--gentle) var(--ease-spring); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.nav-links { display: flex; align-items: center; gap: 30px; font-size: 15px; font-weight: 500; }
.nav-links a:not(.store) { color: var(--muted); position: relative; transition: color var(--quick); }
.nav-links a:not(.store)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: var(--spotlight); transform: scaleX(0); transition: transform var(--quick) var(--ease-out);
}
.nav-links a:not(.store):hover { color: var(--ink); }
.nav-links a:not(.store):hover::after { transform: scaleX(1); }
@media (max-width: 760px) { .nav-links a:not(.store) { display: none; } }

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero { position: relative; min-height: 100svh; display: grid; align-items: center; padding: 120px 0 80px; isolation: isolate; }

/* The spotlight: follows the pointer, eased in site.js through --x and --y */
.hero .light {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  --x: 70%; --y: 30%;
}
.hero .light::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(600px circle at var(--x) var(--y), color-mix(in srgb, var(--spotlight) calc(var(--glow) * 34%), transparent), transparent 70%),
    radial-gradient(900px 500px at 80% -10%, color-mix(in srgb, var(--neon-pink) calc(var(--glow) * 14%), transparent), transparent 70%),
    radial-gradient(700px 500px at 0% 100%, color-mix(in srgb, var(--neon-cyan) calc(var(--glow) * 10%), transparent), transparent 70%);
}
/* A stage beam sweeping slowly from above */
.hero .light::after {
  content: ""; position: absolute; left: 50%; top: -30%; width: 140vmax; height: 140vmax; translate: -50% 0;
  background: conic-gradient(from 180deg at 50% 0%, transparent 0deg 168deg,
    color-mix(in srgb, var(--spotlight) calc(var(--glow) * 12%), transparent) 176deg 184deg, transparent 192deg 360deg);
  transform-origin: 50% 0%; animation: sweep 14s ease-in-out infinite alternate; filter: blur(12px);
}
@keyframes sweep { from { rotate: -14deg; } to { rotate: 14deg; } }

.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(32px, 6vw, 96px); }
.hero h1 { font-size: clamp(48px, 7.4vw, 96px); font-weight: 800; letter-spacing: -.045em; line-height: .98; }
.hero h1 .serif { font-weight: 400; letter-spacing: -.03em; }
.hero .lede { margin-top: 26px; max-width: 34ch; }
.hero .actions { margin-top: 38px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 7px 14px 7px 10px;
  border-radius: 999px; background: var(--spotlight-soft); border: 1px solid color-mix(in srgb, var(--spotlight) 30%, transparent); }
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--recording); box-shadow: 0 0 0 0 var(--recording); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Staggered entrance: each [data-enter] rises out of a blur, in order of --i */
[data-enter] { animation: enter 1.1s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
@keyframes enter { from { opacity: 0; transform: translateY(28px); filter: blur(12px); } }

.scroll-cue { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; width: 26px; height: 42px; border-radius: 14px;
  border: 2px solid var(--raised); display: grid; justify-items: center; padding-top: 8px; transition: opacity var(--gentle); }
.scroll-cue::before { content: ""; width: 4px; height: 8px; border-radius: 2px; background: var(--muted); animation: cue 2s var(--ease-out) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
.nav.scrolled ~ main .scroll-cue { opacity: 0; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero .actions { justify-content: center; }
  .scroll-cue { display: none; }
}

/* ─── The phone: the rehearsal screen, flipping between Play My Lines and Off Book ─── */

.phone-stage { --w: min(330px, 78vw); position: relative; display: grid; place-items: center; }
.phone-stage::before { /* floor glow under the phone */
  content: ""; position: absolute; bottom: -6%; width: 70%; height: 60px; border-radius: 50%;
  background: var(--spotlight); filter: blur(40px); opacity: calc(var(--glow) * .45);
}

.phone {
  position: relative; width: var(--w); aspect-ratio: 9 / 19.5; border-radius: calc(var(--w) * .16);
  padding: calc(var(--w) * .035); background: linear-gradient(145deg, #3a3842, #121116 40%, #2a2830);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 50px 100px -30px var(--shadow), 0 30px 60px -40px var(--spotlight);
}

/* A note beside the phone saying it's real, on the Off Book side, with an arrow drawn in to the
   Off Book pill; gone once the visitor tries it */
.try { position: absolute; left: calc(50% + var(--w) / 2 - 44px); bottom: calc(var(--w) * 2.1667 * .14); margin: 0;
  display: grid; justify-items: end; gap: 4px; color: var(--spotlight); font: italic 400 22px/1.15 var(--serif);
  text-align: left; white-space: nowrap; pointer-events: none; transition: opacity .6s var(--ease-out), translate .6s var(--ease-out); }
.try span { justify-self: start; margin-left: 54px; opacity: 0; animation: try-in .8s var(--ease-out) 1.6s forwards; }
.try svg { width: 90px; height: 64px; margin-right: auto; }
.try path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease-out) 2s forwards; }
.try path + path { animation-delay: 2.55s; animation-duration: .3s; }
.phone-stage.tried .try { opacity: 0; translate: 10px 0; }
@keyframes try-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 1359px) { /* no room beside the phone: the note sits above it, and the glowing pill does the pointing */
  .try { position: static; order: -1; margin-bottom: 20px; text-align: center; }
  .try span { justify-self: center; margin: 0; }
  .try br { display: none; }
  .try svg { display: none; }
}
@media (prefers-reduced-motion: reduce) { .try span, .try path { animation: none; opacity: 1; stroke-dashoffset: 0; } }

.screen {
  position: relative; height: 100%; border-radius: calc(var(--w) * .125); overflow: hidden;
  background: #09090b; color: #fafafa; display: flex; flex-direction: column; font-size: calc(var(--w) * .042);
}
.island { position: absolute; top: 2.2%; left: 50%; translate: -50% 0; width: 32%; height: 4.4%; border-radius: 999px; background: #000; z-index: 3; }
.screen .top { padding: 16% 7% 3%; }
.screen .title { font-weight: 700; font-size: 1.12em; letter-spacing: -.01em; }

/* The script reads like lyrics: the current line lit, the rest faded back */
.script { position: relative; flex: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 80%, transparent); mask-image: linear-gradient(transparent, #000 16%, #000 80%, transparent); }
.script ol { list-style: none; margin: 0; padding: 0 7%; display: flex; flex-direction: column; gap: 1.1em;
  transition: transform .9s var(--ease-out); }
.script li { opacity: .3; filter: grayscale(1); transform-origin: left center;
  transition: opacity .5s, filter .5s, transform .6s var(--ease-out); }
.script li.now { opacity: 1; filter: none; transform: scale(1.03); }
.script li .who { font-size: .62em; font-weight: 800; letter-spacing: .1em; display: flex; align-items: center; gap: .6em; color: rgba(255, 255, 255, .55); }
.script li.me .who { color: #d08cf0; }
.script li .tag { padding: .15em .45em; border-radius: 999px; background: rgba(161, 45, 210, .2); letter-spacing: .04em; }
.script li .words { font-family: var(--serif); font-size: 1.02em; line-height: 1.35; margin-top: .3em;
  transition: filter .7s var(--ease-out), opacity .7s; }
/* Off Book: your lines blur until you've said them */
.screen.offbook li.me:not(.said) .words { filter: blur(.4em); opacity: .5; }

/* Playing: bars dancing beside the speaker's name */
.bars { display: inline-flex; gap: .18em; align-items: flex-end; height: .9em; opacity: 0; transition: opacity .3s; }
.bars i { width: .2em; border-radius: .1em; background: currentColor; height: 30%; }
li.now.speaking .bars { opacity: 1; }
li.now.speaking .bars i { animation: bar .9s ease-in-out infinite; }
.bars i:nth-child(2) { animation-delay: -.3s !important; }
.bars i:nth-child(3) { animation-delay: -.6s !important; }
@keyframes bar { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.controls { padding: 4% 7% 8%; display: grid; gap: .8em; }
.controls button { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.controls button:focus-visible { outline: 2px solid #d08cf0; outline-offset: 2px; }
/* "What's My Line?" rises only on your Off Book turn */
.controls .ask { font-size: .9em; font-weight: 700; color: #fff; padding: .85em; border-radius: 999px;
  background: linear-gradient(135deg, #a12dd2, #c84bea); box-shadow: 0 .6em 1.6em -.6em rgba(161, 45, 210, .9);
  opacity: 0; transform: translateY(.8em); pointer-events: none;
  transition: opacity .5s, transform .5s var(--ease-out), scale .2s var(--ease-spring); }
.controls .ask.shown { opacity: 1; transform: none; pointer-events: auto; }
.controls .ask:active { scale: .95; }

/* The Play My Lines / Off Book toggle, with the beep bell beside Off Book */
.style-row { display: flex; align-items: center; gap: .5em; }
.pills { position: relative; flex: 1; display: grid; grid-template-columns: 1fr 1fr; padding: .25em; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.pills .thumb { position: absolute; inset: .25em; width: calc(50% - .25em); border-radius: 999px; background: #fafafa;
  transition: translate .5s var(--ease-spring); }
.screen.offbook .pills .thumb { translate: 100% 0; }
.controls .pill { position: relative; display: flex; align-items: center; justify-content: center; gap: .35em; padding: .6em 0; border-radius: 999px;
  font-size: .7em; font-weight: 700; color: rgba(255, 255, 255, .7); white-space: nowrap; transition: color .4s; }
.controls .pill:hover { color: #fff; }
.pill svg { width: 1.2em; height: 1.2em; }
.screen:not(.offbook) .pill.play, .screen.offbook .pill.off { color: #09090b; }
/* Until the visitor tries it, Off Book is lit, pulses a ring and nudges, so it reads as the thing to tap */
.pills.hint .pill.off { color: #fff; background: color-mix(in srgb, var(--spotlight) 55%, transparent);
  animation: nudge 2.4s var(--ease-spring) 2.6s infinite; }
.pills.hint .pill.off::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  animation: invite 2.4s ease-out 2.6s infinite; }
@keyframes nudge { 0%, 100% { scale: 1; } 8% { scale: 1.08; } 18% { scale: .98; } 26% { scale: 1; } }
@keyframes invite { 0% { box-shadow: 0 0 0 0 rgba(208, 140, 240, .95), 0 0 1.2em rgba(208, 140, 240, .6); }
  70%, 100% { box-shadow: 0 0 0 1em rgba(208, 140, 240, 0), 0 0 1.2em rgba(208, 140, 240, 0); } }
.controls .beep { width: 0; height: 2.4em; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: rgba(255, 255, 255, .12); color: #fff;
  opacity: 0; transform: scale(.5); transition: width .5s var(--ease-out), opacity .4s, transform .5s var(--ease-spring), background .3s; }
.controls .beep[aria-pressed="true"] { background: #a12dd2; }
.controls .beep[aria-pressed="false"] svg { opacity: .55; }
.beep svg { width: 1.1em; height: 1.1em; flex: none; }
.screen.offbook .controls .beep { width: 2.4em; opacity: 1; transform: none; }
.controls .beep.ring svg { animation: ring-once .6s ease-in-out; transform-origin: 50% 10%; }
@keyframes ring-once { 25% { rotate: 14deg; } 50% { rotate: -12deg; } 75% { rotate: 6deg; } }

.transport { display: flex; justify-content: center; align-items: center; gap: 18%; color: rgba(255, 255, 255, .8); }
.transport button { display: grid; place-items: center; transition: scale .2s var(--ease-spring), color .2s; }
.transport button:hover { color: #fff; }
.transport button:active { scale: .9; }
.transport svg { width: 1.3em; height: 1.3em; }
.transport .play { width: 3em; height: 3em; border-radius: 50%; background: #fafafa; color: #09090b; }
.transport .play:hover { color: #09090b; }
.transport .play svg { width: 1.2em; height: 1.2em; }
.screen:not(.paused) .play .when-paused, .screen.paused .play .when-playing { display: none; }
.screen.paused li .bars i { animation-play-state: paused; }

/* ─── Sections ────────────────────────────────────────────────────────────── */

section { position: relative; padding: clamp(80px, 12vw, 150px) 0; }
.section-head { max-width: 760px; margin: 0 auto clamp(48px, 7vw, 80px); text-align: center; display: grid; gap: 18px; justify-items: center; }
.section-head h2 { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; }

/* Scroll reveal: site.js adds .in once an element is on screen */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); filter: blur(8px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* ─── How it works ────────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; position: relative; }
.steps::before { /* the line that draws itself between the steps */
  content: ""; position: absolute; top: 47px; left: 16%; right: 16%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--partner), var(--spotlight), var(--neon-pink));
  transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease-out) .3s; }
.steps.in::before { transform: scaleX(1); }
.step { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 0 12px; }
.step .num { counter-increment: step; position: relative; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--card-edge); box-shadow: 0 20px 40px -20px var(--shadow); color: var(--spotlight-ink); }
.step .num svg { width: 38px; height: 38px; }
.step .num::after { content: counter(step); position: absolute; top: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--spotlight); color: #fff; font: 700 14px/30px var(--sans); text-align: center; box-shadow: 0 0 0 4px var(--stage); }
.step h3 { font-size: 24px; margin-top: 10px; }
.step p { color: var(--muted); max-width: 30ch; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .steps::before { top: 48px; bottom: 48px; left: 50%; right: auto; width: 2px; height: auto; transform: scaleY(0); transform-origin: top;
    background: linear-gradient(var(--partner), var(--spotlight), var(--neon-pink)); }
  .steps.in::before { transform: scaleY(1); }
  .step { background: var(--stage); padding: 8px 12px; }
}

/* ─── Features (bento) ────────────────────────────────────────────────────── */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; isolation: isolate; grid-column: span 2; min-height: 330px;
  padding: 30px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-edge);
  box-shadow: 0 30px 60px -40px var(--shadow); display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), opacity 1s var(--ease-out), filter 1s var(--ease-out);
}
.tile.wide { grid-column: span 3; }
.tile.hero-tile { grid-column: span 4; }
.tile:hover { box-shadow: 0 40px 80px -40px var(--shadow), 0 0 0 1px color-mix(in srgb, var(--spotlight) 35%, transparent); }
/* the glare that follows the pointer */
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--spotlight-soft), transparent 60%); }
.tile:hover::before { opacity: 1; }
.tile h3 { font-size: 25px; letter-spacing: -.02em; }
.tile p { color: var(--muted); font-size: 16px; text-wrap: pretty; }
.tile .art { flex: 1; display: grid; place-items: center; margin-bottom: 14px; min-height: 140px; }
.tile.in { transition-delay: 0s; }
@media (max-width: 980px) { .tile, .tile.wide, .tile.hero-tile { grid-column: span 3; } }
@media (max-width: 640px) { .tile, .tile.wide, .tile.hero-tile { grid-column: 1 / -1; min-height: 0; } }

/* Art: the recording waveform */
.wave { display: flex; align-items: center; gap: 5px; height: 110px; }
.wave i { width: 6px; border-radius: 3px; background: linear-gradient(var(--neon-pink), var(--spotlight)); height: calc(var(--h) * 1%);
  animation: wave 1.6s ease-in-out infinite; animation-delay: calc(var(--d) * -1s); opacity: .9; }
@keyframes wave { 50% { transform: scaleY(.35); } }
.rec { display: flex; align-items: center; gap: 22px; }
.rec-button { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--recording); display: grid; place-items: center; position: relative; flex: none; }
.rec-button::before { content: ""; width: 26px; height: 26px; border-radius: 7px; background: var(--recording); }
.rec-button::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--recording); animation: ping 1.6s var(--ease-out) infinite; }
@keyframes ping { from { opacity: .8; transform: scale(.85); } to { opacity: 0; transform: scale(1.3); } }

/* Art: voices, one per character */
.voices { display: grid; gap: 10px; width: 100%; max-width: 280px; }
.voice { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--stage); border: 1px solid var(--card-edge);
  transform: translateX(calc(var(--o) * 1px)); transition: transform .6s var(--ease-out); }
.tile:hover .voice { transform: none; }
.voice .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; }
.voice b { font-size: 14px; letter-spacing: .06em; }
.voice small { color: var(--muted); font-size: 13px; display: block; line-height: 1.2; }
.voice .bars { margin-left: auto; color: var(--partner); opacity: 1; }
.voice .bars i { animation: bar .9s ease-in-out infinite; }

/* Art: partners joining from a link */
.partners { position: relative; width: 160px; height: 160px; }
.partners .center-dot { position: absolute; inset: 50% auto auto 50%; width: 72px; height: 72px; margin: -36px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 30px -8px var(--spotlight); z-index: 2; }
.partners .orbit { position: absolute; inset: 0; border: 1.5px dashed var(--raised); border-radius: 50%; animation: spin 24s linear infinite; }
.partners .orbit span { position: absolute; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 4px var(--card); animation: spin 24s linear infinite reverse; }
.partners .orbit span:nth-child(1) { left: -20px; top: calc(50% - 20px); background: var(--partner); }
.partners .orbit span:nth-child(2) { right: 4px; top: 4px; background: var(--neon-pink); }
.partners .orbit span:nth-child(3) { right: 4px; bottom: 4px; background: #22a06b; }
@keyframes spin { to { rotate: 360deg; } }

/* Art: the open road for Auto-Advance */
.road { position: relative; width: 100%; max-width: 300px; height: 130px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(var(--stage), color-mix(in srgb, var(--spotlight) 10%, var(--stage))); border: 1px solid var(--card-edge); }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 26px, transparent 26px 52px); opacity: .5; animation: drive 1s linear infinite; }
@keyframes drive { to { background-position: -52px 0; } }
.road .queue { position: absolute; inset: 0; display: flex; align-items: center; gap: 10px; padding-inline: 16px; animation: queue 6s var(--ease-out) infinite; }
.road .queue span { flex: none; padding: 8px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--card-edge); font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 20px -10px var(--shadow); }
.road .queue span:first-child { background: var(--spotlight); color: #fff; }
@keyframes queue { 0%, 30% { transform: translateX(0); } 45%, 75% { transform: translateX(-104px); } 90%, 100% { transform: translateX(0); } }

/* Art: scanning a script page */
.page { position: relative; width: 150px; height: 190px; border-radius: 10px; background: light-dark(#fff, #f4f1ea); color: #222;
  box-shadow: 0 20px 40px -20px var(--shadow), 0 0 0 1px var(--card-edge); padding: 18px 16px; overflow: hidden; rotate: -4deg; transition: rotate .6s var(--ease-spring); }
.tile:hover .page { rotate: 0deg; }
.page i { display: block; height: 5px; border-radius: 3px; background: #c9c3d4; margin: 8px 0; }
.page i.name { width: 34%; margin: 14px auto 6px; background: #8e24c4; opacity: .55; }
.page::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; top: -40px;
  background: linear-gradient(transparent, rgba(63, 208, 240, .35), transparent); border-bottom: 2px solid var(--neon-cyan); animation: scan 3s var(--ease-out) infinite; }
@keyframes scan { 0% { top: -40px; } 70%, 100% { top: 100%; } }
.corner { position: absolute; width: 18px; height: 18px; border: 3px solid var(--neon-cyan); }
.corner.a { top: -10px; left: -10px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.corner.b { top: -10px; right: -10px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.corner.c { bottom: -10px; left: -10px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.corner.d { bottom: -10px; right: -10px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.scan { position: relative; }

/* Art: Off Book, your lines hidden. The eye looks, then the slash draws across and it dims. */
.offbook-art { width: 86px; height: 86px; border-radius: 26px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--spotlight), var(--neon-pink)); box-shadow: 0 16px 40px -14px var(--spotlight); }
.offbook-art svg { width: 42px; height: 42px; }
.offbook-art .eye { animation: look-away 4s var(--ease-out) infinite; }
.offbook-art .slash { stroke-dasharray: 1; stroke-dashoffset: 1; animation: slash-in 4s var(--ease-out) infinite; }
@keyframes slash-in { 0%, 30% { stroke-dashoffset: 1; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes look-away { 0%, 30%, 100% { opacity: 1; } 45%, 85% { opacity: .55; } }

/* Art: private by design */
.vault { position: relative; width: 100px; height: 100px; display: grid; place-items: center; color: var(--spotlight-ink); }
.vault svg { width: 54px; height: 54px; position: relative; }
.vault::before { content: ""; position: absolute; inset: 0; border-radius: 30px; background: var(--spotlight-soft);
  border: 1px solid color-mix(in srgb, var(--spotlight) 30%, transparent); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); } }
.vault .faceid-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trace 4s var(--ease-out) infinite; }
@keyframes trace { 0% { stroke-dashoffset: 1; } 40%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

/* ─── Off Book spotlight (the big quote) ─────────────────────────────────── */

.marquee-quote { text-align: center; padding-block: clamp(40px, 6vw, 80px); }
.marquee-quote blockquote { margin: 0 auto; max-width: 18ch; font-family: var(--serif); font-size: clamp(40px, 6.5vw, 86px); line-height: 1.08; letter-spacing: -.02em; }
.marquee-quote blockquote .word { display: inline-block; opacity: .14; transition: opacity .6s, filter .6s; }
.marquee-quote blockquote .word.lit { opacity: 1; }
.marquee-quote blockquote .hidden-line { color: var(--spotlight-ink); font-style: italic; }
.marquee-quote .caption { margin-top: 30px; color: var(--muted); }

/* ─── Closing call ────────────────────────────────────────────────────────── */

.finale { text-align: center; overflow: hidden; }
.finale .logo { width: 150px; height: 150px; margin: 0 auto 36px; border-radius: 36px; position: relative; }
.finale .logo img { border-radius: 36px; position: relative; z-index: 1; }
.finale .logo::before { content: ""; position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(var(--spotlight), transparent 65%);
  opacity: calc(var(--glow) * .6); animation: breathe 5s ease-in-out infinite; }
.finale.in .logo img { animation: flicker 1.6s linear both; }
@keyframes flicker { 0% { opacity: 0; } 10% { opacity: .8; } 12% { opacity: .1; } 20% { opacity: 1; } 22% { opacity: .3; } 30%, 100% { opacity: 1; } }
.finale h2 { font-size: clamp(48px, 8vw, 104px); font-weight: 800; letter-spacing: -.05em; }
.finale .lede { margin: 22px auto 36px; max-width: 32ch; }
.finale .actions { display: grid; justify-items: center; gap: 14px; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--card-edge); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
footer nav { display: flex; gap: 26px; }
footer a { transition: color var(--quick); }
footer a:hover { color: var(--ink); }

/* ─── Privacy policy ──────────────────────────────────────────────────────── */

.legal { padding: 140px 0 100px; }
.legal article { width: min(720px, 100% - 40px); margin: 0 auto; }
.legal h1 { font-size: clamp(44px, 6vw, 64px); font-weight: 800; }
.legal .effective { margin: 14px 0 44px; color: var(--muted); }
.legal h2 { font-size: 24px; margin: 48px 0 14px; letter-spacing: -.015em; }
.legal p, .legal li { color: color-mix(in srgb, var(--ink) 82%, var(--muted)); }
.legal p + p { margin-top: 14px; }
.legal ul { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.legal strong { color: var(--ink); }
.legal a { color: var(--spotlight-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal .toc { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.legal .toc a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--card); border: 1px solid var(--card-edge);
  color: var(--ink); transition: background var(--quick), transform var(--quick) var(--ease-spring); }
.legal .toc a:hover { background: var(--spotlight-soft); transform: translateY(-2px); }

.not-found { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px 20px; }
.not-found h1 { font-size: clamp(56px, 10vw, 120px); font-weight: 800; letter-spacing: -.05em; }
.not-found p { margin: 18px auto 32px; color: var(--muted); max-width: 30ch; }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 600; color: #fff;
  background: var(--spotlight); box-shadow: 0 14px 30px -12px var(--spotlight); transition: transform var(--quick) var(--ease-spring); }
.button:hover { transform: translateY(-2px) scale(1.03); }

/* ─── Reduced motion: everything still appears, nothing moves ────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-motion: reduce) { .offbook-art .slash { animation: none; stroke-dashoffset: 0; } .offbook-art .eye { animation: none; opacity: .55; } }
