:root {
  --paper: #fff4e0;
  --paper-2: #ffe8bf;
  --ink: #17120e;
  --ink-soft: #5a4d42;
  --white: #fffdf8;
  --tomato: #ff5436;
  --mint: #19c784;
  --sun: #ffc933;
  --sky: #8fd3ff;
  --line: 2.5px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --radius: 20px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--sun); }
[hidden] { display: none !important; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-soft); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: var(--line); border-radius: 999px;
  background: var(--white); color: var(--ink);
  font: 700 16px/1 var(--display); text-decoration: none; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .12s, box-shadow .12s, background .12s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled, .btn.soon { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--tomato); color: var(--white); }
.btn-dark { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--tomato); }
.btn-dark:hover { box-shadow: 5px 5px 0 var(--tomato); }
.btn-mint { background: var(--mint); }
.btn-lg { padding: 16px 28px; font-size: 18px; }
.btn-sm { padding: 8px 14px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: var(--line); border-radius: 999px;
  background: var(--white); font-size: 14px; font-weight: 600;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(25, 199, 132, .25); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }

.card { background: var(--white); border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 244, 224, .92); backdrop-filter: blur(8px); border-bottom: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 24px; letter-spacing: -.03em; }
.brand img { width: 40px; height: 40px; }
.brand .tick { font: 700 12px var(--mono); padding: 3px 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--sun); letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:not(.btn):hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: .95; letter-spacing: -.045em; margin: 22px 0 20px; font-weight: 800; }
.hero h1 .hl { background: var(--sun); padding: 0 .12em; border: var(--line); border-radius: 14px; display: inline-block; transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--ink); }
.hero p.lead { font-size: 20px; max-width: 540px; margin: 0 0 28px; color: var(--ink-soft); }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.hero-facts > span { font: 600 13px var(--mono); padding: 6px 12px; border: 2px dashed var(--ink); border-radius: 999px; }

.demo { padding: 18px; position: relative; }
.demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 700; }
.demo-head .mono { font-size: 12px; background: var(--paper-2); border: 2px solid var(--ink); padding: 3px 9px; border-radius: 999px; }
.sticker {
  position: absolute; top: -18px; right: -14px; z-index: 5;
  background: var(--mint); border: var(--line); border-radius: 999px; padding: 8px 14px;
  font-weight: 800; font-size: 14px; transform: rotate(6deg); box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- marquee ---------- */
.marquee { border-block: var(--line); background: var(--ink); color: var(--paper); overflow: hidden; padding: 14px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: scroll 28s linear infinite; font: 700 20px var(--mono); }
.marquee-track span { display: inline-flex; gap: 40px; }
.marquee-track i { font-style: normal; color: var(--sun); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { padding: 90px 0; }
.eyebrow { font: 700 13px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--tomato); }
h2 { font-size: clamp(36px, 4.6vw, 60px); line-height: 1; letter-spacing: -.04em; margin: 10px 0 18px; font-weight: 800; }
.section-lead { font-size: 19px; color: var(--ink-soft); max-width: 620px; margin: 0 0 44px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { padding: 26px 22px; position: relative; }
.step .num { width: 46px; height: 46px; display: grid; place-items: center; border: var(--line); border-radius: 50%; font: 800 20px var(--mono); background: var(--sun); margin-bottom: 18px; }
.step:nth-child(2) .num { background: var(--tomato); color: var(--white); }
.step:nth-child(3) .num { background: var(--sky); }
.step:nth-child(4) .num { background: var(--mint); }
.step h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.alt { background: var(--paper-2); border-block: var(--line); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.tiers { display: grid; gap: 18px; }
.tier { padding: 24px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tier h3 { margin: 0 0 4px; font-size: 22px; }
.tier p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.tier .rate { font: 800 42px var(--mono); letter-spacing: -.04em; white-space: nowrap; }
.tier.gold { background: var(--sun); }
.tier.gold p { color: var(--ink); }

.ca { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 12px 12px 12px 18px; background: var(--white); border: var(--line); border-radius: 999px; max-width: 100%; }
.ca code { font: 600 14px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.badge { padding: 22px; text-align: center; }
.badge .k { font: 700 13px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.badge .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }

.sponsor-band { background: var(--tomato); color: var(--white); border-block: var(--line); }
.sponsor-band h2 { color: var(--white); }
.sponsor-band .section-lead { color: #ffe6df; }
.sponsor-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 10px; }
.sponsor-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.sponsor-list li::before { content: "✦"; color: var(--sun); font-size: 18px; line-height: 1.4; }
.sponsor-band .btn { background: var(--white); color: var(--ink); }

.faq { max-width: 820px; }
.faq details { background: var(--white); border: var(--line); border-radius: 16px; margin-bottom: 14px; box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 800 22px var(--mono); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--ink-soft); }

.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(40px, 6vw, 76px); }

/* ---------- footer ---------- */
footer { background: var(--ink); color: var(--paper); padding: 56px 0 40px; }
footer .top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
footer .brand { color: var(--paper); }
footer .links { display: flex; gap: 22px; flex-wrap: wrap; }
footer .links a { text-decoration: none; font-weight: 600; opacity: .85; }
footer .links a:hover { opacity: 1; text-decoration: underline; }
footer .fine { font-size: 13px; line-height: 1.6; opacity: .6; max-width: 900px; border-top: 1px solid rgba(255, 244, 224, .2); padding-top: 22px; }

/* ---------- the arena (the game) ---------- */
.arena {
  position: relative; width: 100%; aspect-ratio: 1; border: var(--line); border-radius: 18px; overflow: hidden;
  background:
    linear-gradient(rgba(23, 18, 14, .07) 1px, transparent 1px) 0 0 / 10% 10%,
    linear-gradient(90deg, rgba(23, 18, 14, .07) 1px, transparent 1px) 0 0 / 10% 10%,
    var(--paper);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  cursor: grab;
}
.arena.holding { cursor: grabbing; }
.arena-mark {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12%;
  font-weight: 800; font-size: clamp(22px, 6.5cqw, 44px); line-height: 1; letter-spacing: -.04em;
  color: var(--ink); opacity: .09; transform: rotate(-8deg); pointer-events: none;
}
.arena { container-type: inline-size; }
.arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.orb {
  position: absolute; left: 0; top: 0; width: 20%; aspect-ratio: 1; margin: -10% 0 0 -10%;
  border-radius: 50%; background: var(--orb, var(--tomato)); border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink), inset 0 0 0 5px rgba(255, 255, 255, .25);
  display: grid; place-items: center; will-change: transform; pointer-events: none;
  transition: box-shadow .15s, scale .15s;
}
.orb-label { font: 800 clamp(11px, 3.6cqw, 20px) var(--mono); color: var(--orb-ink, var(--white)); letter-spacing: -.03em; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.orb-ring { position: absolute; inset: -22%; max-width: none; width: 144%; height: 144%; transform: rotate(-90deg); overflow: visible; }
.orb-ring circle { fill: none; stroke-width: 7; }
.orb-ring .bg { stroke: rgba(23, 18, 14, .12); }
.orb-ring .fg { stroke: var(--ink); stroke-linecap: round; transition: stroke-dashoffset .08s linear; }
.orb.on { box-shadow: 1px 1px 0 var(--ink), 0 0 0 10px rgba(25, 199, 132, .3); scale: .95; }
.orb.slip { animation: shake .3s; }
.orb.idle::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--ink);
  animation: ripple 1.6s ease-out infinite;
}
@keyframes ripple { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
@keyframes shake { 25% { translate: -5px 0; } 50% { translate: 5px 0; } 75% { translate: -3px 0; } }

.hud { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; pointer-events: none; }
.hud span { font: 700 14px var(--mono); background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 11px; }
.arena-msg {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0; white-space: nowrap; pointer-events: none;
  font-weight: 700; font-size: 15px; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 8px 16px;
}
.arena-msg.bad { background: var(--tomato); color: var(--white); }

.arena-over {
  position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; text-align: center; padding: 24px;
  background: rgba(255, 244, 224, .82); backdrop-filter: blur(3px); cursor: default;
}
.arena-over .big { font: 800 clamp(44px, 16cqw, 84px) var(--mono); letter-spacing: -.05em; line-height: 1; color: var(--mint); -webkit-text-stroke: 2px var(--ink); }
.arena-over h3 { margin: 10px 0 6px; font-size: clamp(20px, 5.5cqw, 28px); letter-spacing: -.02em; }
.arena-over p { margin: 0 0 18px; color: var(--ink-soft); }
.arena-over .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.confetti { position: absolute; left: 50%; top: 50%; width: 10px; height: 14px; border: 1.5px solid var(--ink); pointer-events: none; z-index: 5; animation: pop 1.1s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes pop {
  from { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)); opacity: 0; }
}

/* ---------- play page ---------- */
.play { padding: 36px 0 80px; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.play-main { padding: 18px; }
.play-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.play-bar .who { font: 600 14px var(--mono); display: flex; align-items: center; gap: 8px; }
.play-bar .who .dot { animation: none; }
.side { display: grid; gap: 20px; }
.panel { padding: 20px; }
.panel h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: center; }
.balance { font: 800 52px var(--mono); letter-spacing: -.05em; line-height: 1; }
.bar { height: 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; margin: 14px 0 8px; }
.bar i { display: block; height: 100%; width: 0; background: var(--mint); border-right: 2px solid var(--ink); transition: width .5s; }
.small { font-size: 14px; color: var(--ink-soft); }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini { border: 2px solid var(--ink); border-radius: 14px; padding: 10px; text-align: center; background: var(--paper); }
.mini b { display: block; font: 800 22px var(--mono); letter-spacing: -.03em; }
.mini span { font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.rate-chip { font: 700 12px var(--mono); padding: 3px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-2); }
.rate-chip.gold { background: var(--sun); }

.stocks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.stocks button { font: 700 14px var(--mono); padding: 7px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); cursor: pointer; }
.stocks button.on { background: var(--ink); color: var(--paper); }
.claim-btn { width: 100%; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.history li { display: flex; justify-content: space-between; gap: 10px; font: 600 13px var(--mono); padding: 9px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); }
.history li span:last-child { color: var(--ink-soft); }

.connect { max-width: 560px; margin: 30px auto; padding: 34px; text-align: center; }
.connect img { width: 84px; margin: 0 auto 14px; }
.connect h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -.04em; line-height: 1; margin: 0 0 10px; }
.connect p { color: var(--ink-soft); margin: 0 0 24px; }
.wallet-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(23, 18, 14, .55); }
.wallet-box { width: min(420px, 100%); max-height: min(640px, 100%); display: flex; flex-direction: column; padding: 22px; }
.wallet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wallet-head h2 { font-size: 26px; letter-spacing: -.03em; line-height: 1; margin: 0; }
.wallet-list { list-style: none; margin: 0; padding: 2px; overflow-y: auto; display: grid; gap: 8px; }
.wallet-list button {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 2px solid var(--ink); border-radius: 14px;
  background: var(--white); color: var(--ink); font: 700 16px var(--display); text-align: left; cursor: pointer;
}
.wallet-list button:hover { background: var(--paper-2); }
.wallet-list img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.wallet-list .tag { margin-left: auto; font: 700 11px var(--mono); text-transform: uppercase; padding: 3px 9px; border: 2px solid var(--ink); border-radius: 999px; }
.wallet-list .tag.on { background: var(--mint); }
.wallet-note { font-size: 13px; color: var(--ink-soft); text-align: center; margin: 14px 0 0; }
.err { color: var(--tomato); font-weight: 700; font-size: 14px; min-height: 20px; margin: 10px 0 0; }
.err a { color: inherit; text-decoration: underline; }

.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 20px; opacity: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px; font-weight: 700;
  transition: opacity .2s, translate .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; translate: -50% 0; }

/* ---------- 404 ---------- */
.lost { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 40px 16px; }
.lost h1 { font-size: clamp(60px, 14vw, 140px); margin: 0; letter-spacing: -.06em; line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .split, .play-grid { grid-template-columns: 1fr; }
  .hero .wrap { gap: 44px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .play-main { order: -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .nav .btn { padding: 10px 16px; font-size: 14px; }
  .brand { font-size: 21px; }
  .brand img { width: 34px; height: 34px; }
  .hero { padding-top: 40px; }
  .hero p.lead { font-size: 18px; }
  section { padding: 64px 0; }
  .steps, .badges { grid-template-columns: 1fr; }
  .tier .rate { font-size: 34px; }
  .sticker { right: 6px; }
  .demo-head .mono { display: none; }
  .play-main, .demo { padding: 12px; }
  .connect { padding: 26px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .dot, .orb.idle::after { animation: none; }
}

a.soon:not(.btn) { opacity: .5; cursor: default; }
a.soon:not(.btn)::after { content: " · soon"; font-size: .85em; }
