:root {
  --ink: #07080b;
  --ink-2: #0c0e13;
  --panel: #10131a;
  --panel-2: #151923;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #eeebe3;
  --muted: #8e909b;
  --dim: #5d606c;
  --flame: #ffb547;
  --ember: #ff7a3d;
  --glow: rgba(255, 181, 71, 0.18);
  --gA: #5be3a1;
  --gB: #b4e35b;
  --gC: #ffd15b;
  --gD: #ff9a4d;
  --gE: #ff5468;
  --up: #5be3a1;
  --down: #ff5468;
  --radius: 18px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 1; }
.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* grain + vignette */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  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'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 8, 11, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.02em; }
.brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-2); transition: 0.2s ease;
  white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.04); }
.btn-x svg { flex: none; }
.btn-flame {
  background: linear-gradient(180deg, #ffc76b, var(--flame));
  color: #1a1004; border-color: transparent;
  box-shadow: 0 0 0 1px rgba(255, 181, 71, 0.4), 0 10px 40px -10px rgba(255, 181, 71, 0.6);
}
.btn-flame:hover { background: linear-gradient(180deg, #ffd38a, #ffbf5c); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gA);
  box-shadow: 0 0 0 0 rgba(91, 227, 161, 0.6); animation: pulse 2s infinite;
  display: inline-block; flex: none;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(91, 227, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 227, 161, 0); } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100vh - 64px); display: grid; align-items: center; overflow: hidden; }
#orrery { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 72% 50%, transparent 0%, var(--ink) 78%),
    linear-gradient(90deg, var(--ink) 0%, rgba(7, 8, 11, 0.6) 45%, transparent 70%);
}
.hero-inner { position: relative; z-index: 2; padding: 80px 0 120px; max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--flame); padding: 7px 12px; border-radius: 999px;
  border: 1px solid rgba(255, 181, 71, 0.25); background: rgba(255, 181, 71, 0.06);
}
h1 {
  font-size: clamp(46px, 7.4vw, 96px); line-height: 0.95; letter-spacing: -0.04em; font-weight: 600;
  margin: 26px 0 24px;
}
h1 .serif { font-size: 1.08em; color: var(--flame); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: #c4c2bb; max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.hero-foot {
  position: absolute; z-index: 3; bottom: 0; left: 0; right: 0;
  border-top: 1px solid var(--line); background: rgba(7, 8, 11, 0.6); backdrop-filter: blur(10px);
}
.stats { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 18px 20px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-family: var(--mono); font-size: clamp(18px, 2vw, 24px); font-weight: 500; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--muted); }
.skel { color: var(--dim); }

/* ---------- sections ---------- */
section { position: relative; padding: 130px 0; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--flame); letter-spacing: 0.1em; text-transform: uppercase; }
h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; margin: 16px 0 20px; }
h2 .serif { color: var(--flame); }
.sub { color: var(--muted); font-size: 18px; max-width: 640px; }
.section-head { margin-bottom: 56px; }

/* problem */
.problem-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.big-quote { font-size: clamp(26px, 3vw, 38px); line-height: 1.18; letter-spacing: -0.02em; }
.big-quote em { font-family: var(--serif); color: var(--flame); }
.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--ink-2); padding: 24px 26px; display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: baseline; }
.fact b { font-family: var(--mono); font-size: 28px; font-weight: 500; color: var(--text); letter-spacing: -0.03em; }
.fact p { color: var(--muted); font-size: 15px; }
.fact .src { display: block; font-size: 11px; color: var(--dim); margin-top: 4px; font-family: var(--mono); }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); overflow: hidden; min-height: 300px;
  display: flex; flex-direction: column;
}
.pillar::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(255, 181, 71, 0.14), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.pillar:hover::before { opacity: 1; }
.pillar .num { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.pillar h3 { font-size: 24px; letter-spacing: -0.02em; margin: 56px 0 10px; font-weight: 600; }
.pillar p { color: var(--muted); font-size: 15px; }
.pillar .tag {
  margin-top: auto; padding-top: 24px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
}
.tag.live { color: var(--gA); }
.tag.soon { color: var(--dim); }
.pillar svg { position: absolute; top: 24px; right: 24px; width: 40px; height: 40px; stroke: var(--flame); fill: none; stroke-width: 1.4; }

/* live board */
.board { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); overflow: hidden; }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); gap: 12px; flex-wrap: wrap; }
.board-head h4 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 4px; background: var(--panel); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.tabs button { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.tabs button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; padding: 12px 16px; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
td.num, th.num { text-align: right; font-family: var(--mono); }
.sym { font-weight: 600; }
.sym small { display: block; font-weight: 400; color: var(--dim); font-size: 12px; }
.up { color: var(--up); }
.down { color: var(--down); }
.grade {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
  font-family: var(--mono); font-weight: 600; font-size: 13px;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent);
}
.g-A { --c: var(--gA); } .g-B { --c: var(--gB); } .g-C { --c: var(--gC); } .g-D { --c: var(--gD); } .g-E { --c: var(--gE); } .g-– { --c: var(--dim); }
.bar { height: 4px; border-radius: 2px; background: var(--line); width: 80px; overflow: hidden; display: inline-block; vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--c, var(--flame)); }
.pill { display: inline-block; font-size: 11px; font-family: var(--mono); padding: 3px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.dark { color: var(--gE); border-color: rgba(255, 84, 104, 0.3); background: rgba(255, 84, 104, 0.07); }

/* twins */
.twins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.twin { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); }
.twin-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.twin-head b { font-size: 18px; letter-spacing: -0.01em; }
.twin-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.twin-row .mono { font-size: 13px; }

/* score formula */
.formula { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.weights { display: grid; gap: 12px; }
.w { display: grid; grid-template-columns: 150px 1fr 48px; gap: 14px; align-items: center; font-size: 14px; }
.w .track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.w .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--ember), var(--flame)); border-radius: 4px; }
.w .mono { text-align: right; color: var(--muted); }
.code {
  font-family: var(--mono); font-size: 13px; line-height: 1.75; color: #bdbab2;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; overflow-x: auto;
}
.code .k { color: var(--flame); } .code .c { color: var(--dim); } .code .n { color: var(--gA); }
.grade-scale { display: flex; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.grade-scale div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

/* token */
.token-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.coin-stage { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin-inline: auto; }
.coin-stage svg { width: 100%; height: 100%; overflow: visible; }
.utilities { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.util { padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.util h5 { font-size: 15px; margin-bottom: 6px; font-weight: 600; }
.util p { font-size: 14px; color: var(--muted); }
.token-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.alloc { display: grid; gap: 10px; margin-top: 8px; }
.alloc-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.alloc-row i { width: 10px; height: 10px; border-radius: 3px; }

/* flow */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.flow > div { padding: 26px; border-left: 1px solid var(--line); background: var(--ink-2); position: relative; }
.flow > div:first-child { border-left: 0; }
.flow b { display: block; font-size: 16px; margin: 10px 0 6px; }
.flow p { font-size: 14px; color: var(--muted); }
.flow .chain { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.chain.hl { color: var(--gA); } .chain.sol { color: #b58cff; } .chain.both { color: var(--flame); }

/* flywheel */
.fly { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.fly-wheel svg { width: 100%; max-width: 480px; display: block; margin-inline: auto; overflow: visible; }
.fly-spin { transform-origin: 220px 220px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fly-steps { list-style: none; counter-reset: s; display: grid; gap: 4px; }
.fly-steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.fly-steps li:first-child { border-top: 0; }
.fly-steps li::before { content: '0' counter(s); grid-row: span 2; font-family: var(--mono); font-size: 13px; color: var(--flame); padding-top: 2px; }
.fly-steps b { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.fly-steps span { color: var(--muted); font-size: 15px; }

/* roadmap */
.road { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.phase { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-2); }
.phase.now { border-color: rgba(255, 181, 71, 0.35); background: linear-gradient(180deg, rgba(255, 181, 71, 0.07), var(--ink-2)); }
.phase .when { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.phase.now .when { color: var(--flame); }
.phase h4 { font-size: 20px; margin: 14px 0 12px; letter-spacing: -0.01em; }
.phase ul { list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.phase li::before { content: '—  '; color: var(--dim); }

/* faq */
.faq { max-width: 820px; }
details { border-bottom: 1px solid var(--line); padding: 22px 0; }
summary { list-style: none; cursor: pointer; font-size: 18px; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-family: var(--mono); color: var(--flame); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin-top: 12px; max-width: 700px; }

/* cta + footer */
.final { text-align: center; padding: 160px 0; overflow: hidden; }
.final::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow), transparent 60%); pointer-events: none;
}
.final h2 { font-size: clamp(42px, 7vw, 92px); }
.final .hero-cta { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 40px 0 60px; font-size: 13px; color: var(--dim); }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer p { max-width: 720px; }

/* reveal */
.rv { opacity: 0; transform: translateY(24px); transition: opacity 0.9s cubic-bezier(.2, .7, .2, 1), transform 0.9s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- atlas app ---------- */
.app { padding: 32px 0 80px; }
.app-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.app-head h1 { font-size: clamp(34px, 4.4vw, 54px); margin: 10px 0 6px; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 28px; }
.kpi { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi b { display: block; font-family: var(--mono); font-size: 24px; font-weight: 500; margin-top: 4px; letter-spacing: -0.02em; }
.venues { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 28px; }
.venue { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; transition: 0.2s; text-align: left; }
.venue:hover, .venue.on { border-color: rgba(255, 181, 71, 0.4); }
.venue.on { background: linear-gradient(180deg, rgba(255, 181, 71, 0.06), var(--ink-2)); }
.venue-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.venue-top b { font-size: 16px; }
.venue-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.venue-meta strong { display: block; color: var(--text); font-family: var(--mono); font-weight: 500; font-size: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search { flex: 1; min-width: 180px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--text); font: inherit; font-size: 14px; }
.search:focus { outline: none; border-color: rgba(255, 181, 71, 0.5); }
select.search { flex: 0 0 auto; min-width: 140px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.sorted { color: var(--flame); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); z-index: 80;
  background: var(--ink-2); border-left: 1px solid var(--line-2); padding: 28px; overflow-y: auto;
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(.2, .7, .2, 1);
}
.drawer.open { transform: none; box-shadow: -40px 0 120px rgba(0, 0, 0, 0.6); }
.drawer h3 { font-size: 30px; letter-spacing: -0.02em; margin: 10px 0 4px; }
.drawer .close { position: absolute; top: 20px; right: 20px; font-size: 22px; color: var(--muted); }
.breakdown { display: grid; gap: 14px; margin: 24px 0; }
.bd { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.bd .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bd .track i { display: block; height: 100%; }
.bd small { grid-column: 1 / -1; color: var(--dim); font-size: 12px; }
.keys { border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 13px; display: grid; gap: 8px; }
.keys div { display: flex; justify-content: space-between; gap: 10px; }
.note { font-size: 12px; color: var(--dim); margin-top: 18px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .pillars, .road { grid-template-columns: 1fr 1fr; }
  .twins { grid-template-columns: 1fr 1fr; }
  .problem-grid, .formula, .token-grid, .fly { grid-template-columns: 1fr; gap: 40px; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow > div:nth-child(3) { border-left: 0; }
  .flow > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  section { padding: 90px 0; }
  .nav-links { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:last-child { display: none; }
  .hero-inner { padding-bottom: 200px; }
  .pillars, .road, .twins, .utilities, .flow { grid-template-columns: 1fr; }
  .flow > div { border-left: 0; border-top: 1px solid var(--line); }
  .flow > div:first-child { border-top: 0; }
  .fact { grid-template-columns: 1fr; gap: 4px; }
  .w { grid-template-columns: 110px 1fr 40px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .nav .btn:not(.btn-flame) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* X link: icon-only on phones, and kept visible where other secondary nav buttons hide */
@media (max-width: 720px) { .btn-x span { display: none; } .nav .btn.btn-x { display: inline-flex; padding: 11px; } }
