/* ==========================================================================
   Fonts (served from /public/fonts)
   ========================================================================== */
@font-face { font-family: "Syne"; src: url("/fonts/syne-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Syne"; src: url("/fonts/syne-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Syne"; src: url("/fonts/syne-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --accent: #ff9b52;
  --accent-rgb: 255, 155, 82;
  --bg: #030304;
  --ink: #f3efe9;
  --ink-2: rgba(243, 239, 233, 0.72);
  --ink-3: rgba(243, 239, 233, 0.46);
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --glass: rgba(12, 11, 13, 0.52);
  --glass-strong: rgba(10, 9, 11, 0.7);
  --blur: 24px;
  --max: 1480px;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 22px;
  --display: "Syne", "Geist", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { display: block; }
kbd { font-family: var(--mono); font-size: .72em; padding: .15em .45em; border: 1px solid var(--line-2); border-radius: 6px; color: var(--ink-2); }
::selection { background: rgba(var(--accent-rgb), .35); }
.display { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(140%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
}
[hidden], .flag-off { display: none !important; }

/* custom cursor hides the system one on fine pointers */
@media (pointer: fine) { body.has-cursor, body.has-cursor * { cursor: none !important; } }

/* ==========================================================================
   Background layers
   ========================================================================== */
#space { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
#orbitViz { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .8s var(--ease); }
body.route-orbit #orbitViz { opacity: 1; }
.grain {
  position: fixed; inset: -50%; z-index: 2; 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>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(0,0)} }
.top-fade { position: fixed; left: 0; right: 0; top: 0; height: 120px; z-index: 20; pointer-events: none; background: linear-gradient(rgba(3,3,4,.72), rgba(3,3,4,0)); }
body.is-intro .top-fade { opacity: 0; }
.vignette { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,.65) 100%); }

/* ==========================================================================
   Intro
   ========================================================================== */
#intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none; }
body:not(.is-intro) #intro { display: none; }
#intro > * { pointer-events: auto; }
.intro-log { position: absolute; left: var(--pad); top: calc(var(--pad) + 4px); color: var(--ink-3); display: grid; gap: 6px; font-size: 11.5px; }
.intro-log div { opacity: 0; transform: translateY(6px); animation: logIn .5s var(--ease) forwards; }
.intro-log div b { color: var(--accent); font-weight: 500; margin-right: 10px; }
@keyframes logIn { to { opacity: 1; transform: none; } }
.intro-phase { position: absolute; right: var(--pad); top: calc(var(--pad) + 4px); display: flex; align-items: center; gap: 14px; color: var(--ink-2); }
.intro-bar { width: 140px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.intro-bar i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.intro-center { display: grid; justify-items: center; gap: 20px; text-align: center; transform: translateY(min(30vh, 290px)); }
.intro-kicker { color: var(--accent); opacity: 0; transition: opacity 1s var(--ease); }
.intro-title { margin: 0; font-size: clamp(40px, min(7.2vw, 13vh), 124px); line-height: .9; letter-spacing: .02em; text-transform: uppercase; display: flex; gap: .01em; }
.intro-title span { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(.25em) scale(1.15); transition: opacity 1s var(--ease), filter 1.2s var(--ease), transform 1.2s var(--ease); }
#intro.show-title .intro-title span { opacity: 1; filter: blur(0); transform: none; }
#intro.show-title .intro-kicker { opacity: 1; }

.enter-btn {
  position: relative; display: inline-flex; align-items: center; gap: 16px;
  padding: 20px 34px 20px 30px; border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), .55);
  background: rgba(8, 7, 8, .55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .01em;
  opacity: 0; transform: translateY(14px) scale(.96);
  transition: opacity 1s var(--ease), transform 1s var(--ease), border-color .3s, background .3s, box-shadow .3s;
  pointer-events: none;
}
#intro.show-enter .enter-btn { opacity: 1; transform: none; pointer-events: auto; }
.enter-btn:hover { background: rgba(var(--accent-rgb), .12); border-color: var(--accent); box-shadow: 0 0 60px -6px rgba(var(--accent-rgb), .55); }
.enter-ring { position: absolute; inset: -9px; border-radius: inherit; border: 1px solid rgba(var(--accent-rgb), .25); animation: ringPulse 2.6s var(--ease) infinite; pointer-events: none; }
.enter-core { width: 12px; height: 12px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px var(--accent), 0 0 18px 2px rgba(var(--accent-rgb), .8); }
.enter-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .75; transition: transform .6s var(--ease); }
.enter-btn:hover .enter-icon { transform: rotate(90deg) scale(.85); }
@keyframes ringPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.22, 1.6); opacity: 0; } }
.intro-hint { color: var(--ink-3); opacity: 0; transition: opacity 1s var(--ease) .4s; }
#intro.show-enter .intro-hint { opacity: 1; }
.intro-skip { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 4px); color: var(--ink-3); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; transition: color .3s, border-color .3s, opacity .5s; }
.intro-skip:hover { color: var(--ink); border-color: var(--line-2); }
#intro.show-enter .intro-skip { opacity: 0; pointer-events: none; }
#intro.diving > * { opacity: 0 !important; transition: opacity .5s var(--ease) !important; }

/* ==========================================================================
   Chrome (top bar, dock, corners) — hidden during intro
   ========================================================================== */
.topbar, .dock, .corner, #pages { transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
body.is-intro .topbar, body.is-intro .dock, body.is-intro .corner, body.is-intro #pages { opacity: 0; pointer-events: none; }
body.is-intro .topbar { transform: translateY(-20px); }
body.is-intro .dock { transform: translate(-50%, 30px); }

.topbar {
  position: fixed; z-index: 30; top: 22px; left: 50%; translate: -50% 0;
  width: calc(100% - 2 * var(--pad)); max-width: calc(var(--max) - 2 * var(--pad));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: none; border: 1px solid var(--line-2); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand.has-logo .brand-mark { display: block; }
.brand-word { font-size: 22px; letter-spacing: -.01em; }
.topbar-readout {
  justify-self: center; display: flex; align-items: center; gap: 10px; color: var(--ink-3);
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(10,9,11,.35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.topbar-readout b { color: var(--ink); font-weight: 500; }
.topbar-readout b.up { color: #8fe3b0; }
.topbar-readout b.down { color: #ff8a8a; }
.topbar-readout .sep { width: 1px; height: 12px; background: var(--line-2); }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .7); animation: pulse 2s infinite; display: inline-block; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); } 70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(10,9,11,.35);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: border-color .3s, background .3s;
}
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn:hover { border-color: var(--ink-2); background: rgba(255,255,255,.06); }
.ca-chip {
  height: 46px; display: inline-flex; align-items: center; gap: 10px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(10,9,11,.35);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--ink-2); transition: border-color .3s, color .3s;
}
.ca-chip .ca-label, .ca-big .ca-label { color: var(--accent); }
.ca-chip svg, .ca-big svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .7; }
.ca-chip:hover { border-color: var(--ink-2); color: var(--ink); }
.wallet-btn {
  height: 46px; display: inline-flex; align-items: center; gap: 10px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: #0a0a0b; font-weight: 600; font-size: 16px;
  transition: background .3s, box-shadow .3s, transform .3s var(--ease);
}
.wallet-btn:hover { background: #fff; box-shadow: 0 0 40px -8px rgba(var(--accent-rgb), .8); }
.wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: #0a0a0b; box-shadow: 0 0 0 2px var(--accent); }
.wallet-btn.connected { background: rgba(10,9,11,.45); color: var(--ink); border: 1px solid rgba(var(--accent-rgb), .5); backdrop-filter: blur(16px); }
.wallet-btn.connected .wallet-dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* Bottom dock — curved orbital nav */
.dock {
  position: fixed; z-index: 30; left: 50%; bottom: 26px; transform: translateX(-50%);
  padding: 0; width: max-content;
}
.dock-arc { position: absolute; left: 4%; right: 4%; top: -24px; width: 92%; height: 30px; overflow: visible; pointer-events: none; }
.dock-arc path { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; vector-effect: non-scaling-stroke; }
.dock-body {
  position: absolute; top: -29px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: #000; box-shadow: 0 0 0 1.5px var(--accent), 0 0 14px 2px rgba(var(--accent-rgb), .7);
  transform: translate(-50%, 0); transition: left .12s linear, top .12s linear; pointer-events: none;
}
.dock-items {
  display: flex; align-items: center; gap: 4px; padding: 7px; border-radius: 999px;
  background: rgba(12, 11, 13, .5); border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
}
.dock-items a, .dock-menu {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 12px 20px; border-radius: 999px;
  font-size: 16px; font-weight: 500; color: var(--ink-2); transition: color .3s, background .3s;
}
.dock-items a i { font-style: normal; font-size: 10.5px; color: var(--ink-3); transition: color .3s; }
.dock-items a:hover, .dock-menu:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.dock-items a.active { color: var(--ink); background: rgba(255,255,255,.08); }
.dock-items a.active i { color: var(--accent); }
.dock-menu { align-items: center; margin-left: 6px; border-left: 1px solid var(--line); border-radius: 0 999px 999px 0; padding-left: 20px; }
.dock-menu kbd { font-size: 10.5px; }

.corner { position: fixed; z-index: 20; bottom: 34px; color: var(--ink-3); display: grid; gap: 4px; font-size: 11px; }
.corner-left { left: var(--pad); }
.corner-right { right: var(--pad); text-align: right; }
.corner-right span:first-child { color: var(--ink); font-size: 13px; }

/* ==========================================================================
   Pages
   ========================================================================== */
#pages {
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; overflow-x: hidden; outline: none;
  overscroll-behavior: none; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent;
}
#pages::-webkit-scrollbar { width: 8px; }
#pages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }
.page { position: relative; min-height: 100vh; opacity: .22; transition: opacity .8s var(--ease); }
.page.active { opacity: 1; }
.page:not(.active) * { pointer-events: none; }
.page > .wrap { padding-top: 110px; padding-bottom: 150px; }
[data-page="home"], [data-page="orbit"] { height: 100vh; }
.head-card { padding: clamp(24px, 2.6vw, 36px); margin-bottom: 14px; }
.head-card .page-title { margin-bottom: 0; }
.scroll-hint {
  position: absolute; left: var(--pad); bottom: 96px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  color: var(--ink-3); font-size: 10.5px; transition: color .3s, opacity .6s;
}
.scroll-hint:hover { color: var(--ink); }
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: -1px; top: -12px; width: 3px; height: 12px; border-radius: 2px; background: var(--ink); animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { to { transform: translateY(48px); } }
[data-page="home"]:not(.active) .scroll-hint { opacity: 0; }

.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-2); margin: 0 0 22px; }
.eyebrow-line { width: 34px; height: 1px; background: var(--accent); }
.page-title { font-size: clamp(38px, 4.6vw, 72px); line-height: .98; margin: 0 0 28px; }
.tkr { color: inherit; }

/* Home */
.hero {
  position: absolute; top: 50%; left: 44%; transform: translate(0, -52%);
  width: min(900px, 54vw);
  padding: clamp(28px, 3vw, 48px);
}
.hero-title { font-size: clamp(40px, min(5.2vw, 9.4vh), 112px); line-height: .92; margin: 0 0 34px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
.page.seen .hero-title .line > span { transform: none; }
.hero-title .line:nth-child(2) > span { transition-delay: .1s; }
.hero-title .line:nth-child(3) > span { transition-delay: .2s; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 28px; border-radius: 999px;
  font-weight: 600; font-size: 17px; transition: background .3s, color .3s, border-color .3s, box-shadow .4s, transform .4s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translate(2px, -2px); }
.btn-primary { background: var(--accent); color: #120a04; }
.btn-primary:hover { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .15), 0 20px 60px -10px rgba(var(--accent-rgb), .7); }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(10,9,11,.35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.btn-ghost:hover { border-color: var(--ink-2); background: rgba(255,255,255,.06); }
.btn-wide { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ca-big {
  display: inline-flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px; border-radius: 14px;
  border: 1px dashed var(--line-2); color: var(--ink-2); transition: border-color .3s, color .3s; max-width: 100%;
}
.ca-big .ca-value { text-transform: none; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-big:hover { border-color: rgba(var(--accent-rgb), .7); color: var(--ink); }
.x-big { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); color: var(--ink-2); transition: border-color .3s, color .3s; }
.x-big svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.x-big:hover { color: var(--ink); border-color: var(--line-2); }
.hero-stats { display: flex; gap: 44px; margin: clamp(20px, 4vh, 44px) 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-stats div { display: grid; gap: 4px; }
.hero-stats dt { color: var(--ink-3); }
.hero-stats dd { margin: 0; font-size: 26px; font-weight: 700; }

/* Mechanism */
.mech-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.mech .page-title { font-size: clamp(34px, 3.4vw, 58px); }
.porthole {
  position: sticky; top: 110px; height: calc(100vh - 250px); min-height: 420px; max-height: 820px; width: 100%;
  border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  box-shadow: inset 0 0 120px rgba(0,0,0,.55);
}
.ph-corner { position: absolute; width: 22px; height: 22px; border-color: var(--ink-3); border-style: solid; border-width: 0; }
.ph-corner.tl { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.ph-corner.tr { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.ph-corner.bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.ph-corner.br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }
.ph-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ph-lines polyline { fill: none; stroke: rgba(243,239,233,.45); stroke-width: 1; }
.ph-lines circle { fill: rgba(0,0,0,.6); stroke: var(--accent); stroke-width: 1.2; }
.ph-label { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--ink-2); white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; background: rgba(6,5,7,.62); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ph-label b { color: var(--accent); font-weight: 500; text-transform: none; }
.ph-foot { position: absolute; left: 22px; right: 22px; bottom: 20px; display: flex; justify-content: space-between; color: var(--ink-3); font-size: 11px; }
.accordion { display: grid; gap: 10px; }
.accordion details { border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); transition: border-color .3s, background .3s; }
.accordion details[open] { border-color: rgba(var(--accent-rgb), .35); background: rgba(16, 14, 15, .58); }
.accordion summary { list-style: none; display: flex; align-items: center; gap: 18px; padding: 22px 24px; font-size: 20px; font-weight: 500; }
.accordion summary::-webkit-details-marker { display: none; }
.acc-n { color: var(--ink-3); }
details[open] .acc-n { color: var(--accent); }
.acc-t { flex: 1; font-family: var(--display); font-weight: 700; }
.acc-i { width: 14px; height: 14px; position: relative; flex: none; }
.acc-i::before, .acc-i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink-2); transition: transform .4s var(--ease); }
.acc-i::after { transform: rotate(90deg); }
details[open] .acc-i::after { transform: rotate(0); }
.acc-b { padding: 0 24px 22px 64px; color: var(--ink-2); }
.acc-b p { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); display: grid; gap: 8px; }
.stat span { color: var(--ink-3); font-size: 11px; }
.stat b { font-size: 26px; font-weight: 700; }
.stat-note { display: flex; align-items: center; gap: 10px; color: var(--ink-3); margin: 16px 0 0; font-size: 11px; }

/* Orbit */
.orbit-head { position: absolute; left: var(--pad); top: 110px; max-width: 480px; }
.orbit-head .page-title { margin-bottom: 24px; }
.orbit-stats { display: flex; gap: 30px; }
.orbit-stats div { display: grid; gap: 4px; }
.orbit-stats span { color: var(--ink-3); font-size: 11px; }
.orbit-stats b { font-size: 26px; font-weight: 700; }
.ledger { position: absolute; right: var(--pad); top: 110px; bottom: 120px; width: min(440px, 34vw); display: flex; flex-direction: column; overflow: hidden; }
.ledger-tabs { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); }
.ledger-tabs button { flex: 1; padding: 11px; border-radius: 12px; font-size: 15px; color: var(--ink-3); font-weight: 500; transition: background .3s, color .3s; }
.ledger-tabs button.active { background: rgba(255,255,255,.07); color: var(--ink); }
.ledger-list { overflow-y: auto; flex: 1; padding: 6px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; transition: background .25s; }
.row:hover, .row.hl { background: rgba(255,255,255,.05); }
.row-img { width: 44px; height: 44px; border-radius: 50%; background: #0b0a0c; border: 1px solid var(--line-2); overflow: hidden; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--ink-3); }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-main { min-width: 0; }
.row-main b { display: block; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.row-bar { height: 2px; border-radius: 2px; background: var(--line); margin-top: 8px; overflow: hidden; }
.row-bar i { display: block; height: 100%; background: var(--accent); }
.row-side { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.row-side small { display: block; color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.empty { padding: 40px 24px; text-align: center; color: var(--ink-3); display: grid; gap: 16px; justify-items: center; }
.empty b { color: var(--ink); font-family: var(--display); font-size: 22px; }
.viz-tip { position: fixed; z-index: 25; padding: 14px 16px; border-radius: 14px; min-width: 200px; pointer-events: none; font-size: 14px; }
.viz-tip b { font-family: var(--display); font-size: 18px; display: block; }
.viz-tip .mono { color: var(--ink-3); font-size: 11px; }

/* Launch */
.launch { display: grid; grid-template-columns: minmax(0, 620px) 1fr; gap: 40px; align-items: start; }
.launch-form { padding: 36px; }
.lede { color: var(--ink-2); margin: -10px 0 28px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; position: relative; }
.field > span { color: var(--ink-3); font-size: 11px; }
.field small { color: var(--ink-3); opacity: .7; text-transform: none; letter-spacing: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field-sm { max-width: 100%; }
.field input, .field textarea, .prefixed {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(0,0,0,.35); color: var(--ink); font: inherit; font-size: 17px; outline: none; resize: vertical;
  transition: border-color .3s, box-shadow .3s;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(243,239,233,.28); }
.field input:focus, .field textarea:focus, .prefixed:focus-within { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .12); }
.prefixed { display: flex; align-items: center; gap: 4px; padding: 0 0 0 16px; }
.prefixed i { font-style: normal; color: var(--accent); font-family: var(--mono); }
.prefixed input { border: 0; background: none; box-shadow: none !important; padding-left: 0; text-transform: uppercase; }
.err { font-style: normal; color: #ff9a9a; font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.count { position: absolute; right: 12px; bottom: 10px; font-style: normal; color: var(--ink-3); font-size: 10.5px; }
.drop { display: flex; align-items: center; gap: 18px; padding: 16px; border-radius: 14px; border: 1px dashed var(--line-2); background: rgba(0,0,0,.25); transition: border-color .3s, background .3s; }
.drop:hover, .drop.over { border-color: rgba(var(--accent-rgb), .7); background: rgba(var(--accent-rgb), .05); }
.drop-preview { width: 64px; height: 64px; border-radius: 50%; flex: none; border: 1px solid var(--line-2); background: #070608 center/cover no-repeat; }
.drop-text { color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.drop-text small { color: var(--ink-3); font-size: 10.5px; }
.form-status { color: var(--ink-2); min-height: 1em; margin: 14px 0 0; text-transform: none; letter-spacing: .02em; }
.form-status.ok { color: #9be7b8; }
.form-status.bad { color: #ff9a9a; }
.preview-card { margin: 6px 0 22px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.22); }
.pc-top { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; }
.pc-img { width: 52px; height: 52px; border-radius: 50%; background: #070608 center/cover no-repeat; border: 1px solid var(--line-2); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .08); }
.pc-id { min-width: 0; }
.pc-top b { display: block; font-size: 20px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-top .mono { color: var(--accent); }
.pc-status { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-3); font-size: 10.5px; }
.pc-desc { color: var(--ink-2); font-size: 15px; margin: 14px 0; word-break: break-word; }
.pc-chart { border-top: 1px solid var(--line); padding-top: 14px; }
.pc-chart-head, .pc-axis { display: flex; justify-content: space-between; color: var(--ink-3); font-size: 10.5px; }
.pc-axis b { color: var(--ink); font-weight: 500; }
.pc-chart svg { width: 100%; height: 96px; margin: 10px 0 8px; overflow: visible; }

/* ==========================================================================
   Menu
   ========================================================================== */
.menu {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  background: rgba(3,3,4,.55); backdrop-filter: blur(30px) saturate(130%); -webkit-backdrop-filter: blur(30px) saturate(130%);
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
.menu.open { opacity: 1; visibility: visible; transition: opacity .6s var(--ease), visibility 0s; }
.menu-inner { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
.menu-top { display: flex; justify-content: space-between; color: var(--ink-3); }
.menu-top button { display: inline-flex; gap: 10px; align-items: center; color: var(--ink-2); }
.menu-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.menu-list li { border-bottom: 1px solid var(--line); overflow: hidden; }
.menu-list a { display: grid; grid-template-columns: 70px 1fr auto; align-items: baseline; gap: 20px; padding: 18px 0; transition: padding .5s var(--ease), color .3s; }
.menu-list a i { font-style: normal; color: var(--ink-3); }
.menu-list a span { font-size: clamp(40px, 7vw, 104px); line-height: 1; transform: translateY(110%); transition: transform .9s var(--ease); display: inline-block; }
.menu.open .menu-list a span { transform: none; }
.menu.open .menu-list li:nth-child(2) a span { transition-delay: .05s; }
.menu.open .menu-list li:nth-child(3) a span { transition-delay: .1s; }
.menu.open .menu-list li:nth-child(4) a span { transition-delay: .15s; }
.menu-list a em { font-style: normal; color: var(--ink-3); font-size: 16px; opacity: 0; transform: translateX(-10px); transition: opacity .4s, transform .5s var(--ease); }
.menu-list a:hover { padding-left: 20px; }
.menu-list a:hover em, .menu-list a.active em { opacity: 1; transform: none; }
.menu-list a:hover i, .menu-list a.active i { color: var(--accent); }
.menu-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.menu-links { display: flex; gap: 26px; color: var(--ink-2); }
.menu-links a:hover { color: var(--accent); }

/* ==========================================================================
   Modal / toast / cursor
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s linear .4s; }
.modal.open { opacity: 1; visibility: visible; transition: opacity .4s var(--ease), visibility 0s; }
.modal-card { width: min(440px, calc(100vw - 32px)); padding: 24px; transform: translateY(12px) scale(.98); transition: transform .5s var(--ease); background: var(--glass-strong); }
.modal.open .modal-card { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head b { font-size: 24px; }
.modal-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.wallet-list { display: grid; gap: 8px; }
.wallet-opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); transition: border-color .3s, background .3s; font-size: 17px; font-weight: 500; width: 100%; text-align: left; }
.wallet-opt:hover { border-color: rgba(var(--accent-rgb), .6); background: rgba(var(--accent-rgb), .06); }
.wallet-opt small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.wallet-opt.detected small { color: var(--accent); }

.toast { position: fixed; z-index: 80; left: 50%; top: 86px; transform: translate(-50%, -10px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #0a0a0b; opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); text-transform: none; letter-spacing: .02em; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; display: none; }
body.has-cursor .cursor { display: block; }
.cursor-dot { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--ink); }
.cursor-ring {
  position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), .6);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
}
.cursor.hover .cursor-ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(var(--accent-rgb), .08); border-color: var(--accent); }
.cursor.enter .cursor-ring { width: 90px; height: 90px; margin: -45px 0 0 -45px; border-color: var(--accent); background: rgba(0,0,0,.25); }
.cursor.down .cursor-ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
.cursor-label { position: absolute; left: 22px; top: 14px; white-space: nowrap; color: var(--ink-2); font-size: 10.5px; opacity: 0; transition: opacity .3s; }
.cursor.labelled .cursor-label { opacity: 1; }

.noscript { position: fixed; inset: 0; display: grid; place-items: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .hero { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: 120px; transform: none; }
  .mech-grid { grid-template-columns: 1fr; }
  .porthole { position: relative; top: 0; height: 56vh; min-height: 320px; }
  .launch { grid-template-columns: 1fr; }
  .launch-form { margin-top: 34vh; }
  .ledger { left: var(--pad); right: var(--pad); width: auto; top: auto; height: 38vh; bottom: 110px; }
  .orbit-head { top: 86px; left: 12px; right: 12px; max-width: none; padding: 18px 20px; }
  .orbit-head .page-title { font-size: 30px; margin-bottom: 12px; }
  .ledger { left: 12px; right: 12px; }
  [data-page="home"] .scroll-hint { bottom: 210px; }
  .topbar-readout { display: none; }
  .corner { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .topbar { top: 14px; }
  .ca-chip { display: none; }
  .wallet-btn { padding: 0 16px; font-size: 15px; }
  .hero { top: auto; bottom: 96px; left: 12px; right: 12px; transform: none; padding: 22px; }
  .scroll-hint { display: none; }
  .hero-title { font-size: clamp(40px, 12.5vw, 72px); margin-bottom: 24px; }
  .eyebrow { margin-bottom: 14px; }
  .hero-stats { display: none; }
  .hero-actions { flex-wrap: nowrap; gap: 10px; margin-bottom: 12px; }
  .hero-actions .btn { flex: 1; justify-content: center; padding: 0 14px; }
  .hide-sm { display: none; }
  .ca-big, .x-big { height: 44px; }
  .hero-meta { flex-wrap: nowrap; }
  .ca-big { flex: 1; min-width: 0; }
  .btn { height: 54px; padding: 0 22px; font-size: 16px; }
  .dock { bottom: 14px; }
  .dock-items a { padding: 10px 10px; font-size: 13.5px; }
  .dock-items { gap: 0; padding: 5px; }
  .dock-items a i { display: none; }
  .dock-menu kbd { display: none; }
  .dock-menu { padding: 11px 14px; }
  .corner { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .launch-form { padding: 24px; }
  .acc-b { padding-left: 24px; }
  .menu-list a { grid-template-columns: 40px 1fr; }
  .menu-list a em { display: none; }
  .intro-log { display: none; }
}
@media (max-width: 480px) {
  .dock-items a span { font-size: 13px; }
  .dock-items a[data-route="mechanism"] span::after { content: ""; }
}

@media (max-height: 760px) and (min-width: 1101px), (max-height: 640px) { .hero-stats { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .2s !important; }
}

/* Fallback when WebGL is unavailable */
body.no-webgl { background: radial-gradient(60% 50% at 30% 50%, rgba(var(--accent-rgb), .18), transparent 60%), radial-gradient(14% 12% at 30% 50%, #000 60%, transparent 62%), #030304; }
body.no-webgl #space { display: none; }
