/* ═══════════════════════════════════════════════════════════════
   WHITE WARP WEB STUDIO — "One studio. Many worlds."
   Constant shell: near-black / white / WW blue #1877F2 + mono chrome.
   Variable worlds: each project brings its own font + accent + motion.
   Hand-coded. No frameworks. No templates.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* shell (constant) */
  --bg: #05070A;
  --ink: #F4F6F9;
  --ink-dim: rgba(244, 246, 249, 0.62);
  --ink-faint: rgba(244, 246, 249, 0.28);      /* borders / decorative ONLY */
  --ink-text-lo: rgba(244, 246, 249, 0.56);    /* smallest readable text — keeps WCAG-ish contrast */
  --blue: #1877F2;
  --line: rgba(244, 246, 249, 0.09);
  --glass: rgba(244, 246, 249, 0.045);

  /* world (variable — JS lerps these as the ring turns) */
  --w: #1877F2;
  --w-soft: rgba(24, 119, 242, 0.16);

  --font-shell: 'Space Grotesk', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --font-word: 'Chakra Petch', sans-serif;

  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body {
  min-height: 100%;
  /* clip, NOT hidden: overflow-x hidden creates a clip container that BREAKS position:sticky
     (the pinned WORK chapter). clip prevents sideways scroll without killing sticky. */
  overflow-x: hidden; /* fallback for pre-clip browsers */
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-shell);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.introing { overflow: hidden; height: 100vh; } /* scroll unlocks when the intro finishes */

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }

/* Lenis smooth scroll (buttery weighted inertia — alche/QuietCubes technique). The document MUST keep its
   natural tall height for Lenis to have scroll to smooth — never height:100% on html/body here. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ── Atmosphere ─────────────────────────────────────────────── */
#warp { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; }

.wash {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% 58%, var(--w-soft), transparent 65%);
  transition: background 900ms linear;
}

.vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 46%, rgba(3, 4, 7, 0.72) 100%),
    linear-gradient(180deg, rgba(3,4,7,0.5) 0%, transparent 16%, transparent 82%, rgba(3,4,7,0.62) 100%);
}

/* (custom cursor removed — native cursor throughout; grab/grabbing on the stage) */

/* ── Loader ─────────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: opacity 700ms var(--ease-out), visibility 700ms;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-mark { animation: mark-pulse 1.6s var(--ease-inout) infinite; }
@keyframes mark-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.92); opacity: 0.65; } }
.loader-word { font-family: var(--font-word); font-weight: 700; font-size: 19px; letter-spacing: 0.03em; }
.loader-word .warp-b { color: var(--blue); }
.loader-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.42em; color: var(--ink-dim); }
.loader-bar { width: 148px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.loader-bar span { display: block; height: 100%; width: 0%; background: var(--blue); transition: width 300ms; }

/* ── Chrome (constant shell) ────────────────────────────────── */
.chrome {
  position: fixed; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 30px;
  pointer-events: none;
}
.chrome > * { pointer-events: auto; }
.chrome-top { top: 0; }
.chrome-bottom { bottom: 0; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-word { font-family: var(--font-word); font-weight: 700; font-size: 16.5px; letter-spacing: 0.03em; }
.brand-word .warp-b { color: var(--blue); }
.brand-dot { color: var(--ink-dim); }
.brand-sub { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.4em; color: var(--ink-dim); margin-top: 3px; }

.chrome-links { display: flex; gap: 10px; }
.chip {
  font-size: 10.5px; letter-spacing: 0.14em; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-dim);
  backdrop-filter: blur(8px); background: var(--glass);
  transition: color 250ms, border-color 250ms, background 250ms, transform 250ms var(--ease-out);
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); transform: translateY(-1px); }
.chip-accent { color: var(--ink); border-color: rgba(24, 119, 242, 0.55); }
.chip-accent:hover { background: rgba(24, 119, 242, 0.16); border-color: var(--blue); }

/* ── Split typography in DEPTH (reel language) ───────────────
   .type-back  lives BEHIND the ring (z 10) — "One studio." + the giant backdrop word
   .type-front lives IN FRONT of the ring (z 30) — "Many worlds."
   The cards fly and rotate BETWEEN the two halves of the sentence. */
.type-back, .type-front { position: fixed; inset: 0; pointer-events: none; }
.type-back { z-index: 10; }
.type-front { z-index: 30; }

.tb-intro, .tf-intro {
  position: absolute; font-weight: 700; letter-spacing: -0.025em; line-height: 0.95;
  opacity: 0; transition: opacity 1100ms var(--ease-out), transform 1100ms var(--ease-out), filter 1100ms;
  will-change: transform, opacity;
}
.tb-intro {
  top: 12%; left: 6%;
  font-size: clamp(56px, 9.5vw, 150px); color: var(--ink);
  transform: translateY(26px);
  text-shadow: 0 0 90px rgba(24, 119, 242, 0.35);
}
.tf-intro {
  bottom: 13%; right: 6%;
  font-size: clamp(48px, 8vw, 126px); color: var(--ink-dim);
  transform: translateY(26px);
}
.tf-intro em { font-style: normal; color: var(--blue); }
body.type-on .tb-intro, body.type-on .tf-intro { opacity: 1; transform: translateY(0); }
body.type-gone .tb-intro { opacity: 0; transform: translateY(-34px) scale(1.04); filter: blur(6px); }
body.type-gone .tf-intro { opacity: 0; transform: translateY(30px) scale(1.04); filter: blur(6px); }

/* persistent backdrop word — the current world's name, whisper-dim, behind the ring */
.tb-word {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -54%);
  font-weight: 700; letter-spacing: -0.03em; white-space: nowrap;
  font-size: clamp(90px, 15vw, 250px);
  color: var(--ink); opacity: 0;
  transition: opacity 1400ms var(--ease-out);
}
.tb-word.on { opacity: 0.055; }

/* ── ZOOM-TO-ENTER: the stage dives INTO the clicked card ───── */
body.diving .stage {
  /* scale + opacity only — compositor-cheap; smaller scale + shorter time = instant-feeling open */
  transform: scale(1.9);
  opacity: 0;
  pointer-events: none;
  transition: transform 520ms cubic-bezier(0.5, 0, 0.8, 0.4), opacity 480ms ease;
}
body.undiving .stage {
  transition: transform 480ms var(--ease-out), opacity 420ms ease 60ms;
}
body.diving .type-back, body.diving .type-front { opacity: 0; transition: opacity 400ms; }

/* ── CHROME MOMENT (contact world): liquid-metal WW mark ────── */
.world-shot.chrome-mode {
  position: relative; overflow: visible;
  background: transparent; border: 0; box-shadow: none; animation: none; transform: none;
}
/* static glow UNDER the canvas — a filter on the animating canvas would re-blur every frame */
.world-shot.chrome-mode::before {
  content: ''; position: absolute; inset: -10% -20% -10% 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 62% 50%, rgba(24, 119, 242, 0.22), transparent 70%);
}
.world-shot.chrome-mode canvas#chromeWW {
  display: block; width: 130%; max-width: none; height: 56vh;
  margin-right: -30%; /* bleeds off the right edge like the reel's starburst */
  position: relative;
}
.world-shot.chrome-mode .qr-block {
  position: absolute; left: 0; bottom: -6px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px; border-radius: 14px;
  background: rgba(244, 246, 249, 0.05); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.world-shot.chrome-mode .qr-block canvas { border-radius: 8px; background: #fff; padding: 8px; }
.world-shot.chrome-mode .qr-cap { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.26em; color: var(--ink-dim); }

@media (max-width: 900px) {
  .tb-intro { top: 14%; left: 7%; }
  .tf-intro { bottom: 16%; right: 7%; }
  /* width must stay ≤100% here — .world-grid scrolls vertically on mobile and any
     horizontal overflow becomes a real side-pan */
  .world-shot.chrome-mode canvas#chromeWW { width: 100%; margin-right: 0; height: 34vh; }
  .world-shot.chrome-mode .qr-block { position: static; margin-top: 10px; }
}

/* ── Stage + Ring ───────────────────────────────────────────── */
.stage {
  /* the ring now lives INSIDE the pinned WORK chapter (absolute within .work-pin's sticky viewport) */
  position: absolute; inset: 0; z-index: 20;
  perspective: 1100px; perspective-origin: 50% 50%; /* stronger 3D for the camera fly-through */
  cursor: grab;
  /* pan-y: vertical swipes SCROLL the journey (which scrubs the ring); horizontal swipes rotate it */
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
body.dragging .stage { cursor: grabbing; }

.orbit-line {
  /* Master 2026-07-29: the flat horizon line across the screen contradicts the organic twin-pulse — removed. */
  display: none;
  position: absolute; left: 4%; right: 4%; top: 56%; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.ring {
  position: absolute; left: 50%; top: 50%;
  transform-style: preserve-3d;
  will-change: transform;
  z-index: 3; /* cards render ABOVE the WebGL 3D spine canvas (z-index 1) */
}
.spine3d { z-index: 1; } /* the real-3D glass spine sits behind the cards */

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  --card-w: 296px; --card-h: 416px;
  position: absolute;
  width: var(--card-w); height: var(--card-h);
  left: calc(var(--card-w) / -2); top: calc(var(--card-h) / -2);
  transform-style: preserve-3d;
  will-change: transform;
}

.card-face, .card-back {
  position: absolute; inset: 0; border-radius: 16px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}

/* front face — the world's calling card */
.card-face {
  background: linear-gradient(168deg, rgba(255,255,255,0.075), rgba(255,255,255,0.02) 38%), #0A0E14;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.85);
  display: flex; flex-direction: column;
  transition: border-color 450ms, box-shadow 450ms, filter 450ms;
}
.card .shot {
  height: 57%; overflow: hidden; position: relative; flex: none;
  border-bottom: 1px solid var(--line);
  background: #0D1117;
}
.card .shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  filter: saturate(0.82) brightness(0.9);
  transition: filter 500ms, transform 700ms var(--ease-out);
}
.card .shot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 14, 20, 0.9));
}
.card-meta { padding: 17px 18px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-name { font-size: 23px; line-height: 1.06; font-weight: 600; letter-spacing: -0.01em; }
.card-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--ink-dim); text-transform: uppercase; }
.card-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-text-lo); letter-spacing: 0.1em;
}
.card-live { display: inline-flex; align-items: center; gap: 5px; }
.card-live i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--card-accent, var(--blue));
  box-shadow: 0 0 8px var(--card-accent, var(--blue));
  animation: live-pulse 2.2s infinite;
}
@keyframes live-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* card back — the family crest (same on every card = the connective thread) */
.card-back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(-38deg, transparent 0 11px, rgba(24, 119, 242, 0.05) 11px 12px),
    linear-gradient(168deg, #090D13, #05070A);
  border: 1px solid rgba(24, 119, 242, 0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.card-back svg { opacity: 0.75; }
.card-back .back-word {
  font-family: var(--font-word); font-weight: 700; font-size: 11px; letter-spacing: 0.22em;
  color: rgba(244, 246, 249, 0.4);
}
.card-back .back-word b { color: rgba(24, 119, 242, 0.75); font-weight: 700; }

/* focus states driven by JS by angular distance */
.card .card-face { filter: brightness(0.52) saturate(0.6); }
/* off-front cards just dim gently (no blur — Master 2026-07-11); depth comes from the helix + camera */
.card.is-near    .card-face { filter: brightness(0.72); }
.card.is-far     .card-face { filter: brightness(0.5); }
/* cull everything beyond front ±2 so cards don't clutter or bleed into other sections */
.card.is-hidden { opacity: 0 !important; pointer-events: none; }
/* the central WW-braid spine + the branches hanging the cards off it */
.spine { transform-style: preserve-3d; }
.spine svg { overflow: visible; }
/* 3D PIPE shading: a wide translucent BODY under a bright thin CORE = a rounded, glowing BLUE tube */
.spine svg .pbody { filter: none; }                              /* wide translucent body — no filter (keeps the draw-on smooth) */
.spine svg .pcore { filter: drop-shadow(0 0 6px rgba(40, 120, 255, 0.9)); } /* bright BLUE highlight ridge */
/* the two COMETS — bright blue heads that ride the pipe strands, glowing + flickering */
.comet { border-radius: 50%; background: radial-gradient(circle, #eaf3ff 0%, #4a95ff 38%, rgba(24, 119, 242, 0.6) 60%, transparent 74%); box-shadow: 0 0 26px 9px rgba(40, 120, 255, 0.95), 0 0 60px 20px rgba(24, 119, 242, 0.5); z-index: 6; animation: comet-glow 0.5s ease-in-out infinite; }
.comet-b { background: radial-gradient(circle, #ffffff 0%, #5aa0ff 38%, rgba(24, 119, 242, 0.6) 60%, transparent 74%); animation-delay: 0.25s; }
/* glittery BLUE tail dots that trail up the pipe path behind each head */
.comet-tail { border-radius: 50%; background: radial-gradient(circle, #8fc0ff 0%, rgba(40, 120, 255, 0.5) 52%, transparent 74%); box-shadow: 0 0 9px 3px rgba(40, 120, 255, 0.55); z-index: 5; }
@keyframes comet-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.65); } }
/* branch to each card — dim by default, ENERGIZED (bright pulse) when its card is in focus */
.branch { background: linear-gradient(90deg, rgba(24, 119, 242, 0.5), rgba(24, 119, 242, 0.04)); box-shadow: 0 0 6px rgba(24, 119, 242, 0.3); transition: background 0.45s ease, box-shadow 0.45s ease, height 0.45s ease; }
.branch.energized { background: linear-gradient(90deg, rgba(190, 220, 255, 0.95), rgba(90, 160, 255, 0.28) 60%, rgba(24, 119, 242, 0.05)); box-shadow: 0 0 18px rgba(120, 180, 255, 0.85); height: 3px; }
.card.is-front .card-face {
  filter: brightness(1) saturate(1);
  border-color: var(--card-accent, var(--blue)); /* fallback */
  border-color: color-mix(in srgb, var(--card-accent, var(--blue)) 55%, transparent);
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9); /* fallback */
  box-shadow:
    0 30px 90px -20px rgba(0, 0, 0, 0.9),
    0 0 44px -8px color-mix(in srgb, var(--card-accent, var(--blue)) 38%, transparent);
}
.card.is-front .shot img { filter: saturate(1) brightness(1); }
.card.is-front { cursor: pointer; }
.card.is-front:hover .shot img { transform: scale(1.045); }
.card-enter-hint {
  position: absolute; inset: auto 0 -34px; text-align: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.3em; color: var(--ink-text-lo);
  opacity: 0; transform: translateY(-6px); transition: opacity 350ms, transform 350ms var(--ease-out);
}
.card.is-front .card-enter-hint { opacity: 1; transform: translateY(0); }

/* intro: cards materialize from depth (fail-safe: JS forces .settled) */
.card { opacity: 0; }
.card.settled { opacity: 1; transition: opacity 600ms var(--ease-out); }


/* ── Bottom chrome: chapter + dots + hint ───────────────────── */
.chapter-ro { display: flex; align-items: baseline; gap: 10px; font-size: 10.5px; letter-spacing: 0.14em; }
.chapter-idx { color: var(--w); transition: color 600ms; font-size: 12px; }
.chapter-sep { color: var(--ink-faint); }
.chapter-name { color: var(--ink); text-transform: uppercase; }
.chapter-ind { color: var(--ink-text-lo); text-transform: uppercase; }

.dots { display: flex; gap: 4px; align-items: center; }
.dot-b {
  /* 21px touch target, 5px visible dot */
  width: 21px; height: 21px; padding: 8px; border-radius: 50%;
  background: var(--ink-faint); background-clip: content-box;
  transition: all 350ms var(--ease-out);
}
.dot-b.on { background-color: var(--w); transform: scale(1.25); box-shadow: 0 0 10px var(--w-soft); }
.dot-b:hover { background-color: var(--ink-dim); }

.hint { font-size: 9.5px; letter-spacing: 0.22em; color: var(--ink-text-lo); display: flex; align-items: center; }
.hint .hint-drag { color: var(--ink-dim); }

/* ── World takeover ─────────────────────────────────────────── */
.world {
  position: fixed; inset: 0; z-index: 120;
  visibility: hidden; pointer-events: none;
}
body.world-open .world { visibility: visible; pointer-events: auto; }

.world-peel {
  position: absolute; inset: 0;
  /* fallback first (no color-mix browsers must still get an opaque backdrop) */
  background: linear-gradient(158deg, #0B1220, #05070A 62%);
  background:
    radial-gradient(ellipse 120% 90% at 22% 8%, color-mix(in srgb, var(--w) 26%, transparent), transparent 55%),
    linear-gradient(158deg, color-mix(in srgb, var(--w) 14%, #05070A), #05070A 62%);
  clip-path: circle(0% at var(--px, 50%) var(--py, 55%));
  transition: clip-path 640ms var(--ease-inout);
}
body.world-open .world-peel { clip-path: circle(142% at var(--px, 50%) var(--py, 55%)); }

.world-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: clamp(64px, 9vh, 96px) clamp(26px, 5vw, 72px) clamp(20px, 4vh, 40px);
  opacity: 0; transform: translateY(18px);
  transition: opacity 420ms var(--ease-out) 150ms, transform 420ms var(--ease-out) 150ms; /* content lands fast */
}
body.world-open .world-inner { opacity: 1; transform: translateY(0); }

.world-close {
  position: absolute; top: 24px; right: 30px;
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink-dim);
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(8px); background: var(--glass);
  transition: color 250ms, border-color 250ms;
}
.world-close:hover { color: var(--ink); border-color: var(--w); }

.world-grid {
  flex: 1; display: grid; grid-template-columns: minmax(300px, 5fr) 7fr;
  gap: clamp(28px, 4.5vw, 72px); align-items: center; min-height: 0;
}

.world-kicker { font-size: 10px; letter-spacing: 0.3em; color: var(--w); transition: color 400ms; margin-bottom: 14px; }
.world-name {
  font-family: var(--world-font, var(--font-shell));
  font-size: clamp(40px, 5.6vw, 84px); line-height: 0.98; font-weight: 600;
  letter-spacing: -0.015em; margin-bottom: 20px;
}
.world-desc { font-size: clamp(14px, 1.25vw, 17px); line-height: 1.65; color: var(--ink-dim); max-width: 46ch; margin-bottom: 26px; }

.world-stats { display: flex; gap: 26px; margin-bottom: 32px; flex-wrap: wrap; }
.world-stat .k { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.24em; color: var(--ink-text-lo); text-transform: uppercase; margin-bottom: 5px; }
.world-stat .v { font-size: 16px; font-weight: 600; }

.btn-live {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  padding: 14px 26px; border-radius: 999px;
  border: 1px solid var(--w); /* fallback */
  border: 1px solid color-mix(in srgb, var(--w) 60%, transparent);
  background: transparent; /* fallback */
  background: color-mix(in srgb, var(--w) 14%, transparent);
  transition: background 250ms, transform 250ms var(--ease-out), box-shadow 250ms;
}
.btn-live:hover {
  background: var(--w-soft); /* fallback */
  background: color-mix(in srgb, var(--w) 26%, transparent);
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -10px color-mix(in srgb, var(--w) 45%, transparent);
}
.btn-live .arr { transition: transform 250ms var(--ease-out); }
.btn-live:hover .arr { transform: translate(3px, -3px); }
.btn-live.disabled { opacity: 0.4; pointer-events: none; }

.world-shot-wrap { perspective: 1200px; min-width: 0; }
.world-shot {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  background: #0A0E14;
  transform: rotateY(-7deg) rotateX(2deg);
  box-shadow: 0 40px 110px -24px rgba(0, 0, 0, 0.9); /* fallback */
  box-shadow:
    0 40px 110px -24px rgba(0, 0, 0, 0.9),
    0 0 60px -12px color-mix(in srgb, var(--w) 22%, transparent);
  animation: shot-float 7s var(--ease-inout) infinite;
  transition: box-shadow 600ms;
}
@keyframes shot-float {
  0%,100% { transform: rotateY(-7deg) rotateX(2deg) translateY(0); }
  50% { transform: rotateY(-7deg) rotateX(2deg) translateY(-10px); }
}
.shot-bar {
  display: flex; align-items: center; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
}
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.shot-bar i:first-child { background: var(--w); background: color-mix(in srgb, var(--w) 55%, transparent); }
.shot-url { margin-left: 10px; font-size: 9.5px; color: var(--ink-text-lo); letter-spacing: 0.06em; }
.world-shot img { width: 100%; max-height: 58vh; object-fit: cover; object-position: top; }

.world-nav {
  display: flex; align-items: center; justify-content: center; gap: 26px; padding-top: 18px;
}
.wnav {
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink-dim);
  padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  transition: color 250ms, border-color 250ms;
}
.wnav:hover { color: var(--ink); border-color: var(--line); }
.wnav-idx { font-size: 10px; color: var(--ink-text-lo); letter-spacing: 0.2em; }

/* special (studio / contact) worlds reuse the same shell */
.world-shot.qr-mode { display: flex; flex-direction: column; align-items: center; padding: 34px; }
.world-shot.qr-mode canvas { border-radius: 10px; background: #fff; padding: 12px; }
.world-shot.qr-mode .qr-cap { margin-top: 16px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.28em; color: var(--ink-dim); }
.cap-list { display: flex; flex-direction: column; gap: 14px; }
.cap-row { display: flex; gap: 14px; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.cap-row .no { font-family: var(--font-mono); font-size: 10px; color: var(--w); }
.cap-row .t { font-weight: 600; font-size: 16px; min-width: 108px; }
.cap-row .d { color: var(--ink-dim); font-size: 13px; line-height: 1.5; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px), (max-height: 540px) {
  /* also catches landscape phones wider than 900px (iPhone Pro Max, Galaxy Ultra) */
  .world-grid { grid-template-columns: 1fr; gap: 22px; align-items: start; overflow-y: auto; }
  .world-shot { transform: none; animation: none; }
  .world-shot img { max-height: 34vh; }
  .world-name { font-size: clamp(34px, 9vw, 52px); }
}
@media (max-width: 640px) {
  .chrome { padding: 16px 18px; }
  .chip { padding: 8px 12px; font-size: 9.5px; }
  .chip#navStudio, .chip#navWork { display: none; } /* small phones: START A PROJECT alone fits 320px */
  .card { --card-w: 232px; --card-h: 330px; }
  .card-name { font-size: 19px; }
  .thesis { top: 13%; }
  .hint { display: none; }
  .dots { position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); }
  .chapter-ro { font-size: 9.5px; }
  .world-close { top: 16px; right: 16px; }
  .world-inner { padding: 76px 22px 18px; }
  .world-nav { gap: 12px; }
  .stage { perspective: 1050px; }
}

/* ═══ THE JOURNEY — chaptered scroll (LN4 recipe) ═══════════════ */
.journey { position: relative; z-index: 20; transition: opacity 700ms var(--ease-out); }
body.introing .journey { opacity: 0; pointer-events: none; }

.chapter { position: relative; }
.ch-inner { max-width: 1240px; margin: 0 auto; padding: 16vh 6vw; }
.ch-kicker { font-size: 10px; letter-spacing: 0.3em; color: var(--blue); margin-bottom: 14px; }
.ch-title {
  font-size: clamp(40px, 6vw, 92px); font-weight: 700; line-height: 0.98;
  letter-spacing: -0.02em; margin-bottom: 44px;
}

/* ── CH.1 STATEMENT ── */
/* The solid white headline stays HIDDEN until AFTER the particle "We build worlds"
   diffuses — body.word-shown is fired on the diffuse-complete — then it SLOWLY
   animates in (rise + fade). JS fail-safes always add word-shown eventually. */
.statement { opacity: 0; }
body.word-shown .statement { animation: digital-flicker .78s steps(1, end) forwards; }
@keyframes digital-flicker {
  0%, 6% { opacity: 0; }
  8% { opacity: .85; } 11% { opacity: .12; } 16% { opacity: .95; } 21% { opacity: .28; }
  28% { opacity: 1; }  33% { opacity: .38; } 39% { opacity: 1; }  45% { opacity: .58; }
  53% { opacity: 1; }  59% { opacity: .22; } 64% { opacity: 1; }  72% { opacity: .74; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { body.word-shown .statement { animation: none; opacity: 1; } }
.ch-hero { min-height: 100vh; display: flex; align-items: center; }
.hero-wrap { position: relative; width: 100%; padding: 0 6vw; }
.statement .st-line {
  display: block; font-weight: 700; letter-spacing: -0.055em; line-height: 0.88; /* tight, like a lockup */
  font-size: clamp(64px, 11.5vw, 185px);
}
.statement .st-accent { color: var(--ink-dim); }
.statement .st-dot { color: var(--blue); }
.st-sub { margin-top: 28px; color: var(--ink-dim); font-size: clamp(14px, 1.3vw, 18px); line-height: 1.65; }
/* (the CH.1 center mark was removed — the intro blast opens with the mark, the
   PAINTABLE toy in CH.5 closes with it; the statement stands alone) */
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; margin-top: 54px; font-size: 9.5px; letter-spacing: 0.3em; color: var(--ink-text-lo); }
.scroll-cue i { display: block; width: 1px; height: 34px; background: linear-gradient(var(--blue), transparent); animation: cue-drop 1.8s var(--ease-inout) infinite; }
@keyframes cue-drop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ── CH.2 THE WORK: pinned ring, scroll scrubs a full revolution ── */
.ch-work { height: 340vh; position: relative; }
.work-pin { position: sticky; top: 0; height: 100vh; overflow: hidden; } /* clip the 3D cards to the WORK viewport — never bleed into CH.3 */

/* ── CH.3 CRAFT ── */
.cap-rows { border-top: 1px solid var(--line); }
.cap-row {
  display: grid; grid-template-columns: 44px 230px 1fr; gap: 20px;
  padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.cap-row .no { color: var(--blue); font-size: 11px; }
.cap-row .t { font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.cap-row .d { color: var(--ink-dim); font-size: 14.5px; line-height: 1.6; max-width: 56ch; }

/* ── CH.4 PROOF ── */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.cnum { display: block; font-weight: 700; font-size: clamp(54px, 7vw, 112px); letter-spacing: -0.03em; line-height: 1; }
.counter:nth-child(2) .cnum { color: var(--blue); }
.clab { display: block; margin-top: 10px; font-size: 9.5px; letter-spacing: 0.24em; color: var(--ink-text-lo); }
.proof-note { margin-top: 40px; color: var(--ink-text-lo); font-size: 12.5px; }

/* ── CH.5 START — CENTRE STAGE (paint mark is the hero, centred) ── */
.start-center {
  max-width: 1120px; margin: 0 auto; min-height: 100vh;
  /* space-between keeps headline pinned top, base pinned bottom (clears the fixed chapter
     chrome via the 84px bottom pad); the mark stage absorbs the middle and is capped to fit */
  padding: 11vh 6vw 84px; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; gap: 12px;
}
.start-top { text-align: center; }
.start-top .ch-kicker { margin-bottom: 10px; }
.start-h2 {
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.03;
  font-size: clamp(24px, 3.6vw, 48px); max-width: 20ch;
}
/* the mark, dead-centre and big, with a soft glow beneath */
.start-stage {
  position: relative; flex: 1 1 auto; width: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
}
.start-stage::before {
  content: ''; position: absolute; inset: 8% 0; pointer-events: none;
  background: radial-gradient(ellipse 42% 48% at 50% 50%, rgba(24, 119, 242, 0.22), transparent 70%);
}
#chromeEnd {
  display: block; width: min(540px, 84vw); height: 100%; max-height: 460px; position: relative; z-index: 1;
  cursor: grab; touch-action: none; /* the paint/spin toy owns its touches */
}
#chromeEnd:active { cursor: grabbing; }
.paint-prompt {
  position: absolute; left: 50%; bottom: 1%; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-size: 9.5px; letter-spacing: 0.2em; color: var(--ink-dim);
  padding: 10px 16px; border-radius: 999px;
  background: rgba(244, 246, 249, 0.05); border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.paint-prompt .pp-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 0 rgba(24, 119, 242, 0.5);
  animation: pp-pulse 2s var(--ease-inout) infinite;
}
@keyframes pp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(24, 119, 242, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(24, 119, 242, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 119, 242, 0); }
}
/* contact base bar along the bottom: email + sub on the left, QR on the right */
.start-base {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 26px; padding-top: 22px;
}
.start-base-left { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.start-sub { color: var(--ink-dim); font-size: 13px; line-height: 1.6; max-width: 38ch; }
.qr-block {
  display: flex; flex-direction: column; align-items: center; gap: 8px; flex: none;
  padding: 14px; border-radius: 14px;
  background: rgba(244, 246, 249, 0.05); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.qr-block canvas { border-radius: 8px; background: #fff; padding: 7px; }
.qr-cap { font-size: 8px; letter-spacing: 0.24em; color: var(--ink-dim); }
.foot { display: flex; justify-content: center; text-align: center; padding: 8px 6vw 78px; color: var(--ink-text-lo); font-size: 9.5px; letter-spacing: 0.2em; } /* bottom clearance for the fixed chapter chrome */

/* ── GLITCH REVEAL (LN4 block-bars) — fail-safe: hidden ONLY when JS is running ── */
body.jsready .gr:not(.on) { opacity: 0; }
.gr.on { animation: gr-in 620ms steps(6) forwards; position: relative; }
.gr.on::after {
  content: ''; position: absolute; inset: 0; background: var(--blue);
  pointer-events: none; animation: gr-bar 620ms steps(6) forwards;
}
@keyframes gr-in {
  0% { opacity: 0; clip-path: inset(0 100% 0 0); }
  34% { opacity: 1; clip-path: inset(0 38% 0 0); }
  67% { clip-path: inset(0 9% 0 0); }
  100% { opacity: 1; clip-path: inset(0); }
}
@keyframes gr-bar {
  0% { clip-path: inset(0 82% 0 0); opacity: 0.85; }
  34% { clip-path: inset(0 30% 0 46%); opacity: 0.55; }
  67% { clip-path: inset(0 4% 0 78%); opacity: 0.35; }
  100% { clip-path: inset(0 0 0 100%); opacity: 0; }
}

/* ── THE FLOOD — WW-blue wipe, monogram centered (nav transitions) ── */
.flood {
  position: fixed; inset: 0; z-index: 260;
  background: var(--blue);
  display: grid; place-items: center;
  transform: translateY(102%);
  pointer-events: none;
}
.flood.in { transform: translateY(0); transition: transform 400ms cubic-bezier(0.7, 0, 0.3, 1); }
.flood.out { transform: translateY(-102%); transition: transform 440ms cubic-bezier(0.7, 0, 0.3, 1) 100ms; }
.flood svg { filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.25)); }

/* dots + ring hint only matter inside THE WORK chapter */
.dots, #hint { transition: opacity 400ms; }
body:not(.in-work) .dots { opacity: 0; pointer-events: none; }

/* journey responsive */
@media (max-width: 900px) {
  .statement .st-line { font-size: clamp(52px, 14vw, 110px); }
  .counters { grid-template-columns: repeat(2, 1fr); gap: 34px 18px; }
  .start-center { padding: 11vh 5vw 76px; }
  #chromeEnd { width: 88vw; height: 100%; max-height: 34vh; }
  .start-base { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
  .start-base-left { align-items: center; }
  .cap-row { grid-template-columns: 34px 1fr; }
  .cap-row .d { grid-column: 2; }
  .ch-work { height: 300vh; }
}

/* ── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .card .shot img, .world-shot { animation: none !important; }
  .world-peel { transition: none; }
  .world-inner { transition: opacity 200ms; transform: none; }
  .gr, body.jsready .gr:not(.on) { opacity: 1 !important; animation: none !important; }
  .gr.on::after { display: none; }
  .scroll-cue i { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
