:root {
  --bg: #141414;
  --surface: #1c1c1c;
  --surface-2: #242424;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f7f7;
  --muted: #9a9a9a;
  --cream: #f0dcc8;
  --cream-ink: #2b2725;
  --green: #63d297;
  --radius-card: 24px;
  --font: "Instrument Sans", system-ui, sans-serif;
  --font-brand: "Comfortaa", var(--font);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
code { font-family: var(--font-mono); }

/* Nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 32px; padding: 14px 28px; transition: background .3s; }
.nav.scrolled { background: rgba(20,20,20,.72); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-brand); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.brand-icon { width: 34px; height: 34px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.nav-links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 500; font-size: 16px; cursor: pointer; border: 0; transition: transform .2s, box-shadow .2s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { height: 40px; padding: 0 20px; font-size: 15px; }
.btn-cream { background: var(--cream); color: var(--cream-ink); box-shadow: 0 8px 30px rgba(240,220,200,.18), inset 0 -2px 0 rgba(0,0,0,.08); }
.btn-ghost { background: linear-gradient(#3a3a3a, #262626); color: var(--text); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }

/* Hero */
.hero { position: relative; min-height: min(100vh, 960px); display: grid; place-items: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(20,20,20,.92), transparent 72%); z-index: 1; }
.tile { position: absolute; filter: drop-shadow(0 20px 34px rgba(0,0,0,.55)); animation: float 7s ease-in-out infinite alternate; }
.t1 { width: 210px; left: 6%; top: 18%; --r: -10deg; }
.t2 { width: 170px; right: 7%; top: 22%; --r: 9deg; animation-delay: -2s; }
.t3 { width: 190px; right: 14%; bottom: 10%; --r: -6deg; opacity: .7; filter: blur(2px); animation-delay: -4s; }
@keyframes float { from { transform: translateY(-10px) rotate(calc(var(--r) - 3deg)); } to { transform: translateY(14px) rotate(calc(var(--r) + 3deg)); } }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 130px 16px 80px; max-width: 900px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); border: 1px solid var(--line); background: rgba(255,255,255,.04); border-radius: 999px; padding: 7px 16px; margin-bottom: 26px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
h1 { font-size: clamp(46px, 7.4vw, 100px); font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.accent { color: var(--cream); }
.lead { margin: 26px auto 34px; max-width: 640px; font-size: 18px; line-height: 1.55; color: #bdbdbd; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.facts { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 20px; background: rgba(28,28,28,.7); backdrop-filter: blur(8px); }
.fact { padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact b { font-size: 28px; font-weight: 500; letter-spacing: -.02em; color: var(--cream); }
.fact span { font-size: 13px; color: var(--muted); }

/* Sections */
.section { max-width: 1200px; margin: 0 auto; padding: 110px 24px 20px; }
.kicker { font-family: var(--font-mono); font-size: 13px; color: var(--cream); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
h2 { font-size: clamp(34px, 4.4vw, 56px); font-weight: 500; letter-spacing: -.03em; line-height: 1.06; margin-bottom: 22px; }
h3 { font-size: 22px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 10px; }
.section-lead { color: #bdbdbd; font-size: 17px; line-height: 1.6; max-width: 620px; margin-bottom: 36px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; }
.card p { color: #b5b5b5; line-height: 1.6; }

/* Flywheel */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.loop-list { list-style: none; display: grid; gap: 10px; }
.loop-list li { display: flex; align-items: center; gap: 14px; font-size: 16px; color: #d5d5d5; }
.loop-list span { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); color: var(--cream); }
.wheel-wrap { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; margin: 0 auto; }
.wheel { width: 100%; height: 100%; }
.spin { transform-origin: 260px 260px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.w-core { fill: var(--muted); font-family: var(--font-mono); font-size: 14px; }
.wnode { position: absolute; transform: translate(-50%, -50%); background: linear-gradient(#262626, #1a1a1a); border: 1px solid var(--line-strong); border-radius: 16px; padding: 10px 16px; text-align: center; white-space: nowrap; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.wnode b { display: block; font-weight: 500; font-size: 15px; }
.wnode small { color: var(--muted); font-size: 12px; }
.hero-node { background: var(--cream) !important; color: var(--cream-ink); border: none !important; box-shadow: 0 10px 40px rgba(240,220,200,.22); }
.hero-node small { color: #6b5f56 !important; }
.n-top { left: 50%; top: 15.4%; }
.n-right { left: 84.6%; top: 50%; }
.n-bottom { left: 50%; top: 84.6%; }
.n-left { left: 15.4%; top: 50%; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.step-n { font-family: var(--font-mono); color: var(--cream); font-size: 14px; margin-bottom: 26px; }
.flow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.flow-node { display: inline-flex; flex-direction: column; padding: 14px 20px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 500; }
.flow-node small { color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.flow-arrow { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.flow-branch { display: grid; gap: 10px; }
.flow-row { display: flex; align-items: center; gap: 12px; }
.pct { font-family: var(--font-mono); width: 48px; text-align: right; color: var(--muted); }
.pct.hi { color: var(--cream); font-weight: 500; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.stat span { color: var(--muted); font-size: 14px; }
.stat b { font-size: 34px; font-weight: 500; letter-spacing: -.02em; }
.stake-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.stake-box p { max-width: 560px; }
.stake-box a { color: var(--cream); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.calc-inputs { display: grid; gap: 14px; }
.calc-inputs label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 0; font-size: 14px; color: #cfcfcf; }
.calc-inputs input { width: 100%; }
.calc-inputs label span { color: var(--muted); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; }
.calc-inputs input { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; }
.calc-inputs input:focus { border-color: var(--cream); }
.calc-out { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 8px 22px; display: flex; flex-direction: column; justify-content: center; }
.out-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0; }
.out-row + .out-row { border-top: 1px solid var(--line); }
.out-row span { color: var(--muted); font-size: 14px; }
.out-row b { font-weight: 500; font-size: 18px; text-align: right; }
.out-row b.big { font-size: 40px; color: var(--cream); letter-spacing: -.02em; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 12px; color: #b5b5b5; line-height: 1.6; }
.faq code { font-size: 12px; word-break: break-all; color: var(--cream); }
.faq a { color: var(--cream); }

/* CA band */
.ca-band { max-width: 1200px; margin: 100px auto 0; padding: 0 24px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.ca-sym { font-weight: 600; }
.ca-label { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--muted); }
.ca-band code { font-size: 14px; color: #d0d0d0; word-break: break-all; }
.ca-band button { background: var(--cream); color: var(--cream-ink); border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; font-weight: 500; }
.ca-band a { color: var(--muted); font-size: 14px; }

/* Footer */
.footer { max-width: 1200px; margin: 60px auto 0; padding: 40px 24px 0; border-top: 1px solid var(--line); overflow: hidden; }
.disclaimer { color: var(--muted); font-size: 13px; line-height: 1.6; max-width: 820px; }
.copy { color: var(--muted); font-size: 13px; margin-top: 14px; }
.copy a { color: var(--text); }
.wordmark { font-family: var(--font-brand); font-weight: 700; font-size: clamp(80px, 18vw, 240px); letter-spacing: -.05em; line-height: .8; color: var(--surface-2); text-align: center; margin-top: 40px; user-select: none; }

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .split, .calc { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tile { display: none; }
}
@media (max-width: 520px) {
  .nav { padding: 12px 16px; }
  .section { padding: 80px 16px 10px; }
  .wnode { padding: 7px 10px; border-radius: 12px; }
  .wnode b { font-size: 12px; }
  .wnode small { display: none; }
  .stat b { font-size: 26px; }
  .card { padding: 22px; }
  .flow { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .spin { animation: none; }
}

/* Staking app */
.stream-line { color: var(--muted); font-size: 14px; margin: -2px 0 16px; min-height: 20px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.app-head h3 { margin: 0; }
.paused-note { background: rgba(240,220,200,.08); border: 1px solid rgba(240,220,200,.25); color: var(--cream); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.balances { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 12px; margin-bottom: 22px; }
.balances > div { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.balances span { color: var(--muted); font-size: 13px; }
.balances b { font-weight: 500; font-size: 18px; word-break: break-word; }
.balances .earn { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; }
.balances .earn span { width: 100%; }
.balances .earn b { color: var(--cream); margin-right: auto; }
.tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 14px; }
.tab.on { background: var(--surface-2); color: var(--text); }
.amount { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 6px 8px 6px 18px; }
.amount:focus-within { border-color: var(--cream); }
.amount input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 22px; padding: 10px 0; }
.amount button { background: var(--bg); border: 1px solid var(--line); color: var(--cream); border-radius: 10px; padding: 6px 10px; font-size: 12px; font-family: var(--font-mono); cursor: pointer; }
.amount em { font-style: normal; color: var(--muted); font-size: 13px; font-family: var(--font-mono); padding-right: 8px; }
.amount-error { color: #ff8a80; font-size: 13px; min-height: 18px; margin: 6px 2px; }
.btn.wide { width: 100%; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.5; }
.pending { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 16px; padding: 14px 16px; font-size: 14px; }
.pending div { display: flex; gap: 8px; }
.tx-status { margin-top: 16px; font-size: 14px; color: #cfcfcf; min-height: 20px; word-break: break-word; }
.tx-status.error { color: #ff8a80; }
.tx-status a { color: var(--cream); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) {
  .balances { grid-template-columns: 1fr; }
}
