:root {
  --lagoon: #07201f;
  --lagoon-2: #0c2f2d;
  --water: #1c6f6a;
  --water-2: #2a9d94;
  --gold: #d9b45a;
  --gold-2: #f3dc9a;
  --marble: #efe8da;
  --muted: #9db3ad;
  --line: rgba(217, 180, 90, .22);
  --serif: "Cormorant Garamond", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(42, 157, 148, .22), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(217, 180, 90, .10), transparent 60%),
    var(--lagoon);
  color: var(--marble);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  overflow-x: hidden;
}
.grain {
  position: fixed; inset: 0; pointer-events: none; opacity: .07; z-index: 10;
  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>");
}
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: .72em; word-break: break-all; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(7, 32, 31, .78); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--marble); font-size: 1.15em; letter-spacing: .04em; }
.brand:hover { text-decoration: none; }
.seal {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold) 55%, #8a6a24);
  color: #3a2a08; font-weight: 600; font-style: italic;
}
.nav nav { margin-left: auto; display: flex; gap: 22px; }
.nav nav a { color: var(--muted); font-size: .95em; }
@media (max-width: 720px) { .nav nav { display: none; } .nav .btn { margin-left: auto; } }

.btn {
  font-family: var(--serif); font-size: 1em; letter-spacing: .03em; cursor: pointer;
  padding: 10px 22px; border-radius: 2px; border: 1px solid var(--gold); transition: .2s;
  display: inline-block;
}
.btn:hover { text-decoration: none; }
.btn.gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2b1f05; font-weight: 600; }
.btn.gold:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--gold-2); }
.btn.ghost:hover { background: rgba(217, 180, 90, .1); }
.btn.big { font-size: 1.15em; padding: 14px 30px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--gold-2); font-family: var(--mono); font-size: .7em; cursor: pointer; }

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
section { padding: clamp(48px, 8vw, 96px) 0; }
h1 { font-weight: 500; font-size: clamp(2.6rem, 7.5vw, 5.6rem); line-height: 1; letter-spacing: -.01em; }
h1 em, .lede em { color: var(--gold-2); }
h2 { font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 28px; }
h3 { font-weight: 600; font-size: 1.35em; margin-bottom: 10px; }
.eyebrow { font-family: var(--mono); font-size: .68em; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; }
.hero { padding-top: clamp(64px, 11vw, 140px); }
.lede { max-width: 680px; margin: 28px 0 34px; color: #d6d0c2; font-size: 1.12em; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.status { margin-top: 34px; font-family: var(--mono); font-size: .68em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.live .dot { background: #5fe0a5; box-shadow: 0 0 10px #5fe0a5; }
.status.pre .dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.status.err .dot { background: #e0705f; }

.panel {
  border: 1px solid var(--line); border-radius: 3px; padding: 26px;
  background: linear-gradient(180deg, rgba(12, 47, 45, .85), rgba(7, 32, 31, .85));
}
.genesis { padding: 32px; margin-bottom: 24px; border-color: var(--gold); }
.genesis p { max-width: 720px; color: #d6d0c2; }
.kv { display: grid; gap: 10px; margin: 22px 0; }
.kv > div { display: flex; gap: 16px; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 8px; flex-wrap: wrap; }
.kv dt { color: var(--muted); }
.fine { font-size: .78em; color: var(--muted); margin-top: 12px; }
.center { text-align: center; }

.tide { display: grid; grid-template-columns: 120px 1fr; gap: 36px; align-items: stretch; }
.gauge {
  position: relative; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; min-height: 300px;
  background: repeating-linear-gradient(180deg, transparent 0 29px, rgba(217, 180, 90, .18) 29px 30px);
}
.water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  background: linear-gradient(180deg, var(--water-2), var(--water) 40%, #0e3f3c);
  transition: height 1.6s cubic-bezier(.2, .8, .2, 1);
}
.water svg { position: absolute; top: -18px; left: 0; width: 200%; height: 20px; fill: var(--water-2); animation: wave 7s linear infinite; }
@keyframes wave { to { transform: translateX(-50%); } }
.gauge-label { position: absolute; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: .6em; color: var(--muted); letter-spacing: .1em; }
.gauge-label.top { top: 8px; text-transform: uppercase; }
.gauge-label.mid { top: 28px; color: var(--marble); font-size: .62em; padding: 0 6px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--lagoon); padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.stat .k { font-family: var(--mono); font-size: .62em; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.stat .v { font-size: 2em; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .u { font-size: .74em; color: var(--muted); }
@media (max-width: 820px) { .tide { grid-template-columns: 1fr; } .gauge { min-height: 120px; } .stats { grid-template-columns: repeat(2, 1fr); } }

.cards, .desks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards, .desks { grid-template-columns: 1fr; } }
.cards article { border-top: 1px solid var(--gold); padding-top: 18px; }
.cards .num { font-style: italic; color: var(--gold); font-size: 1.5em; }
.cards p { color: #cfc9bb; font-size: .95em; }

label { display: flex; justify-content: space-between; font-size: .8em; color: var(--muted); margin-bottom: 6px; }
.bal { font-family: var(--mono); font-size: .8em; }
.field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); padding: 10px 12px; background: rgba(0, 0, 0, .25); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--marble); font-family: var(--mono); font-size: 1em; }
.field span { font-family: var(--mono); font-size: .7em; color: var(--gold); }
.quote { font-family: var(--mono); font-size: .68em; color: var(--muted); margin: 10px 0 14px; min-height: 1.4em; }
.desks .btn { width: 100%; }
.ring { font-size: 3em; color: var(--gold); text-align: center; line-height: 1.26; text-shadow: 0 0 24px rgba(217, 180, 90, .5); }

footer { text-align: center; padding: 40px 16px 60px; font-style: italic; color: var(--muted); border-top: 1px solid var(--line); }

/* ───────── motion layer ───────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--lagoon); }
.bg video { position: absolute; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
#film { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.6s ease; transform: scale(1.06); will-change: transform; filter: brightness(1.45) saturate(1.25) contrast(1.05); }
#film.ready { opacity: 1; }
#film.seam { opacity: .12; transition-duration: .6s; }
.bg-shade { position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7,32,31,.35) 0%, rgba(7,32,31,.05) 30%, rgba(7,32,31,.55) 80%, rgba(7,32,31,.9) 100%),
    radial-gradient(800px 480px at 12% 45%, rgba(7,32,31,.6), transparent 70%); }
#motes { position: absolute; inset: 0; width: 100%; height: 100%; }
body { background: var(--lagoon); }
body.scrolled #film.ready { opacity: .3; }

.ticker { overflow: hidden; border-bottom: 1px solid var(--line); background: rgba(7,32,31,.6); backdrop-filter: blur(6px); }
.ticker-track { display: inline-flex; gap: 48px; white-space: nowrap; padding: 8px 0; font-family: var(--mono); font-size: .62em; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); animation: marquee 38s linear infinite; }
.ticker-track span i { color: var(--marble); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

.hero { min-height: calc(100vh - 110px); display: flex; flex-direction: column; justify-content: center; position: relative; }
.hero > * { opacity: 0; transform: translateY(22px); animation: rise 1s cubic-bezier(.2,.8,.2,1) forwards; }
.hero > *:nth-child(2) { animation-delay: .1s } .hero > *:nth-child(3) { animation-delay: .22s }
.hero > *:nth-child(4) { animation-delay: .36s } .hero > *:nth-child(5) { animation-delay: .5s }
.hero > *:nth-child(6) { animation-delay: .7s } .hero > *:nth-child(7) { animation-delay: .8s }
@keyframes rise { to { opacity: 1; transform: none; } }
h1 { text-shadow: 0 2px 40px rgba(0,0,0,.55); }
h1 em { background: linear-gradient(100deg, var(--gold) 0%, #fff3c9 45%, var(--gold) 60%, #a97f2c 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 5s ease-in-out infinite; }
@keyframes sheen { 0%,100% { background-position: 100% 0 } 50% { background-position: 0 0 } }


.scroll-cue { position: absolute; bottom: 18px; left: 50%; width: 22px; height: 36px; margin-left: -11px; border: 1px solid var(--line); border-radius: 12px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0) } 40% { opacity: 1 } 100% { opacity: 0; transform: translateY(14px) } }
@media (max-width: 720px) { .scroll-cue { display: none; } }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.in .cards article, .reveal.in .desks .panel, .reveal.in .stat { animation: rise .8s cubic-bezier(.2,.8,.2,1) backwards; }
.reveal.in .cards article:nth-child(2), .reveal.in .desks .panel:nth-child(2), .reveal.in .stat:nth-child(2) { animation-delay: .12s }
.reveal.in .cards article:nth-child(3), .reveal.in .desks .panel:nth-child(3), .reveal.in .stat:nth-child(3) { animation-delay: .24s }
.reveal.in .stat:nth-child(4) { animation-delay: .3s } .reveal.in .stat:nth-child(5) { animation-delay: .36s } .reveal.in .stat:nth-child(6) { animation-delay: .42s }

.panel, .stat, .cards article { transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease, background .35s ease; }
.panel { backdrop-filter: blur(8px); }
.desks .panel:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 18px 50px -20px rgba(217,180,90,.35); }
.cards article:hover { transform: translateY(-4px); }
.cards article:hover .num { text-shadow: 0 0 18px rgba(217,180,90,.8); }
.stat { background: rgba(7,32,31,.82); backdrop-filter: blur(8px); }
.stat:hover { background: rgba(12,47,45,.95); }
.stat .v.tick { animation: tick .9s ease; }
@keyframes tick { 0% { color: var(--gold-2); text-shadow: 0 0 22px rgba(243,220,154,.8) } 100% { color: inherit; text-shadow: none } }

.btn.gold { position: relative; overflow: hidden; }
.btn.gold::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: glint 4.5s ease-in-out infinite; }
@keyframes glint { 0%, 70% { left: -60% } 100% { left: 130% } }
.genesis { animation: pulseBorder 2.6s ease-in-out infinite; }
@keyframes pulseBorder { 0%,100% { box-shadow: 0 0 0 0 rgba(217,180,90,0) } 50% { box-shadow: 0 0 60px -8px rgba(217,180,90,.45) } }
.ring { animation: ringFloat 4s ease-in-out infinite; }
@keyframes ringFloat { 0%,100% { transform: translateY(0) rotate(0) } 50% { transform: translateY(-6px) rotate(8deg) } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero > *, .reveal { opacity: 1; transform: none; }
}

.brand .mark { display: block; filter: drop-shadow(0 0 10px rgba(217,180,90,.35)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.brand:hover .mark { transform: rotate(-8deg) scale(1.06); }

.ca { margin-top: 34px; display: inline-flex; align-items: center; gap: 14px; max-width: 100%; padding: 12px 16px; border: 1px solid var(--line); background: rgba(7,32,31,.6); backdrop-filter: blur(8px); align-self: flex-start; }
.ca.live { border-color: var(--gold); }
.ca-label { font-family: var(--mono); font-size: .62em; letter-spacing: .25em; color: var(--gold); }
.ca code { font-family: var(--mono); font-size: .72em; color: var(--marble); word-break: break-all; }
.fine.big { font-size: .95em; color: #cfc9bb; margin: 0 0 18px; }
.links a { margin: 0 12px; font-family: var(--mono); letter-spacing: .15em; text-transform: uppercase; }
#token h2 { margin-bottom: 28px; }

[hidden] { display: none !important; }

/* ───────── product ───────── */
.sub { max-width: 820px; color: #cfc9bb; margin: -12px 0 30px; }
.mt { margin-top: 48px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); background: rgba(7,32,31,.82); backdrop-filter: blur(8px); }
table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .66em; min-width: 880px; }
#eloTable { min-width: 560px; }
th, td { padding: 13px 12px; text-align: right; border-bottom: 1px solid rgba(217,180,90,.12); white-space: nowrap; }
th { color: var(--gold); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .86em; }
th.l, td.l { text-align: left; }
td.model { font-family: var(--serif); font-size: 1.5em; color: var(--marble); }
td.model small { display: block; font-family: var(--mono); font-size: .5em; color: var(--muted); letter-spacing: .08em; }
td.fine-v { color: var(--gold-2); font-size: 1.25em; }
td.up { color: #5fe0a5; } td.down { color: #e0705f; }
tr:hover td { background: rgba(217,180,90,.05); }
td.empty { text-align: center; color: var(--muted); padding: 44px 12px; font-family: var(--serif); font-size: 1.5em; font-style: italic; }
.bar { display: inline-block; width: 54px; height: 5px; background: rgba(239,232,218,.12); vertical-align: middle; margin-right: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.spark { vertical-align: middle; }
.alert { border: 1px solid #e0705f; background: rgba(224,112,95,.1); padding: 12px 16px; margin-bottom: 14px; font-size: .9em; }
.alert b { color: #ffb4a6; font-weight: 600; }
.arena textarea { width: 100%; resize: vertical; background: rgba(0,0,0,.28); border: 1px solid var(--line); color: var(--marble); font-family: var(--serif); font-size: 1.05em; padding: 14px; outline: 0; }
.arena textarea:focus { border-color: var(--gold); }
.arena-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.arena-bar .fine { margin: 0; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
@media (max-width: 820px) { .duel { grid-template-columns: 1fr; } }
.duel article { border: 1px solid var(--line); background: rgba(0,0,0,.22); display: flex; flex-direction: column; max-height: 460px; }
.duel header { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2b1f05; font-weight: 600; font-size: .8em; }
.who { font-family: var(--mono); font-size: .62em; letter-spacing: .1em; color: var(--muted); }
.who.revealed { color: var(--gold-2); }
.answer { padding: 16px; overflow-y: auto; white-space: pre-wrap; font-size: .92em; color: #ddd7c9; }
.votes { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.duel article.winner { border-color: var(--gold); box-shadow: 0 0 40px -12px rgba(217,180,90,.5); }
#token .stats { margin-bottom: 8px; }
