/* =========================================================
   MEET ABHINAV: a 9:16 vertical story (/meet.html)

   Laptop: the 9:16 frame sits centred with the words beside it,
   over a blurred wash of the current shot.
   Phone: the frame is the whole screen and the words overlay it.

   Layout and look only. Every state change (current shot, which
   beat shows, where the camera sits) comes from assets/js/meet.js,
   which reads scroll position.
   ========================================================= */

html:has(.meet) { scroll-behavior: auto; overflow-anchor: none; }

.wrapper--story { width: 100%; max-width: 100%; }

.meet {
  --story-top: 52px;
  --stage-h: calc(100vh - var(--story-top));
  --rail-room: 92px;
  --frame-h: min(calc(var(--stage-h) - var(--rail-room) - 24px), 920px);
  --frame-w: calc(var(--frame-h) * 9 / 16);
  --gap: clamp(32px, 5vw, 84px);
  --text-w: min(440px, calc(100vw - var(--frame-w) - var(--gap) - 12vw));
  --young: #2dd4bf;
  --present: #a78bfa;
  position: relative;
  width: 100vw;
  margin: 0 calc(50% - 50vw);
}

@supports (height: 100svh) {
  .meet { --stage-h: calc(100svh - var(--story-top)); }
}

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

/* ── Chapter: tall scroll track with a pinned stage ── */
.ch { position: relative; height: calc(var(--len) * 1vh); }

.ch-stage {
  position: sticky;
  top: var(--story-top);
  height: var(--stage-h);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: var(--rail-room);
  box-sizing: border-box;
  background: #04040c;
}

/* Blurred wash of the current shot around the frame */
.ambient { position: absolute; inset: 0; overflow: hidden; }

.ambient__layer {
  position: absolute;
  inset: -12%;
  background: radial-gradient(ellipse 60% 55% at 62% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.ambient__layer--photo { filter: blur(60px) saturate(1.3) brightness(.4); }
.ambient__layer.is-current { opacity: 1; }

.ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 4, 12, .92) 0%, rgba(4, 4, 12, .55) 45%, rgba(4, 4, 12, .25) 100%),
    radial-gradient(ellipse at center, transparent 40%, rgba(4, 4, 12, .7) 100%);
}

/* ── The 9:16 frame ── */
.frame {
  position: relative;
  z-index: 2;
  flex: none;
  width: var(--frame-w);
  height: var(--frame-h);
  margin-left: calc(var(--text-w) + var(--gap));
}

.frame-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 24px;
  background: #05050f;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .07),
    0 40px 120px rgba(0, 0, 0, .75),
    0 0 90px color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

/* Shots crossfade with a slight settle */
.shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .9s;
}

.shot.is-current {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.16, 1, .3, 1), visibility 0s;
}

.shot__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  user-select: none;
}

/* Drawn sets for cut-out shots */
.set__sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 70% at 50% 108%, color-mix(in srgb, var(--accent) 30%, #0b0b24), transparent 62%),
    linear-gradient(180deg, #05050f 0%, #0b0b26 55%, #120f30 100%);
}

.set__stars {
  position: absolute;
  inset: -20% 0 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1px 1px at 72% 12%, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.5px 1.5px at 38% 42%, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1px 1px at 86% 58%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 1px at 55% 28%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1px 1px at 24% 66%, rgba(255, 255, 255, .5), transparent);
  background-size: 180px 180px;
  animation: meet-twinkle 5s ease-in-out infinite alternate;
}

@keyframes meet-twinkle { to { opacity: .45; } }

.set__nebula {
  position: absolute;
  width: 140%;
  height: 60%;
  left: -20%;
  top: 4%;
  background:
    radial-gradient(ellipse 40% 50% at 30% 50%, rgba(167, 139, 250, .28), transparent 70%),
    radial-gradient(ellipse 35% 40% at 70% 40%, rgba(45, 212, 191, .18), transparent 70%);
  filter: blur(10px);
}

.set__planet {
  position: absolute;
  right: 12%;
  top: 14%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 70%, #f3dfb0, #c99a5a 55%, #4a3218);
  box-shadow: 0 0 40px rgba(243, 223, 176, .25);
}

.set__planet span {
  position: absolute;
  inset: 40% -58%;
  border-radius: 50%;
  border: 2px solid rgba(236, 214, 168, .55);
  transform: rotate(-18deg);
}

.set--blueprint .set__sky {
  background:
    radial-gradient(ellipse 120% 70% at 50% 108%, rgba(251, 191, 36, .2), transparent 62%),
    linear-gradient(180deg, #06060f 0%, #0d0c1e 100%);
}

.set__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(251, 191, 36, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 191, 36, .08) 1px, transparent 1px),
    linear-gradient(rgba(251, 191, 36, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 191, 36, .035) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
          mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}

.set--lab .set__sky {
  background:
    radial-gradient(ellipse 90% 60% at 50% 30%, rgba(244, 114, 182, .16), transparent 70%),
    linear-gradient(180deg, #05050f 0%, #0d0a1f 100%);
}

/* Self-drawing strokes, scrubbed through stroke-dashoffset */
.frame-media .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }

.fx-gear {
  position: absolute;
  left: 4%;
  top: 6%;
  width: 92%;
  color: rgba(251, 191, 36, .55);
}

.fx-note {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: rgba(251, 191, 36, .6);
  opacity: 0;
}

.fx-pixels {
  position: absolute;
  left: -8%;
  top: 8%;
  width: 124%;
  overflow: visible;
}

.fx-pixels .kernel { stroke: #2dd4bf; opacity: 0; }
.fx-pixels .detect { stroke: #f472b6; stroke-dasharray: 1; stroke-dashoffset: 1; }
.fx-pixels .detect-label { opacity: 0; }
.fx-pixels .detect-label rect { fill: #f472b6; }
.fx-pixels .detect-label text { fill: #04040c; font: 600 14px var(--font-mono); }
.fx-pixels .conv { opacity: 0; color: #a78bfa; }

.fx-constellation {
  position: absolute;
  left: 4%;
  top: 7%;
  width: 92%;
  color: rgba(200, 255, 245, .85);
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, .7));
  z-index: 2;
}

/* Prologue rewind */
.rewind {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 12, .5);
}

.rewind__bars {
  position: absolute;
  inset: 0 -80% 0 0;
  background: repeating-linear-gradient(90deg,
      transparent 0 30px, rgba(167, 139, 250, .16) 30px 32px,
      transparent 32px 70px, rgba(45, 212, 191, .14) 70px 71px);
}

.rewind__label {
  position: relative;
  font-family: var(--font-mono);
  font-size: clamp(.9rem, 2vw, 1.3rem);
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--ink-full, #f0eeff);
  text-shadow: 0 0 24px rgba(167, 139, 250, .9);
}

.rewind__glyph { letter-spacing: -.1em; margin-right: .5em; color: var(--pulsar, #2dd4bf); }

/* Cinematic finish: legibility shade and fine grain */
.frame-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 4, 12, .55) 0%, transparent 16%),
    linear-gradient(0deg, rgba(4, 4, 12, .7) 0%, transparent 34%),
    radial-gradient(ellipse 90% 70% at 50% 50%, transparent 60%, rgba(0, 0, 0, .45) 100%);
}

.frame-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Actors: cut-out characters on a set ── */
.actor {
  position: absolute;
  z-index: 1;
  bottom: -2%;
  left: var(--x);
  height: var(--h);
  aspect-ratio: 3 / 4;
  opacity: 0;
  visibility: hidden;
}

.actor__body {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.actor__body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--accent) 30%, transparent)) drop-shadow(0 18px 30px rgba(0, 0, 0, .5));
  -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 18%);
          mask-image: linear-gradient(0deg, transparent 0%, #000 18%);
  animation: meet-breathe 4.8s ease-in-out infinite;
  user-select: none;
}

.actor--young .actor__body img { animation-duration: 4.1s; animation-delay: -1.3s; }

@keyframes meet-breathe {
  0%, 100% { transform: scale(1, 1) rotate(0); }
  50% { transform: scale(1.008, 1.016) rotate(-.5deg); }
}

.actor__body:focus-visible { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 12px; }
.actor.is-poked .actor__body img { animation: meet-hop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes meet-hop { 40% { transform: translateY(-6%) rotate(2deg); } }

/* ── Frame UI: story bars, words, dialogue ── */
.frame-ui {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 18px;
  pointer-events: none;
}

.frame-ui a,
.frame-ui button { pointer-events: auto; }

.story-bars {
  display: flex;
  gap: 4px;
  flex: none;
}

.story-bar {
  flex: 1;
  height: 16px;
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.story-bar span {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
  position: relative;
}

.story-bar span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  transform: scaleX(var(--f, 0));
  box-shadow: 0 0 6px rgba(255, 255, 255, .7);
}

.story-bar:hover span { background: rgba(255, 255, 255, .38); }

/* Words: beside the frame on a laptop */
.ch-text {
  position: absolute;
  right: calc(100% + var(--gap));
  top: 50%;
  width: var(--text-w);
  translate: 0 -50%;
  pointer-events: auto;
}

.ch-kicker {
  display: flex;
  align-items: center;
  gap: .9em;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, white);
}

.ch-num {
  padding: .25em .6em;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  letter-spacing: .12em;
}

.ch-title {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 3.8vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.01em;
  color: var(--ink-full, #f0eeff);
}

.ch-title--hero { font-size: clamp(3rem, 6vw, 5.6rem); }

.beat-stack { display: grid; }
.beat-stack > * { grid-area: 1 / 1; }

.beat {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  filter: blur(4px);
  transition: opacity .5s ease, transform .7s cubic-bezier(.16, 1, .3, 1), filter .5s ease, visibility 0s linear .5s;
}

.beat.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition: opacity .6s ease .1s, transform .8s cubic-bezier(.16, 1, .3, 1) .1s, filter .6s ease .1s, visibility 0s;
}

.narr {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2.05rem);
  font-weight: 400;
  line-height: 1.28;
  color: var(--ink-high, #d4cef5);
}

.scroll-hint {
  margin-top: 2.2rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-mid, #9189c4);
}

.scroll-hint span::after {
  content: '';
  display: block;
  width: 1px;
  height: 36px;
  margin-top: .8rem;
  background: linear-gradient(var(--nebula, #a78bfa), transparent);
  transform-origin: top;
  animation: meet-hint 1.8s ease-in-out infinite;
}

@keyframes meet-hint {
  0% { transform: scaleY(0); opacity: 1; }
  80% { transform: scaleY(1); opacity: 0; }
  100% { opacity: 0; }
}

/* Astromate counter */
.astro-count { margin-top: 1.6rem; line-height: 1; }

.astro-count__num,
.astro-count__plus {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(3.4rem, 6.4vw, 6.4rem);
  color: var(--pulsar, #2dd4bf);
  text-shadow: 0 0 50px rgba(45, 212, 191, .5);
  font-variant-numeric: tabular-nums;
}

.astro-count__plus { color: var(--quasar, #fbbf24); }

.astro-count__label {
  display: block;
  margin-top: .6rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mid, #9189c4);
}

.astro-count__label a { color: var(--pulsar, #2dd4bf); text-decoration: none; }
.astro-count__label a:hover { text-decoration: underline; }

/* Research: the questions he chases, arriving one after another */
.obsessions { margin-top: 1.3rem; }

.obsessions__lead {
  margin: 0 0 .7rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 75%, white);
}

.obsessions__list {
  display: grid;
  gap: .7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.obsessions__list li {
  position: relative;
  display: grid;
  gap: .25rem;
  padding-left: 1.1rem;
  opacity: 0;
  transform: translateX(-14px);
  filter: blur(4px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1), filter .6s ease;
}

.obsessions__list li::before {
  content: "?";
  position: absolute;
  left: 0;
  top: .05em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05em;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
  animation: obs-glow 2.6s ease-in-out infinite;
  animation-delay: calc(var(--i) * .5s);
}

.obsessions__q {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.35;
  color: var(--ink-full, #f0eeff);
}

.obsessions__tag {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mid, #9189c4);
}

.obsessions.is-on li {
  opacity: 1;
  transform: none;
  filter: none;
  transition-delay: calc(var(--i) * 420ms + 150ms);
}

@keyframes obs-glow {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .obsessions__list li { transition: opacity .3s ease; transform: none; filter: none; }
  .obsessions__list li::before { animation: none; }
}

/* Travel: flags pinned on like souvenirs, the trip in progress still in pencil */
.stamps {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem .6rem;
  margin: .95rem 0 .2rem;
  padding: 0;
  list-style: none;
}

.stamp {
  position: relative;
  display: grid;
  justify-items: center;
  gap: .3rem;
  width: 3.6rem;
  rotate: calc(-4deg + mod(var(--i) * 7, 9) * 1deg);
  opacity: 0;
  scale: 1.6;
  transition: opacity .25s ease, scale .35s cubic-bezier(.3, 1.6, .5, 1);
}

.stamp__flag {
  display: block;
  width: 2.5rem;
  height: 1.67rem;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 4px 10px rgba(0, 0, 0, .45);
}

/* a soft sheen so the flags read as cloth, not stickers */
.stamp::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2.5rem;
  height: 1.67rem;
  translate: -50% 0;
  border-radius: 3px;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .28) 45%, transparent 60%);
  background-size: 250% 100%;
  background-position: 100% 0;
  pointer-events: none;
}

.stamp__name {
  font-family: var(--font-mono);
  font-size: .54rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mid, #9189c4);
  white-space: nowrap;
}

.stamp__state {
  position: absolute;
  top: -.5rem;
  right: -.15rem;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #120d24;
  font-family: var(--font-mono);
  font-size: .46rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.stamp--next .stamp__flag {
  filter: saturate(.6);
  opacity: .8;
  outline: 1.5px dashed var(--accent);
  outline-offset: 3px;
}

.facet.is-on .stamp {
  opacity: 1;
  scale: 1;
  transition-delay: calc(var(--i) * 140ms + 350ms);
}

.facet.is-on .stamp::after {
  animation: flag-sheen 1.1s ease calc(var(--i) * 140ms + 700ms) both;
}

@keyframes flag-sheen { to { background-position: -50% 0; } }

@media (prefers-reduced-motion: reduce) {
  .facet.is-on .stamp::after { animation: none; }
}

/* Intermission */
.cine-link { margin: 1.2rem 0 0; }

/* Beyond */
.facet-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0 1rem; }

.facet-tab {
  padding: .38rem .78rem;
  border: 1px solid rgba(251, 146, 60, .28);
  border-radius: 999px;
  background: rgba(10, 10, 28, .4);
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .06em;
  color: var(--ink-mid, #9189c4);
  cursor: pointer;
  transition: color .3s, border-color .3s, background .3s;
}

.facet-tab:hover,
.facet-tab:focus-visible { color: var(--ink-full, #f0eeff); border-color: rgba(251, 146, 60, .6); }
.facet-tab[aria-selected="true"] { color: #04040c; background: var(--supernova, #fb923c); border-color: var(--supernova, #fb923c); }

.facet__title {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  color: var(--ink-full, #f0eeff);
}

.facet__text {
  margin: 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem);
  color: var(--ink-high, #d4cef5);
}

.facet__link {
  display: inline-block;
  margin-top: .7rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--supernova, #fb923c);
  text-decoration: none;
}

.facet__link:hover { text-decoration: underline; }

/* Finale */
.finale-head {
  margin: 1.6rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  background: var(--grad-text, linear-gradient(90deg, #a78bfa, #2dd4bf));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.finale-close { margin-top: 1.2rem; }

.finale-close__line {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-mid, #9189c4);
}

.finale-close__links { display: flex; flex-wrap: wrap; gap: .5rem; }

.story-btn {
  padding: .58rem 1.05rem;
  border: 1px solid var(--nebula, #a78bfa);
  border-radius: 999px;
  background: var(--nebula, #a78bfa);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: #04040c;
  text-decoration: none;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}

.story-btn--ghost { background: rgba(10, 10, 28, .4); color: var(--ink-high, #d4cef5); border-color: rgba(167, 139, 250, .38); }
.story-btn:hover,
.story-btn:focus-visible { background: var(--pulsar, #2dd4bf); border-color: var(--pulsar, #2dd4bf); color: #04040c; }

/* Dialogue: subtitles in the lower third of the frame.
   Each speaker has a row, so lines never jump around as others appear. */
.bubbles {
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
  margin-top: auto;
}

.bubble {
  grid-column: 1;
  position: relative;
  max-width: 86%;
  margin: 0;
  padding: .7rem .95rem .75rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(8, 8, 24, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
          backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.32;
  color: var(--ink-full, #f0eeff);
  pointer-events: none;
}

.bubble--young { grid-row: 1; justify-self: end; border-bottom-right-radius: 4px; }
.bubble--present { grid-row: 2; justify-self: start; border-bottom-left-radius: 4px; }

.bubble__who {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: .56rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.bubble--young .bubble__who { color: var(--young); }
.bubble--present .bubble__who { color: var(--present); }

.bubble--quip {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.97);
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s;
}

.bubble--quip.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .3s ease, visibility 0s; }

/* ── Journey timeline (laptop) ── */
.journey {
  position: fixed;
  z-index: 450;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .5rem .85rem .5rem 1.2rem;
  border: 1px solid rgba(167, 139, 250, .18);
  border-radius: 999px;
  background: rgba(7, 7, 26, .82);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  translate: -50% 0;
  transition: opacity .4s ease, transform .4s ease;
}

.meet:not(.is-live) .journey { opacity: 0; transform: translateY(20px); pointer-events: none; }

body:has(.meet) .top { bottom: 84px; }

/* Story mode: the story is the whole page, so the site footer stays out of it */
body:has(.meet) .main-footer { display: none; }

.journey__intro {
  display: grid;
  gap: 3px;
  width: 8.6rem;
  line-height: 1.1;
}

.journey__label {
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-mid, #9189c4);
  white-space: nowrap;
}

.journey__step,
.journey__motion {
  border: 1px solid rgba(167, 139, 250, .25);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-high, #d4cef5);
  cursor: pointer;
  transition: border-color .3s, color .3s, opacity .3s;
}

.journey__step {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: .85rem;
  line-height: 1;
}
.journey__step:disabled { opacity: .3; cursor: default; }
.journey__step:not(:disabled):hover,
.journey__motion:hover { border-color: var(--nebula, #a78bfa); color: var(--ink-full, #f0eeff); }

.journey__motion {
  padding: .4rem .7rem;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .08em;
  white-space: nowrap;
}

.journey__motion-off,
.meet.is-still .journey__motion-on { display: none; }
.meet.is-still .journey__motion-off { display: inline; }

.journey__track {
  --n: 7;
  position: relative;
  flex: none;
  width: min(420px, 36vw);
  height: 30px;
  margin-inline: 14px;
  cursor: grab;
  touch-action: none;
}

.journey__track.is-dragging { cursor: grabbing; }

.journey__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  translate: 0 -50%;
  border-radius: 2px;
  background: rgba(167, 139, 250, .16);
}

.journey__fill {
  height: 100%;
  width: calc(var(--fill, 0) * 100%);
  border-radius: inherit;
  background: var(--grad-text, linear-gradient(90deg, #a78bfa, #2dd4bf));
  box-shadow: 0 0 10px rgba(167, 139, 250, .6);
}

.journey__mark {
  position: absolute;
  top: 50%;
  left: calc(var(--pos) / (var(--n) - 1) * 100%);
  display: block;
  padding: 0;
  border: 0;
  background: none;
  translate: -50% -50%;
  cursor: pointer;
  color: var(--ink-low, #4d4870);
}

.journey__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #07071a;
  font-family: var(--font-mono);
  font-size: .56rem;
  transition: color .3s, background .3s, box-shadow .3s, transform .3s;
}

/* Chapter name: a small tooltip above the dot on hover or focus */
.journey__name {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  padding: .25rem .5rem;
  border: 1px solid rgba(167, 139, 250, .25);
  border-radius: 6px;
  background: rgba(7, 7, 26, .92);
  font-family: var(--font-mono);
  font-size: .56rem;
  letter-spacing: .06em;
  white-space: nowrap;
  color: var(--ink-high, #d4cef5);
  opacity: 0;
  translate: -50% 4px;
  pointer-events: none;
  transition: opacity .25s, translate .25s;
}

.journey__mark.is-past { color: var(--ink-mid, #9189c4); }
.journey__mark:hover .journey__name,
.journey__mark:focus-visible .journey__name { opacity: 1; translate: -50% 0; }

.journey__mark[aria-current="step"] { color: var(--pulsar, #2dd4bf); }
.journey__mark[aria-current="step"] .journey__num {
  background: var(--pulsar, #2dd4bf);
  color: #04040c;
  box-shadow: 0 0 14px rgba(45, 212, 191, .7);
  transform: scale(1.12);
}

.journey__now {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .04em;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--pulsar, #2dd4bf);
}


/* ── Play / pause ── */
.play-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(45, 212, 191, .45);
  border-radius: 50%;
  background: rgba(45, 212, 191, .1);
  color: var(--pulsar, #2dd4bf);
  cursor: pointer;
  transition: background .3s, border-color .3s, color .3s;
}
.play-btn:hover { background: rgba(45, 212, 191, .22); }
.play-btn svg { width: 13px; height: 13px; fill: currentColor; }
.play-btn__play { display: none; }
.play-btn[aria-pressed="false"] .play-btn__pause { display: none; }
.play-btn[aria-pressed="false"] .play-btn__play { display: block; }
.play-btn[aria-pressed="false"] {
  border-color: rgba(167, 139, 250, .5);
  background: rgba(167, 139, 250, .14);
  color: var(--ink-full, #f0eeff);
}

/* The phone gets its own button, floating over the frame */
.play-fab { display: none; }

/* A thin "now playing" pulse on the active story bar while the story rolls */
.meet.is-playing .story-bar { transition: none; }

/* Side quest: game HUD */
.hud {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  font-family: Impact, 'Arial Black', 'Helvetica Neue', sans-serif;
}

.hud__toast {
  position: absolute;
  bottom: 8%;
  left: 5%;
  display: grid;
  gap: 2px;
  max-width: 78%;
  padding: .6rem .9rem;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: rgba(0, 0, 0, .72);
  visibility: hidden;
}
.hud__toast-k {
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.hud__toast-t { font-size: 1.05rem; letter-spacing: .02em; color: #fff; }

.hud__wanted {
  position: absolute;
  top: 9%;
  right: 5%;
  display: flex;
  gap: 2px;
  font-size: 1.15rem;
  line-height: 1;
  visibility: hidden;
}
.hud__star { position: relative; color: rgba(0, 0, 0, .55); -webkit-text-stroke: 1px rgba(255, 255, 255, .7); }
.hud__star-on {
  position: absolute;
  inset: 0;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, .8);
  visibility: hidden;
}

.hud__passed {
  position: absolute;
  top: 34%;
  left: 0;
  right: 0;
  display: grid;
  justify-items: center;
  gap: .2rem;
  padding: .9rem 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .6) 20%, rgba(0, 0, 0, .6) 80%, transparent);
  visibility: hidden;
}
.hud__passed-t {
  font-size: clamp(1.9rem, 4.4vh, 2.6rem);
  letter-spacing: .02em;
  color: #f5c518;
  -webkit-text-stroke: 1.5px #000;
  text-shadow: 3px 3px 0 #000;
}
.hud__passed-s {
  font-size: 1.05rem;
  color: #fff;
  -webkit-text-stroke: 1px #000;
}

/* Narration arrives word by word, like a subtitle being written */
.narr .w {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(.35em);
  transition: opacity .45s ease, filter .45s ease, transform .6s cubic-bezier(.16, 1, .3, 1);
}
.is-on > .narr .w {
  opacity: 1;
  filter: none;
  transform: none;
  transition-delay: calc(var(--w) * 38ms + 60ms);
}
.meet.is-still .narr .w { transition: opacity .3s ease; transition-delay: 0s; filter: none; transform: none; }

/* Intermission: film leader, letterbox, projector flicker */
.cine { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

.cine__leader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #3a3226 0%, #15120d 70%);
  color: rgba(240, 230, 210, .75);
}

.cine__leader svg { position: absolute; width: 74%; }
.cine__sweep { opacity: .22; }

.cine__num {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vh, 8rem);
  line-height: 1;
  color: #f0e6d2;
}

.cine__bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 9%;
  background: #000;
  transform: scaleY(0);
}
.cine__bar--top { top: 0; transform-origin: top; }
.cine__bar--bot { bottom: 0; transform-origin: bottom; }

.cine__flicker {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 235, 200, .07), transparent 60%);
  mix-blend-mode: screen;
  animation: cine-flicker 3.2s steps(1) infinite;
}

@keyframes cine-flicker {
  0%, 100% { opacity: .9; }
  12% { opacity: .55; }
  14% { opacity: 1; }
  47% { opacity: .75; }
  49% { opacity: .95; }
  78% { opacity: .6; }
  80% { opacity: 1; }
}

.meet.is-still .cine__flicker { animation: none; }

/* Far-jump transition */
.warp {
  position: fixed;
  inset: 0;
  z-index: 440;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(167, 139, 250, .06) 3px 4px),
    radial-gradient(ellipse at center, rgba(13, 13, 34, .7), #04040c 75%);
  transition: opacity .26s ease;
}

.meet.is-warping .warp { opacity: 1; }

/* ── Paused motion and reduced motion ── */
.meet.is-still .set__stars,
.meet.is-still .actor__body img,
.meet.is-still .scroll-hint span::after { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .meet .set__stars,
  .meet .actor__body img,
  .meet .scroll-hint span::after { animation: none; }
  .meet .beat,
  .meet .shot { transition-duration: .01s; transform: none; filter: none; }
}

/* ── No-GSAP fallback: a plain readable page ── */
.meet.is-static .ch { height: auto; }
.meet.is-static .ch-stage { position: relative; top: 0; height: auto; min-height: 100vh; padding: 3rem 0; }
.meet.is-static .shot:first-child,
.meet.is-static .actor { opacity: 1; visibility: visible; transform: translateX(-50%); }
.meet.is-static .beat-stack { display: block; }
.meet.is-static .beat { opacity: 1; visibility: visible; transform: none; filter: none; margin-bottom: .8rem; }
.meet.is-static .scroll-hint,
.meet.is-static .rewind,
.meet.is-static .cine,
.meet.is-static .hud,
.meet.is-static .play-btn,
.meet.is-static .journey,
.meet.is-static .bubble--quip { display: none; }

/* ── Tablet: tighter beside layout ── */
@media (max-width: 1100px) {
  .meet { --gap: 32px; }
  .journey__intro { display: none; }
  .ch-title { font-size: clamp(2rem, 3.6vw, 3rem); }
}

/* ── Phone: the frame is the screen, words overlay it ── */
@media (max-width: 760px) {
  /* The HUD steps below the overlaid title on a phone */
  .hud__toast { bottom: auto; top: 26%; }
  .hud__wanted { top: 23%; font-size: 1rem; }
  .ch-body:has(.obsessions.is-on) .beat-stack { display: none; }
  .play-fab {
    position: fixed;
    z-index: 460;
    top: calc(var(--story-top) + 28px);
    right: 14px;
    display: grid;
    width: 34px;
    height: 34px;
    background: rgba(7, 7, 26, .55);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
  }
  .meet:not(.is-live) .play-fab { opacity: 0; pointer-events: none; }
  .meet { --rail-room: 0px; }

  .ch { height: calc(var(--len) * .85vh); }

  .ch-stage { padding: 0; }
  .ambient { display: none; }

  .frame { width: 100%; height: 100%; margin: 0; }
  .frame-media { border-radius: 0; box-shadow: none; }

  .frame-shade {
    background:
      linear-gradient(180deg, rgba(4, 4, 12, .8) 0%, rgba(4, 4, 12, .35) 24%, transparent 36%),
      linear-gradient(0deg, rgba(4, 4, 12, .94) 0%, rgba(4, 4, 12, .7) 30%, transparent 56%);
  }

  .frame-ui { padding: 8px 14px 18px; }

  .ch-text { display: contents; }
  .story-bars { order: 0; }
  .ch-head { order: 1; margin-top: .9rem; }
  .bubbles { order: 3; margin-bottom: .8rem; }
  .ch-body { order: 4; pointer-events: auto; }

  .ch-kicker { margin-bottom: .5rem; font-size: .62rem; }
  .ch-title { margin: 0; font-size: clamp(1.9rem, 8.4vw, 2.4rem); text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }
  .ch-title--hero { font-size: clamp(2.6rem, 12vw, 3.2rem); }
  .narr { font-size: .98rem; line-height: 1.5; color: #ece8ff; text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
  .scroll-hint { margin-top: 1rem; }

  .bubble { max-width: 90%; font-size: 1rem; }

  .astro-count { margin-top: .8rem; }
  .astro-count__num,
  .astro-count__plus { font-size: 3rem; }

  .obsessions { margin-top: .8rem; }
  .obsessions__list { gap: .45rem; }
  .obsessions__q { font-size: .92rem; }

  .facet-tabs { margin: .7rem 0 .6rem; gap: .3rem; }
  .facet-tab { font-size: .58rem; padding: .28rem .55rem; }
  .finale-head { margin-top: .8rem; font-size: 1.5rem; }
  .finale-close__line { margin-bottom: .7rem; }

  .fx-note { display: none; }

  /* The story bars are the navigation here; the laptop rail steps aside */
  .journey { display: none; }
  body:has(.meet) .top { display: none; }
}

/* Reaction stickers: one face per line, popping in before the words */
.narr-line { display: flex; align-items: center; gap: 1rem; }

.react {
  flex: none;
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 45%, #1a1433), #120d24 72%);
  box-shadow: 0 0 0 2px var(--accent), 0 10px 26px rgba(0, 0, 0, .5);
  scale: .3;
  rotate: -18deg;
  opacity: 0;
  transition: scale .3s ease, rotate .3s ease, opacity .2s ease;
}

.is-on > .react,
.is-on > .facet__title > .react {
  scale: 1;
  rotate: 0deg;
  opacity: 1;
  transition: scale .55s cubic-bezier(.3, 1.7, .5, 1) .05s, rotate .6s cubic-bezier(.3, 1.7, .5, 1) .05s, opacity .2s ease .05s;
}

.facet__title { display: flex; align-items: center; gap: .7rem; }
.react--sm { width: 3.2rem; height: 3.2rem; }
.facet.is-on .react { scale: 1; rotate: 0deg; opacity: 1; transition: scale .55s cubic-bezier(.3, 1.7, .5, 1) .1s, rotate .6s cubic-bezier(.3, 1.7, .5, 1) .1s, opacity .2s ease .1s; }

.bubble.has-face { padding-left: 3.9rem; min-height: 3.5rem; }
.bubble__face {
  position: absolute;
  left: .55rem;
  top: 50%;
  width: 2.8rem;
  height: 2.8rem;
  margin-top: -1.4rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--present, #a78bfa) 45%, #1a1433), #120d24 72%);
  box-shadow: 0 0 0 1.5px var(--present, #a78bfa);
}

.meet.is-still .react { transition: opacity .3s ease; scale: 1; rotate: 0deg; }

@media (prefers-reduced-motion: reduce) {
  .react { scale: 1; rotate: 0deg; transition: opacity .3s ease; }
}

@media (max-width: 760px) {
  .narr-line { gap: .7rem; }
  .react { width: 3.4rem; height: 3.4rem; }
  .react--sm { width: 2.5rem; height: 2.5rem; }
  .narr { font-size: 1.32rem; line-height: 1.25; }
}

/* Interests unlock one at a time, so the tabs never spoil what is coming */
.facet-tab[hidden], .facet-more[hidden] { display: none; }
.facet-tab:not([hidden]) { animation: tab-unlock .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes tab-unlock { from { opacity: 0; scale: .6; } }
.facet-more {
  align-self: center;
  padding: .38rem .7rem;
  border: 1px dashed rgba(251, 146, 60, .35);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .08em;
  color: var(--ink-mid, #9189c4);
}
@media (prefers-reduced-motion: reduce) { .facet-tab:not([hidden]) { animation: none; } }
