:root {
  --bg: #2d2e30;
  --ink: #f5f5f7;
  --ink-2: #b4b5ba;
  --ink-3: #85868b;
  --glass: rgba(34, 35, 38, 0.55);
  --line: rgba(255, 255, 255, 0.14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-snap-type: y proximity; }
html.rig-live, html.rig-live body { overflow: hidden; }
.stage, .more { scroll-snap-align: start; }
body { background: #2b2c2e; color: var(--ink); font-family: var(--font); line-height: 1.4; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #7cc4ff; outline-offset: 3px; }
kbd { font: 600 11px var(--font); padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.14); }

/* ---------- nav ---------- */
.nav { position: fixed; z-index: 50; top: 14px; left: 50%; translate: -50% 0; width: min(920px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 20px; border-radius: 999px;
  background: rgba(30, 31, 34, .35); backdrop-filter: blur(18px) saturate(1.5); -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid transparent; transition: background .4s, border-color .4s; }
.nav.is-solid { background: var(--glass); border-color: var(--line); }
.nav__brand { font-weight: 600; letter-spacing: -.01em; font-size: 15px; }
.nav__links { display: flex; gap: 6px; }
.nav__links a { font-size: 13px; color: var(--ink-2); padding: 7px 14px; border-radius: 999px; transition: color .25s, background .25s; }
.nav__links a:hover { color: var(--ink); background: rgba(255,255,255,.1); }

/* ---------- stage (pinned, scroll-driven) ---------- */
.stage { position: relative; height: 100vh; height: 100svh; --a: 0; --ui: 0; --load: 0; }
.stage__pin { position: relative; height: 100%; overflow: hidden;
  background:
    radial-gradient(900px 560px at 62% 52%, rgba(255,255,255,.10), transparent 70%),
    radial-gradient(1300px 800px at 55% 45%, #707174 0%, #5c5d60 36%, #404144 68%, #2b2c2e 100%); }
.stage__pin::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.stage__shade { position: absolute; inset: 0; pointer-events: none; transition: opacity .8s var(--ease);
  background: linear-gradient(to bottom, #2b2c2e 0, rgba(43,44,46,.0) 20%, rgba(43,44,46,0) 78%, #2b2c2e 100%); }
.stage.hero-gone .stage__shade { opacity: 0; }
.stage__canvas { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%); }
.stage.hero-gone .stage__canvas { -webkit-mask-image: none; mask-image: none; }
.stage__canvas { position: absolute; inset: 0; }
.rig-canvas { display: block; position: absolute; inset: 0; outline: none; cursor: grab; }
.rig-canvas:active { cursor: grabbing; }

/* ---------- hero ---------- */
.hero { position: absolute; z-index: 5; left: clamp(24px, 7vw, 120px); top: 50%; max-width: 640px; pointer-events: none;
  opacity: calc(1 - var(--a) * 1.6); transform: translateY(calc(-50% - var(--a) * 70px)) scale(calc(1 - var(--a) * .06)); transform-origin: left center; will-change: transform, opacity;
  }
.hero > * { pointer-events: auto; opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.stage.in-view .hero > * { opacity: 1; transform: none; }
.stage.in-view .hero > :nth-child(2) { transition-delay: .08s; } .stage.in-view .hero > :nth-child(3) { transition-delay: .16s; }
.stage.in-view .hero > :nth-child(4) { transition-delay: .24s; } .stage.in-view .hero > :nth-child(5) { transition-delay: .32s; }
.stage[data-align="right"] .hero { left: auto; right: clamp(24px, 7vw, 120px); transform-origin: right center; }
.stage.hero-gone .hero, .stage.hero-gone .scrollcue { visibility: hidden; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; }
.hero__title { font-size: clamp(48px, 9vw, 112px); line-height: 1.04; padding-bottom: .14em; margin-bottom: -.14em; letter-spacing: -.045em; font-weight: 700;
  background: linear-gradient(180deg, #fff 30%, #b9bac0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { margin-top: 22px; font-size: clamp(17px, 2vw, 22px); color: var(--ink-2); font-weight: 400; letter-spacing: -.01em; }
.hero__credit { margin-top: 18px; font-size: clamp(14px, 1.4vw, 16px); color: var(--ink-3); letter-spacing: -.005em; }
.hero__credit strong { color: var(--ink); font-weight: 600; }
.hero__title + .hero__sub { margin-top: 22px; }
.hud__title small { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.hero__cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn { padding: 13px 26px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: -.01em;
  transition: transform .45s var(--spring), background .3s, box-shadow .3s; }
.btn:hover { transform: scale(1.045); }
.btn:active { transform: scale(.96); transition-duration: .12s; }
.btn--primary { background: #f5f5f7; color: #1d1d1f; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.btn--primary:hover { background: #fff; box-shadow: 0 10px 34px rgba(0,0,0,.35); }
.btn--ghost { background: rgba(255,255,255,.12); backdrop-filter: blur(14px); border: 1px solid var(--line); }
.btn--ghost:hover { background: rgba(255,255,255,.2); }

.scrollcue { display: block; position: absolute; z-index: 5; left: 50%; bottom: 28px; translate: -50% 0; width: 22px; height: 36px; border: 1.5px solid rgba(255,255,255,.5); border-radius: 12px;
  opacity: calc(1 - var(--a) * 4); }
.scrollcue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- HUD ---------- */
.hud { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: var(--ui); }
.hud__top { position: absolute; top: 78px; left: clamp(18px, 4vw, 56px); right: clamp(18px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; justify-content: space-between;
  transform: translateY(calc((1 - var(--ui)) * -14px)); }
.hud__title { font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.03em; }
.stats { list-style: none; display: flex; gap: 20px; }
.stats li { display: flex; flex-direction: column; align-items: flex-start; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.stats b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); text-transform: none; font-variant-numeric: tabular-nums; }

.hint { position: absolute; left: 50%; translate: -50% 0; bottom: 104px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2);
  padding: 9px 16px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); white-space: nowrap; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.hint--orbit { bottom: 158px; opacity: 0; transform: translateY(8px); }
.stage.has-grabbed .hint--drag { opacity: 0; transform: translateY(8px); }
.stage.has-grabbed:not(.has-orbited) .hint--orbit { opacity: 1; transform: none; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #7cc4ff; box-shadow: 0 0 0 0 rgba(124,196,255,.7); animation: ping 1.8s infinite; }
@keyframes ping { to { box-shadow: 0 0 0 12px rgba(124,196,255,0); } }

.toolbar { position: absolute; left: 50%; translate: -50% 0; bottom: max(24px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; padding: 7px;
  border-radius: 999px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.35); pointer-events: none; max-width: calc(100% - 20px); transform: translateY(calc((1 - var(--ui)) * 24px)); }
.stage.is-live .toolbar { pointer-events: auto; }
.toolbar__group { display: flex; gap: 4px; }
.toolbar__sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.chip { padding: 9px 15px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: background .25s, color .25s, transform .4s var(--spring); }
.chip:hover { color: var(--ink); background: rgba(255,255,255,.1); transform: scale(1.05); }
.chip:active { transform: scale(.94); transition-duration: .1s; }
.chip.is-active, .chip[aria-pressed="true"] { background: #f5f5f7; color: #1d1d1f; }
.chip--glass { display: inline-flex; align-items: center; gap: 7px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); pointer-events: none; margin-right: auto; margin-left: 4px; }
.stage.is-live .chip--glass { pointer-events: auto; }
.chip--glass[aria-pressed="true"] { background: #f5f5f7; color: #1d1d1f; }
.chip--exit { color: var(--ink); }
.chip--exit::before { content: "✕"; margin-right: 6px; font-size: 11px; opacity: .8; }
.toolbar__group[hidden], .is-hidden { display: none; }
.chip--icon { width: 36px; padding: 9px 0; text-align: center; font-size: 16px; line-height: 1; }

/* ---------- draggable dots ---------- */
.handles { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease); }
.handles.is-live { opacity: 1; }
.handle[hidden] { display: none; }
.handle { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center;
  pointer-events: none; touch-action: none; will-change: transform; }
.handles.is-live .handle { pointer-events: auto; cursor: grab; }
.handle__dot { position: relative; width: 15px; height: 15px; border-radius: 50%; background: var(--c); border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 14px var(--c), 0 2px 8px rgba(0,0,0,.4); transition: transform .4s var(--spring), opacity .3s; }
.handle__dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--c); opacity: 0; animation: halo 2.6s var(--ease) infinite; }
@keyframes halo { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.handle:hover .handle__dot, .handle:focus-visible .handle__dot { transform: scale(1.35); }
.handle.is-dragging { cursor: grabbing; }
.handle.is-dragging .handle__dot { transform: scale(1.6); }
.handle.is-dragging .handle__dot::after { animation: none; }
.handle.is-back .handle__dot { opacity: .4; transform: scale(.8); }
.handle.is-back:hover .handle__dot { opacity: 1; }
.handle__label { position: absolute; left: 50%; bottom: 100%; translate: -50% -2px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap;
  background: rgba(20,20,22,.78); color: #fff; backdrop-filter: blur(10px); opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .3s var(--ease); pointer-events: none; }
.handle:hover .handle__label, .handle.is-dragging .handle__label, .handle:focus-visible .handle__label { opacity: 1; transform: none; }

/* ---------- loader ---------- */
.loader { position: absolute; z-index: 7; left: 50%; bottom: 44px; translate: -50% 0; display: none; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); letter-spacing: .06em; }
.loader i { display: block; width: 120px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.loader i::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(max(var(--load), .12)); animation: shimmer 1.2s ease-in-out infinite alternate; }
@keyframes shimmer { to { opacity: .45; } }
.stage.is-loading .loader { display: flex; }
.stage__error { display: none; position: absolute; z-index: 7; left: 50%; top: 50%; translate: -50% -50%; max-width: 360px; text-align: center; font-size: 14px; color: var(--ink-2); }
.stage.has-error .stage__error { display: block; }
.rig-canvas { opacity: 0; transition: opacity 1.2s var(--ease); }
.stage.is-ready .rig-canvas { opacity: 1; }

/* ---------- more + footer ---------- */
.more { min-height: 70vh; display: grid; place-content: center; text-align: center; padding: 120px 24px; background: linear-gradient(#2b2c2e, #1d1d1f); }
.more__title { font-size: clamp(34px, 6vw, 72px); letter-spacing: -.04em; font-weight: 700; margin-bottom: 14px; }
.more__sub { color: var(--ink-2); font-size: clamp(16px, 2vw, 21px); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.more .reveal:nth-child(2) { transition-delay: .1s; } .more .reveal:nth-child(3) { transition-delay: .2s; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding: 22px clamp(20px, 5vw, 56px); font-size: 12px; color: var(--ink-3); background: #1d1d1f; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { justify-content: center; padding: 12px 18px; }
  .nav__brand { font-size: 13px; white-space: nowrap; }
  .nav__links { display: none; }
  .hero, .stage[data-align="right"] .hero { left: 24px; right: 24px; top: 17%; transform: translateY(calc(var(--a) * -60px)) scale(calc(1 - var(--a) * .06)); animation: none; }
  .hero__sub br { display: none; }
  .hud__top { top: 72px; }
  .stats { gap: 14px; }
  .stats li:nth-child(n+3) { display: none; }
  .hint { bottom: 118px; font-size: 12px; }
  .hint--orbit { bottom: 164px; }
  .toolbar { flex-direction: column; border-radius: 26px; gap: 4px; padding: 8px; width: calc(100% - 20px); }
  .toolbar__sep { display: none; }
  .toolbar__group { width: 100%; justify-content: center; flex-wrap: wrap; }
  .chip { padding: 8px 12px; font-size: 12px; }
  .hint--drag { bottom: 168px; }
  .hint--orbit { bottom: 214px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* ---------- on-face controllers + facial slider panel ---------- */
.handle--face { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.handle--face .handle__dot { width: 9px; height: 9px; border-width: 1.5px; box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 0 8px var(--c); }
.handle--face .handle__dot::after { display: none; }
.facepanel { position: absolute; z-index: 7; left: clamp(12px, 2vw, 28px); bottom: 96px; width: min(660px, 54vw);
  padding: 10px 12px 8px; border-radius: 20px; background: rgba(22,23,26,.55); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.35); opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease); }
.facepanel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.facepanel__title { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 4px 4px; }
.facepanel__svg { display: block; width: 100%; height: auto; max-height: 40vh; touch-action: none; }
.facepanel .knob { cursor: grab; }
.facepanel .knob.is-dragging { cursor: grabbing; }
@media (max-width: 900px) { .facepanel { width: calc(100% - 24px); left: 12px; bottom: 220px; padding: 8px 10px 6px; } .facepanel__svg { max-height: 20vh; } }

.chip--full[aria-pressed="true"] { background: linear-gradient(135deg, #ffd166, #ff9f43); color: #1d1d1f; }

/* ---------- contact ---------- */
.contact { margin-top: 44px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.contact[hidden] { display: none; }
.contact__title { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.contact__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact__btn { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
