:root {
  --bg: #020408;
  --ink: #eaf5fc;
  --ink-2: rgba(234, 245, 252, 0.68);
  --ink-3: rgba(234, 245, 252, 0.42);
  --line: rgba(150, 215, 245, 0.18);
  --cyan: #6fe3ff;
  --cyan-2: #3fb8ff;
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gut: clamp(16px, 4vw, 64px);
  --in-scale: 0.94;
  --out-scale: 1.1;
}
body[data-dir="back"] { --in-scale: 1.08; --out-scale: 0.92; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  touch-action: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }

/* ================= HUD ================= */
.hud-top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gut);
  opacity: 0; transform: translateY(-10px);
  transition: opacity 1.2s var(--ease) 0.6s, transform 1.2s var(--ease) 0.6s;
}
.ready .hud-top, .ready .hud-bottom, .ready .scene-nav { opacity: 1; transform: none; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-logo { display: block; height: 44px; width: auto; }
.scene-ind {
  position: absolute; left: 50%; top: 28px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-2); display: flex; align-items: center; gap: 12px;
}
.scene-ind .sep { width: 28px; height: 1px; background: var(--cyan); opacity: 0.7; }
#scene-num { color: var(--cyan); }
.scene-ind.flip #scene-num, .scene-ind.flip #scene-name { animation: flip 0.9s var(--ease); }
@keyframes flip { 0% { opacity: 0; transform: translateY(8px); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.top-right { display: flex; align-items: center; gap: 22px; }
.lang { display: flex; gap: 2px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; }
.lang button { padding: 6px 8px; color: var(--ink-3); }
.lang button.on { color: var(--ink); }
.lang button:not(.on):hover { color: var(--ink-2); }
.lang button:disabled { cursor: default; }
.btn-top {
  font-size: 13px; letter-spacing: 0.04em; padding: 10px 18px; border: 1px solid var(--line);
  border-radius: 100px; backdrop-filter: blur(10px); background: rgba(8, 16, 26, 0.35);
  transition: border-color 0.4s, background 0.4s;
}
.btn-top:hover { border-color: rgba(111, 227, 255, 0.6); background: rgba(111, 227, 255, 0.08); }

.scene-nav {
  position: fixed; left: var(--gut); top: 50%; transform: translate(-8px, -50%); z-index: 20;
  display: flex; flex-direction: column; gap: 6px; opacity: 0;
  transition: opacity 1.2s var(--ease) 0.9s, transform 1.2s var(--ease) 0.9s;
}
.ready .scene-nav { transform: translate(0, -50%); }
.sn {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
  transition: color 0.4s;
}
.sn-l { width: 14px; height: 1px; background: currentColor; transition: width 0.6s var(--ease), background 0.4s; }
.sn-t { opacity: 0; transform: translateX(-6px); transition: opacity 0.4s, transform 0.5s var(--ease); white-space: nowrap; }
.sn:hover, .sn.on { color: var(--ink); }
.sn.on .sn-l { width: 34px; background: var(--cyan); }
.sn:hover .sn-t { opacity: 1; transform: none; }
.sn.on .sn-n { color: var(--cyan); }

.hud-bottom {
  position: fixed; inset: auto 0 0 0; z-index: 20; padding: 22px var(--gut) 26px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-3);
  opacity: 0; transform: translateY(10px);
  transition: opacity 1.2s var(--ease) 0.8s, transform 1.2s var(--ease) 0.8s;
}
.readout { display: flex; gap: 10px; align-items: baseline; min-width: 210px; }
.readout b { color: var(--ink-2); font-weight: 400; min-width: 62px; }
.prog { position: relative; height: 14px; display: flex; align-items: center; }
.prog-track { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
#prog-fill { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(111,227,255,0.2), var(--cyan)); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 10px rgba(111,227,255,0.6); }
.ticks { position: absolute; inset: 0; }
.ticks i { position: absolute; top: 50%; width: 1px; height: 5px; margin-top: -2.5px; background: var(--ink-3); }
.ticks i.major { height: 11px; margin-top: -5.5px; background: var(--ink-2); }
.hint { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.hint kbd { font-family: var(--mono); font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; margin-right: 3px; color: var(--ink-2); }
.hint .arrow { display: inline-block; color: var(--cyan); animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
body.moving .hud-bottom .readout b { color: var(--cyan); }

/* ================= Panels ================= */
#panels { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.panel:not(.on):not(.leave) { visibility: hidden; }
.panel { position: absolute; inset: 0; display: flex; align-items: center; padding: 110px var(--gut) 110px calc(var(--gut) + 150px); }
.panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1s var(--ease);
}
.panel.on::before { opacity: 1; }
.p-left::before { background: linear-gradient(90deg, rgba(2,4,8,0.72) 0%, rgba(2,4,8,0.35) 38%, rgba(2,4,8,0) 62%); }
.p-right { justify-content: flex-end; }
.p-right::before { background: linear-gradient(270deg, rgba(2,4,8,0.72) 0%, rgba(2,4,8,0.35) 38%, rgba(2,4,8,0) 62%); }
.p-top { align-items: flex-start; padding-top: 120px; }
.p-top::before { background: linear-gradient(180deg, rgba(2,4,8,0.7) 0%, rgba(2,4,8,0) 45%); }
.p-center { justify-content: center; text-align: center; padding-left: var(--gut); }
.p-center::before { background: radial-gradient(ellipse 42% 48% at 50% 52%, rgba(2,4,8,0.78), rgba(2,4,8,0.3) 60%, rgba(2,4,8,0) 80%); }
.p-contact { align-items: center; }
.pi { position: relative; max-width: 600px; }
.p-hero .pi { max-width: 760px; }
html[lang="en"] .p-hero .pi { max-width: 900px; }
html[lang="en"] .p-hero .display { font-size: clamp(42px, 6.2vw, 112px); }
.p-center .pi { max-width: 760px; margin: 0 auto; }
.p-top.p-center .pi { max-width: 1100px; }
.p-outcomes .title.sm { font-size: clamp(30px, 3.4vw, 56px); }
.panel.on .pi a, .panel.on .pi button { pointer-events: auto; }

/* reveal choreography */
.panel .r {
  opacity: 0; transform: translate3d(0, 22px, 0) scale(var(--in-scale)); filter: blur(10px);
  transition: opacity 0.35s ease, transform 0.5s ease, filter 0.35s ease;
}
.panel .ln { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.panel .ln > span { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 0.45s ease; }
.panel.on .r {
  opacity: 1; transform: none; filter: none;
  transition: opacity 1s var(--ease), transform 1.3s var(--ease), filter 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 85ms + 120ms);
}
.panel.on .ln > span { transform: none; transition: transform 1.3s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 60ms); }
.panel.leave .r { opacity: 0; transform: scale(var(--out-scale)); filter: blur(12px); transition: all 0.5s ease-in; }
.panel.leave .ln > span { transform: translate3d(0, -108%, 0); transition: transform 0.5s ease-in; }

.eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 26px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2);
}
.p-center .eyebrow { justify-content: center; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.eyebrow .count { margin-left: auto; padding-left: 24px; color: var(--cyan); font-weight: 400; }
.display {
  font-weight: 300; font-size: clamp(46px, 7.4vw, 132px); line-height: 0.94; letter-spacing: -0.04em;
  text-shadow: 0 2px 40px rgba(2,4,8,0.6);
}
.title {
  font-weight: 300; font-size: clamp(38px, 5.2vw, 88px); line-height: 0.98; letter-spacing: -0.035em;
  text-shadow: 0 2px 30px rgba(2,4,8,0.7);
}
.title.sm { font-size: clamp(34px, 4.2vw, 68px); }
.em { color: transparent; background: linear-gradient(100deg, #ffffff 0%, var(--cyan) 55%, #3f8dff 100%); -webkit-background-clip: text; background-clip: text; font-weight: 300; }
.kicker { margin-top: 18px; font-size: 18px; color: var(--cyan); letter-spacing: -0.01em; font-weight: 400; }
.lead { margin-top: 24px; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; color: var(--ink-2); max-width: 520px; font-weight: 300; }
.p-center .lead { margin-left: auto; margin-right: auto; }
.tags { margin-top: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.tags i { color: var(--cyan); font-style: normal; margin: 0 6px; }
.note { margin-top: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.fine { margin-top: 30px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); }

.ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.p-center .ctas { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 15px 24px; border-radius: 100px;
  font-size: 14px; letter-spacing: 0.01em; transition: all 0.5s var(--ease);
}
.btn span { transition: transform 0.5s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn.primary { background: var(--ink); color: #04080e; font-weight: 500; box-shadow: 0 0 0 0 rgba(111,227,255,0.0); }
.btn.primary:hover { background: #fff; box-shadow: 0 0 40px rgba(111,227,255,0.35); }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); backdrop-filter: blur(10px); background: rgba(8,16,26,0.3); }
.btn.ghost:hover { border-color: rgba(111,227,255,0.6); }
.link-cta {
  display: inline-flex; gap: 10px; margin-top: 32px; font-size: 14px; color: var(--ink);
  padding-bottom: 6px; border-bottom: 1px solid rgba(111,227,255,0.45); transition: border-color 0.4s, gap 0.5s var(--ease);
}
.link-cta span { color: var(--cyan); }
.link-cta:hover { gap: 16px; border-color: var(--cyan); }

.facts { list-style: none; margin-top: 36px; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 520px; }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts b { font-weight: 400; }
.facts span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-2); text-align: right; text-transform: uppercase; }

.chips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; max-width: 540px; }
.chips span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 100px; background: rgba(8,16,26,0.35); backdrop-filter: blur(6px);
}

.stats { margin-top: 30px; display: flex; gap: 34px; align-items: stretch; }
.stats .big { display: flex; align-items: flex-end; gap: 14px; padding-right: 30px; border-right: 1px solid var(--line); }
.stats .big b { font-size: 84px; font-weight: 200; line-height: 0.8; letter-spacing: -0.05em; color: var(--ink); }
.stats .big span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-2); text-transform: uppercase; line-height: 1.6; }
.grid4 { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 26px; align-content: center; }
.grid4 div { display: flex; align-items: baseline; gap: 10px; }
.grid4 b { font-size: 24px; font-weight: 300; color: var(--cyan); min-width: 30px; }
.grid4 span { font-size: 12px; color: var(--ink-2); }

.stepnum { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--cyan); margin-bottom: 14px; }
.stepnum small { color: var(--ink-3); font-size: 11px; }

.outcomes { list-style: none; margin-top: 30px; counter-reset: o; max-width: 540px; border-top: 1px solid var(--line); }
.outcomes li { counter-increment: o; display: grid; grid-template-columns: 34px 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); }
.outcomes li::before { content: "0" counter(o); font-family: var(--mono); font-size: 10px; color: var(--cyan); padding-top: 4px; grid-row: span 2; }
.outcomes b { font-weight: 400; font-size: 15px; }
.outcomes span { font-size: 13px; color: var(--ink-2); line-height: 1.5; margin-top: 3px; }

.contacts { margin-top: 34px; display: grid; grid-template-columns: repeat(4, auto); justify-content: center; gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contacts > * { padding: 16px 22px; font-size: 15px; display: flex; flex-direction: column; gap: 6px; text-align: left; transition: background 0.4s; }
.contacts > * + * { border-left: 1px solid var(--line); }
.contacts small { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.contacts a:hover { background: rgba(111,227,255,0.07); color: #fff; }

/* ================= 3D labels ================= */
#labels { position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; transform-origin: 0 0; will-change: transform, opacity; display: flex; gap: 10px; align-items: flex-start; }
.lbl-dot { width: 7px; height: 7px; margin-top: 4px; border: 1px solid var(--cyan); border-radius: 50%; flex: none; box-shadow: 0 0 10px rgba(111,227,255,0.7); }
.lbl-body { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-2); white-space: nowrap; text-transform: uppercase; }
.lbl-body b { color: var(--cyan); font-weight: 400; margin-right: 8px; }
.lbl-node .lbl-body { font-family: var(--sans); text-transform: none; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.lbl-node .lbl-body b { font-family: var(--mono); font-size: 11px; display: block; margin-bottom: 4px; }
.lbl-hub { transform-origin: 50% 100%; }
.lbl-hub .lbl-body { white-space: normal; width: 220px; text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.lbl-hub .lbl-body b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.01em; }
.lbl-mini .lbl-body { font-size: 10px; letter-spacing: 0.12em; }

/* ================= Boot ================= */
#boot {
  position: fixed; inset: 0; z-index: 50; background: #010205;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 1.2s ease, filter 1.2s ease;
}
#boot.out { opacity: 0; filter: blur(8px); pointer-events: none; }
.boot-frame { width: min(560px, calc(100vw - 32px)); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--ink-2); transition: opacity 0.6s, transform 0.8s var(--ease); }
#boot.granted .boot-frame { opacity: 0; transform: scale(0.97); }
.boot-head { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 10px; letter-spacing: 0.2em; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.boot-log { min-height: 110px; }
.bl { display: flex; white-space: pre; line-height: 2; overflow: hidden; }
.bl .pr { color: var(--cyan); margin-right: 10px; }
.bl .dots { color: var(--ink-3); flex: 1; overflow: hidden; }
.bl .ok { color: var(--cyan); }
.boot-progress { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
#boot-bar { flex: 1; height: 1px; background: var(--line); position: relative; }
#boot-bar i { position: absolute; inset: 0; background: var(--cyan); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 12px var(--cyan); }
#boot-pct { color: var(--ink); min-width: 30px; text-align: right; }
.boot-hex { margin-top: 26px; font-size: 9.5px; line-height: 1.6; color: rgba(111,227,255,0.18); white-space: pre; overflow: hidden; height: 92px; }
.boot-granted { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; pointer-events: none; }
.boot-granted .g1, .boot-granted .g2 { opacity: 0; }
.boot-granted .g1 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.5em; color: var(--cyan); }
.boot-granted .g2 { display: block; width: clamp(220px, 30vw, 440px); height: auto; }
#boot.granted .g1 { animation: glitchIn 0.9s steps(1) forwards; }
#boot.granted .g2 { animation: brandIn 1.4s var(--ease) 0.25s forwards; }
@keyframes glitchIn {
  0% { opacity: 1; transform: translateX(-6px); } 10% { opacity: 0; } 20% { opacity: 1; transform: translateX(4px); clip-path: inset(0 0 50% 0); }
  35% { opacity: 1; transform: none; clip-path: none; } 45% { opacity: 0.4; } 60%, 100% { opacity: 1; }
}
@keyframes brandIn { from { opacity: 0; transform: scale(1.08); filter: blur(14px); } to { opacity: 1; transform: none; filter: blur(0); } }
.skip {
  position: absolute; right: var(--gut); bottom: 30px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-2); padding: 10px 16px; border: 1px solid var(--line); border-radius: 100px; transition: all 0.4s;
}
.skip:hover { color: var(--ink); border-color: rgba(111,227,255,0.6); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); color: var(--ink); font-family: var(--sans); z-index: 100; }

/* ================= Responsive ================= */
@media (max-width: 1100px) {
  .panel { padding-left: calc(var(--gut) + 60px); }
  .sn-t { display: none; }
}
@media (max-width: 760px) {
  .scene-nav, .readout, .scene-ind { display: none; }
  .top-right { gap: 10px; }
  .hud-top { padding: 16px; }
  .brand-logo { height: 36px; }
  .btn-top { padding: 8px 14px; font-size: 12px; }
  .hud-bottom { grid-template-columns: 1fr auto; gap: 16px; padding: 14px 16px 18px; }
  .hint-keys { display: none; }
  .panel, .p-right, .p-top { align-items: flex-end; justify-content: flex-start; padding: 90px 16px 72px; text-align: left; }
  .p-center { justify-content: center; text-align: center; }
  .p-left::before, .p-right::before, .p-top::before, .p-center::before { background: linear-gradient(0deg, rgba(2,4,8,0.88) 0%, rgba(2,4,8,0.55) 45%, rgba(2,4,8,0) 75%); }
  .p-top.p-center { align-items: flex-start; padding-top: 90px; }
  .p-top.p-center::before { background: linear-gradient(180deg, rgba(2,4,8,0.8), rgba(2,4,8,0) 40%); }
  .p-contact { align-items: center; }
  .lead { font-size: 14px; margin-top: 16px; }
  .eyebrow { margin-bottom: 16px; font-size: 10px; }
  .ctas { margin-top: 22px; }
  .btn { padding: 12px 18px; font-size: 13px; }
  .facts { margin-top: 20px; }
  .facts li { padding: 10px 0; }
  .stats { flex-direction: column; gap: 14px; }
  .stats .big { border-right: 0; padding-right: 0; }
  .stats .big b { font-size: 60px; }
  .contacts { grid-template-columns: 1fr 1fr; }
  .contacts > * { padding: 12px 14px; font-size: 13px; }
  .contacts > *:nth-child(3) { border-left: 0; }
  .contacts > *:nth-child(n+3) { border-top: 1px solid var(--line); }
  .outcomes span { display: none; }
  .chips span { font-size: 9.5px; padding: 6px 9px; }
  .lbl-hub .lbl-body { width: 130px; font-size: 11px; }
  .lbl-hub .lbl-body span { display: none; }
  .lbl-node .lbl-body { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel .r, .panel .ln > span, .panel.on .r, .panel.on .ln > span { transition-duration: 0.3s !important; filter: none !important; }
  .hint .arrow { animation: none; }
}
