/* Heron design system: night lake, mist-white dawn sections, one mustard accent (the beak). */
:root {
  --abyss: #070e14; --night: #0e1a24; --lake: #14293a; --lake2: #1b3a50;
  --slate: #6f8798; --slate2: #94a8b6; --mist: #e8eef1; --fog: #c9d5db; --paper: #f3f6f7;
  --beak: #e9b93a; --beak-d: #b98d1c; --ink: #0a0f14;
  --loss: #e2735b; --gain: #86d6b4;
  --hair: rgba(232, 238, 241, .14); --hair2: rgba(232, 238, 241, .08);
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Sometype Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r: 16px; --pad: clamp(18px, 4vw, 56px); --max: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--abyss); color: var(--mist); font: 400 16px/1.6 var(--sans); overflow-x: hidden; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--beak); color: var(--ink); }
:focus-visible { outline: 2px solid var(--beak); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: min(var(--max), 100% - 2 * var(--pad)); margin-inline: auto; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 500; color: var(--beak); }
.kicker { font: 500 .72rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--slate2); display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--fog); max-width: 58ch; }
p { margin: 0 0 1em; }

/* ---------- ripple-ring buttons: one family everywhere (pills with a ring that grows) ---------- */
.btn { --ring: rgba(233, 185, 58, .2); position: relative; display: inline-flex; align-items: center; gap: .6em; padding: .85em 1.5em; border-radius: 999px; font: 600 .92rem/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .25s, box-shadow .35s, background .25s, color .25s; box-shadow: 0 0 0 4px var(--ring); }
.btn::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 1px solid var(--beak); opacity: 0; transform: scale(1); pointer-events: none; }
.btn:hover { box-shadow: 0 0 0 9px var(--ring); transform: translateY(-1px); }
.btn:hover::after { animation: ripple .9s ease-out; }
@keyframes ripple { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.22, 1.5); } }
.btn-primary { background: var(--beak); color: var(--ink); }
.btn-primary:hover { background: #f3c64d; }
.btn-ghost { background: transparent; color: var(--mist); border-color: var(--hair); --ring: rgba(232, 238, 241, .08); }
.btn-ghost:hover { border-color: var(--slate2); }
.on-light .btn-ghost { color: var(--ink); border-color: rgba(10, 15, 20, .22); --ring: rgba(10, 15, 20, .06); }
.btn-sm { padding: .6em 1.1em; font-size: .8rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- nav: links sit on the waterline and reflect ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--pad); transition: background .35s, backdrop-filter .35s, padding .35s; }
.nav.solid { background: rgba(7, 14, 20, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 10px; border-bottom: 1px solid var(--hair2); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1.5rem/1 var(--serif); letter-spacing: .01em; }
.brand img { width: 30px; height: 30px; image-rendering: pixelated; border-radius: 6px; }
.links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.links a { font: 500 .74rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--fog); padding: 8px 2px; position: relative; display: inline-block; -webkit-box-reflect: below -4px linear-gradient(transparent 40%, rgba(232, 238, 241, .22)); transition: color .2s; }
.links a:hover, .links a[aria-current="page"] { color: var(--beak); }
.links .tok { color: var(--beak); }
.burger { display: none; background: none; border: 1px solid var(--hair); color: var(--mist); width: 42px; height: 42px; border-radius: 999px; cursor: pointer; font: 500 .7rem var(--mono); }
@media (max-width: 820px) {
  .burger { display: inline-grid; place-items: center; }
  .links { position: fixed; inset: 64px 12px auto 12px; flex-direction: column; align-items: stretch; gap: 0; background: rgba(10, 18, 26, .96); border: 1px solid var(--hair); border-radius: 18px; padding: 8px; opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .25s; }
  .links.open { opacity: 1; pointer-events: auto; transform: none; }
  .links a { padding: 14px 16px; -webkit-box-reflect: unset; display: block; }
}

/* ---------- hero: the lake ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: #0b1c29; isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 3; padding: clamp(104px, 17vh, 170px) var(--pad) 0; width: min(var(--max), 100%); margin-inline: auto; pointer-events: none; }
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 { max-width: 15ch; font-size: clamp(2.4rem, 5.5vw, 4.9rem); margin: 22px 0 22px; text-shadow: 0 2px 30px rgba(7, 14, 20, .8); }
.hero-copy .lead { max-width: 46ch; text-shadow: 0 1px 18px rgba(7, 14, 20, .9); }
.cta { display: flex; flex-wrap: wrap; gap: 18px 16px; margin-top: 28px; }
.chips { counter-reset: c; position: absolute; z-index: 4; left: 0; right: 0; bottom: clamp(16px, 3.4vh, 34px); display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-inline: var(--pad); }
.chip { display: inline-flex; align-items: center; gap: 9px; font: 500 .72rem/1 var(--mono); letter-spacing: .06em; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--hair); background: rgba(10, 20, 30, .72); color: var(--slate2); cursor: pointer; backdrop-filter: blur(6px); transition: .3s; }
.chip { counter-increment: c; white-space: nowrap; }
.chip i { width: 18px; height: 18px; border-radius: 50%; background: rgba(111, 135, 152, .25); display: grid; place-items: center; font: 600 .62rem/1 var(--mono); font-style: normal; transition: .3s; }
.chip i::after { content: counter(c); }
.chip.lit { color: var(--ink); background: var(--beak); border-color: var(--beak); }
.chip.lit i { background: var(--ink); color: var(--beak); }
.chip:hover:not(.lit) { border-color: var(--beak); color: var(--mist); }
.receipt { position: absolute; z-index: 4; right: var(--pad); top: clamp(96px, 16vh, 150px); font: 500 .74rem/1.6 var(--mono); color: var(--mist); background: rgba(10, 20, 30, .78); border: 1px solid var(--beak); border-radius: 14px; padding: 14px 18px; opacity: 0; transform: translateY(8px); transition: .5s; backdrop-filter: blur(8px); pointer-events: none; max-width: 270px; }
.receipt.show { opacity: 1; transform: none; }
.receipt span { display: block; }
.receipt b { display: block; color: var(--beak); font-weight: 600; letter-spacing: .12em; }
.hint { position: absolute; z-index: 4; left: 50%; transform: translateX(-50%); bottom: calc(clamp(16px, 3.4vh, 34px) + 56px); font: 500 .66rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--slate); }
@media (max-width: 700px) {
  .receipt { top: 74px; bottom: auto; right: 12px; left: 12px; max-width: none; padding: 8px 14px; display: flex; gap: 12px; align-items: baseline; }
  .receipt span:nth-of-type(n+2) { display: none; }
  .hint { display: none; }
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
}

/* ---------- sections ---------- */
section { position: relative; }
.sec { padding: clamp(72px, 11vw, 150px) 0; }
.sec-head { max-width: 780px; margin-bottom: clamp(32px, 5vw, 64px); }
.sec-head h2 { margin: 18px 0 18px; }
.dawn { background: var(--paper); color: var(--ink); }
.dawn .lead { color: #33424d; }
.dawn .kicker { color: #4f6371; }
.dawn h2 em, .dawn h3 em { color: #a97a00; }
.dawn::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; background: linear-gradient(var(--abyss), transparent); opacity: .0; pointer-events: none; }
.waterline { height: 1px; background: linear-gradient(90deg, transparent, var(--slate) 20%, var(--slate) 80%, transparent); opacity: .35; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* cards: hairline + waterline highlight on top, soft reflection on the bottom */
.card { position: relative; background: linear-gradient(180deg, rgba(27, 58, 80, .38), rgba(14, 26, 36, .5)); border: 1px solid var(--hair); border-radius: var(--r); padding: clamp(20px, 2.4vw, 30px); overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(232, 238, 241, .55), transparent); }
.dawn .card { background: #fff; border-color: rgba(10, 15, 20, .1); box-shadow: 0 1px 0 rgba(10, 15, 20, .04), 0 24px 50px -30px rgba(10, 30, 50, .25); }
.dawn .card::before { background: linear-gradient(90deg, transparent, rgba(10, 15, 20, .25), transparent); }

/* ---------- proof ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .grid3, .grid4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid3, .grid4 { grid-template-columns: 1fr; } }
.stat .n { font: 600 clamp(2.4rem, 4.4vw, 3.6rem)/1 var(--serif); margin: 14px 0 8px; font-variant-numeric: tabular-nums; }
.sg { font-family: var(--sans); font-weight: 500; margin-right: .08em; opacity: .9; }
.stat .n.neg { color: var(--loss); } .stat .n.pos { color: var(--gain); }
.stat p { margin: 0; color: var(--slate2); font-size: .92rem; }
.stat .tag { font: 500 .66rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--beak); }
.bar { height: 6px; border-radius: 99px; background: rgba(232, 238, 241, .08); margin-top: 16px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--beak); border-radius: 99px; }
.note { font: 400 .78rem/1.6 var(--mono); color: var(--slate2); margin-top: 26px; max-width: 80ch; }
.dawn .note { color: #566a78; }

/* ---------- lab ---------- */
.lab > :last-child { position: sticky; top: 84px; }
@media (max-width: 980px) { .lab > :last-child { position: static; } }
.lab { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 22px; align-items: start; }
@media (max-width: 980px) { .lab { grid-template-columns: 1fr; } }
.lab h3 { font-size: 1.15rem; margin-bottom: 14px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pill { font: 500 .74rem/1 var(--mono); padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(10, 15, 20, .2); background: transparent; color: var(--ink); cursor: pointer; transition: .2s; }
.pill:hover { border-color: var(--ink); }
.pill.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.field { border-top: 1px solid rgba(10, 15, 20, .1); padding: 14px 0; display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; }
.field:first-of-type { border-top: 0; }
.field label { font-size: .88rem; font-weight: 600; cursor: pointer; line-height: 1.3; }
.field .val { font: 600 .82rem var(--mono); min-width: 5.2em; text-align: right; }
.field input[type=range] { grid-column: 2 / 4; width: 100%; }
.field.off input[type=range], .field.off .val { opacity: .35; }
input[type=checkbox] { appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(10, 15, 20, .45); display: grid; place-items: center; cursor: pointer; margin: 0; transition: .2s; background: #fff; }
input[type=checkbox]:checked { border-color: var(--ink); background: var(--beak); box-shadow: 0 0 0 4px rgba(233, 185, 58, .22); }
input[type=range] { appearance: none; height: 22px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; background: rgba(10, 15, 20, .2); border-radius: 3px; }
input[type=range]::-moz-range-track { height: 3px; background: rgba(10, 15, 20, .2); border-radius: 3px; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%; background: var(--ink); border: 3px solid var(--beak); }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 3px solid var(--beak); }
select { font: 500 .85rem var(--sans); padding: 10px 14px; border-radius: 999px; border: 1px solid rgba(10, 15, 20, .25); background: #fff; color: var(--ink); width: 100%; }
.seg { display: inline-flex; border: 1px solid rgba(10, 15, 20, .25); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { font: 500 .74rem var(--mono); padding: 8px 14px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--paper); }
.sentence { font: 600 1.08rem/1.45 var(--sans); font-style: italic; margin: 18px 0 0; padding-top: 16px; border-top: 2px solid var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { border: 1px solid rgba(10, 15, 20, .12); border-radius: 14px; padding: 14px 16px; background: var(--paper); }
.tile small { display: block; font: 500 .64rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #566a78; }
.tile b { display: block; font: 600 1.7rem/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.tile span { font: 400 .74rem var(--mono); color: #566a78; }
.tile b.neg { color: #bf4a31; } .tile b.pos { color: #1f8a63; }
.chart { width: 100%; height: 260px; border-radius: 14px; background: var(--paper); border: 1px solid rgba(10, 15, 20, .1); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 .72rem var(--mono); color: #33424d; margin: 12px 0 0; }
.legend i { display: inline-block; width: 18px; height: 6px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.replay-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; align-items: center; }
.replay-title { font: 500 .78rem var(--mono); color: #33424d; margin-left: auto; }

/* ---------- bounds + table ---------- */
.bounds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 960px) { .bounds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .bounds { grid-template-columns: 1fr; } }
.bounds .card h3 { margin: 12px 0 10px; font-size: 1.25rem; }
.bounds .card p { color: var(--slate2); font-size: .94rem; margin: 0; }
.bounds .no { font: 600 .66rem var(--mono); letter-spacing: .16em; color: var(--loss); text-transform: uppercase; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font: 500 .66rem var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 12px 14px; border-bottom: 2px solid var(--ink); color: #33424d; }
.tbl td { padding: 14px; border-bottom: 1px solid rgba(10, 15, 20, .12); vertical-align: top; }
.tbl td:first-child { font-weight: 700; white-space: nowrap; }
.tag-chain, .tag-wit { display: inline-block; font: 600 .64rem var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; }
.tag-chain { background: rgba(31, 138, 99, .14); color: #1a6d4f; }
.tag-wit { background: rgba(233, 185, 58, .25); color: #7a5a00; }
.scroll-x { overflow-x: auto; }

/* ---------- strip / status / footer ---------- */
.status { border: 1px dashed var(--hair); border-radius: var(--r); padding: 22px 26px; color: var(--fog); font-size: .96rem; }
.status b { color: var(--beak); font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; margin-right: 8px; }
.foot { border-top: 1px solid var(--hair2); padding: 44px 0 56px; color: var(--slate2); font-size: .88rem; background: var(--abyss); }
.foot .row { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: center; }
.foot a { text-decoration: none; margin-right: 22px; font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.foot a:hover { color: var(--beak); }
.foot small { display: block; margin-top: 22px; color: var(--slate); font-size: .74rem; max-width: 80ch; }

/* token page */
.page-top { padding: clamp(120px, 16vh, 170px) 0 40px; background: radial-gradient(120% 90% at 70% 0%, #14293a 0%, var(--abyss) 70%); }
.ca { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border: 1px solid var(--hair); border-radius: 999px; font: 500 .84rem var(--mono); margin: 22px 0; word-break: break-all; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.two h3 { margin-bottom: 12px; }
.two ul { margin: 0; padding-left: 1.1em; color: var(--slate2); }
.two li { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn::after { animation: none !important; }
}
