/* ══════════════════════════════════════════════════════════════
   HAPLO — one pinned 3D scene, copy keyed on scroll.
   ══════════════════════════════════════════════════════════════ */
:root {
  --bg: #060b14;
  --bg2: #0d1f38;
  --ink: #ffffff;
  --ink-2: rgba(255,255,255,.72);
  --cyan: #8fc3e6;
  --orange: #ffb02e;
  --font: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.16,1,.3,1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--font); }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.nojs { position: fixed; inset: 0; display: grid; place-items: center; padding: 2rem; text-align: center; }

/* ── scroll track ── */
.track { height: 340vh; pointer-events: none; }
html.reduced .track { height: 0; }

/* ── stage ── */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.stage__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 55% 45%, #10284a 0%, #0a1a31 35%, #060d19 70%, #04070d 100%);
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; will-change: filter; }
.stage__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(85% 75% at 50% 50%, transparent 55%, rgba(2,4,9,.55) 100%);
}

/* ── HUD ── */
.hud { position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 30; pointer-events: none; }
.hud__logo {
  position: absolute; left: 50%; top: 20px; transform: translateX(-50%);
  width: 20px; height: 20px; background: #fff; color: #091423; border-radius: 2px;
  display: grid; place-items: center; font-weight: 500; font-size: 13px; line-height: 1;
  pointer-events: auto;
}
.hud__menu {
  position: absolute; right: 56px; top: 22px; color: var(--cyan);
  font-size: 12px; font-weight: 400; letter-spacing: .01em; pointer-events: auto;
}
.hud-side {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 9px; letter-spacing: .12em; color: rgba(255,255,255,.4);
}
.hud-side__idx { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hud-side__idx i { width: 1px; height: 10px; background: rgba(255,255,255,.25); }
.hud-side__rail { width: 1px; height: 120px; background: rgba(255,255,255,.14); position: relative; overflow: hidden; }
.hud-side__rail i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #fff; transform-origin: top; transform: scaleY(0); }

/* ── copy ── */
.copy { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.panel { position: absolute; pointer-events: none; }
.panel a, .panel button { pointer-events: auto; }
.panel--hero  { left: 7.2vw; bottom: 13.5vh; }
.panel--two   { left: 66.5vw; bottom: 10.5vh; }
.panel--three { left: 66vw; top: 28.5vh; }

.h { font-weight: 400; letter-spacing: -.005em; line-height: 1.22; color: var(--ink); }
.h--1 { font-size: clamp(22px, 2.85vw, 44px); }
.h--2 { font-size: clamp(20px, 2.55vw, 40px); }
.sub { margin-top: 1.05em; font-size: clamp(11px, .95vw, 15px); font-weight: 300; line-height: 1.5; color: var(--ink-2); }
.lnk { display: inline-block; margin-top: 1.5em; font-size: clamp(11px, .95vw, 15px); font-weight: 400; color: var(--ink); }
.lnk > span { display: inline-flex; align-items: center; gap: 8px; }
.chev { display:inline-block; width: 6px; height: 6px; border-right: 1.5px solid #fff; border-top: 1.5px solid #fff; transform: rotate(45deg); margin-right: 6px; flex: 0 0 auto; }

/* line masks — every reveal is a top-down wipe */
.ln { display: block; overflow: hidden; }
.ln > span { display: block; will-change: transform, clip-path; }
html:not(.reduced) .ln > span { clip-path: inset(0 0 100% 0); transform: translateY(-.35em); }
.ln > span.is-blur { filter: blur(6px); }

/* watch video */
.watch { left: 71.5vw; top: 21vh; display: flex; align-items: center; gap: 18px; opacity: 0; }
html.reduced .watch { opacity: 1; }
.watch__btn { width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; backdrop-filter: blur(4px); pointer-events: auto; transition: background .3s; }
.watch__btn:hover { background: rgba(255,255,255,.2); }
.watch__disc { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.watch__disc svg { transform: translateX(1px); }
.watch__label { font-size: clamp(11px, .95vw, 15px); font-weight: 400; color: var(--ink); }

/* ── menu overlay ── */
.menu {
  position: fixed; inset: 0; z-index: 40; background: rgba(4,8,15,.94);
  display: grid; place-items: center; text-align: center;
  clip-path: inset(0 0 100% 0); transition: clip-path .8s var(--ease); pointer-events: none;
}
.menu.is-open { clip-path: inset(0 0 0 0); pointer-events: auto; }
.menu ul { list-style: none; display: grid; gap: 1.2rem; }
.menu li a { font-size: clamp(28px, 4vw, 56px); font-weight: 300; opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); display: inline-block; }
.menu.is-open li a { opacity: 1; transform: none; }
.menu.is-open li:nth-child(2) a { transition-delay: .06s } .menu.is-open li:nth-child(3) a { transition-delay: .12s } .menu.is-open li:nth-child(4) a { transition-delay: .18s }
.menu li a:hover { color: var(--cyan); }
.menu__close { position: absolute; right: 56px; top: 22px; color: var(--cyan); font-size: 12px; }
.menu__meta { position: absolute; bottom: 32px; left: 0; right: 0; font-size: 11px; color: rgba(255,255,255,.4); }

/* ── preloader ── */
.pre { position: fixed; inset: 0; z-index: 100; background: #05090f; display: grid; place-items: center; }
.pre__inner { display: grid; justify-items: center; gap: 18px; }
.pre__mark { width: 34px; height: 34px; background: #fff; color: #091423; display: grid; place-items: center; border-radius: 3px; font-weight: 500; font-size: 20px; }
.pre__rail { width: 140px; height: 1px; background: rgba(255,255,255,.14); position: relative; overflow: hidden; }
.pre__rail i { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.pre__meta { display: flex; gap: 14px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.pre__meta span:first-child { color: #fff; font-variant-numeric: tabular-nums; }

/* ── cursor ── */
.cur, .cur-ring { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: 0; }
.cur { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }
.cur-ring { width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55); display: grid; place-items: center; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s; }
.cur-ring.is-hot { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255,255,255,.08); }
.cur-ring span { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity .25s; }
.cur-ring.is-hot span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cur, .cur-ring { display: none; } }

/* ── responsive ── */
@media (max-width: 900px) {
  .hud__menu, .menu__close { right: 24px; }
  .hud-side { display: none; }
  .panel--hero  { left: 7vw; bottom: 12vh; }
  .panel--two   { left: 7vw; right: 7vw; bottom: 12vh; }
  .panel--three { left: 7vw; right: 7vw; top: auto; bottom: 12vh; }
  .watch { left: auto; right: 7vw; top: 14vh; }
  .h--1 { font-size: 26px; } .h--2 { font-size: 24px; }
  .sub, .lnk, .watch__label { font-size: 12px; }
}

/* ── reduced motion: static hero, everything shown ── */
html.reduced .track { display: none; }
html.reduced .copy { position: relative; min-height: 100vh; }
html.reduced .panel { position: relative; left: 7vw !important; top: auto !important; bottom: auto !important; right: auto; margin: 22vh 0; max-width: 40ch; }
html.reduced #gl { filter: none !important; }

/* small screens: a soft ground under the copy so it stays legible over the close-ups */
@media (max-width: 900px) {
  .stage__vignette { background: linear-gradient(to top, rgba(4,8,15,.85) 0%, rgba(4,8,15,.35) 34%, transparent 55%), radial-gradient(85% 75% at 50% 50%, transparent 55%, rgba(2,4,9,.55) 100%); }
}
