:root {
  --bg: #0e1210;
  --bg-2: #181c19;
  --bg-3: #222824;
  --text: #f5f7f5;
  --muted: #a0a8a3;
  --dim: #5a605c;
  --border: #2a302c;
  --green: #6fb86b;
  --green-deep: #4c9a51;
  --green-glow: rgba(111, 184, 107, 0.4);
  --lime: #a5d693;
  --amber: #e8b84c;
  --danger: #e8534e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 1400px 700px at 50% -15%, rgba(111, 184, 107, 0.14), transparent 60%),
    radial-gradient(ellipse 800px 400px at 100% 80%, rgba(76, 154, 81, 0.08), transparent 60%),
    linear-gradient(rgba(111, 184, 107, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 184, 107, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 56px 56px, 56px 56px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Nav ────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.75rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 1rem;
  flex-wrap: wrap;
}
.nav-left {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav-brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-menu {
  display: flex;
  gap: 1.25rem;
}
.nav-menu a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--green); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  font-family: inherit;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--green) 0%, #2f7033 100%);
  color: var(--bg);
  box-shadow: 0 6px 22px var(--green-glow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(111, 184, 107, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(111, 184, 107, 0.4);
  padding: 0.85rem 1.55rem;
}
.btn-ghost:hover {
  background: rgba(111, 184, 107, 0.1);
  border-color: rgba(111, 184, 107, 0.75);
  color: var(--green);
}
.btn-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── Glass card ─────────────────────────────────────────────────────── */
.glass {
  background: linear-gradient(135deg, rgba(24, 28, 25, 0.78), rgba(14, 18, 16, 0.68));
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid rgba(111, 184, 107, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(245, 247, 245, 0.06);
  border-radius: 16px;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 6rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
}
.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  mask-image: radial-gradient(ellipse at center, #000 55%, rgba(0,0,0,0.25) 85%, transparent);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 55%, rgba(0,0,0,0.25) 85%, transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.hero h1 {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  margin: 0;
  line-height: 1.02;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 620px;
  margin: 0;
}
.hero p .emph { color: var(--text); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 255, 133, 0.08);
  border: 1px solid rgba(111, 184, 107, 0.35);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--green);
  font-weight: 600;
  text-transform: uppercase;
}
.pill .dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--green);
  animation: blink 1.6s ease-in-out infinite;
}

.ctas {
  display: flex;
  gap: 0.85rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.supported {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
.supported span.sep { color: var(--dim); }

/* ── Sections ───────────────────────────────────────────────────────── */
section.block {
  padding: 2rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
.eyebrow {
  color: var(--green);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0.5rem 0 2rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.step {
  padding: 1.5rem;
  height: 100%;
}
.step-num {
  width: 40px;
  height: 40px;
  background: var(--green);
  color: #000;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 6px 18px rgba(111, 184, 107, 0.2);
}
.step h3 {
  margin: 1rem 0 0.5rem;
  color: var(--text);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.step p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  font-size: 0.92rem;
}

/* ── Tier cards ─────────────────────────────────────────────────────── */
.tier {
  padding: 1px;
  border-radius: 14px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.tier:hover { transform: translateY(-4px); }
.tier.bronze { background: linear-gradient(135deg, rgba(205, 127, 50, 0.45), transparent 60%); }
.tier.silver { background: linear-gradient(135deg, rgba(229, 229, 229, 0.45), transparent 60%); }
.tier.platinum { background: linear-gradient(135deg, rgba(127, 255, 212, 0.45), transparent 60%); }
.tier.gold { background: linear-gradient(135deg, rgba(255, 215, 0, 0.45), transparent 60%); }

.tier-inner {
  background: var(--bg-2);
  border-radius: 13px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}
.tier-label {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-weight: 600;
}
.tier-name {
  font-size: 1.35rem;
  margin-top: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.tier.bronze .tier-name { color: #cd7f32; }
.tier.silver .tier-name { color: #e5e5e5; }
.tier.platinum .tier-name { color: #7fffd4; }
.tier.gold .tier-name { color: #ffd700; }
.tier-stake {
  font-size: 2.2rem;
  color: var(--text);
  font-weight: 800;
  margin-top: 0.5rem;
  line-height: 1;
}
.tier-stake .unit {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 8px;
}
.tier-foot {
  margin-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.tier-foot .cta-lbl { font-weight: 700; }
.tier.bronze .tier-foot .cta-lbl { color: #cd7f32; }
.tier.silver .tier-foot .cta-lbl { color: #e5e5e5; }
.tier.platinum .tier-foot .cta-lbl { color: #7fffd4; }
.tier.gold .tier-foot .cta-lbl { color: #ffd700; }

.tier-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  opacity: 0.12;
  border-radius: 50%;
  filter: blur(18px);
}
.tier.bronze .tier-glow { background: linear-gradient(135deg, #cd7f32, #8b5a2b); }
.tier.silver .tier-glow { background: linear-gradient(135deg, #f5f5f5, #a8a8a8); }
.tier.platinum .tier-glow { background: linear-gradient(135deg, #7fffd4, #00b3a4); }
.tier.gold .tier-glow { background: linear-gradient(135deg, #ffd700, #b8860b); }

/* ── Stats band ─────────────────────────────────────────────────────── */
.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding: 1.5rem;
  gap: 0;
}
.stat-cell {
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-label {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  font-weight: 600;
}
.stat-value {
  color: var(--text);
  font-size: 1.6rem;
  font-weight: 800;
  margin-top: 0.35rem;
  font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
}

/* ── Waitlist ───────────────────────────────────────────────────────── */
.waitlist {
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.waitlist::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(111, 184, 107, 0.25), transparent 60%);
  pointer-events: none;
}
.waitlist-inner { position: relative; z-index: 1; }
.waitlist h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0;
  background: linear-gradient(180deg, #fff 0%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.waitlist p { color: var(--muted); margin: 0.75rem 0 1.5rem; }
.waitlist form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}
.waitlist input[type=email] {
  flex: 1 1 240px;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
}
.waitlist input[type=email]:focus { border-color: var(--green); }

/* ── Footer ─────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem 2.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3rem;
}
.foot-row {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}
.foot-brand {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.foot-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.foot-brand strong {
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
}
.foot-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.foot-nav a {
  color: var(--muted);
  transition: color 0.2s;
}
.foot-nav a:hover { color: var(--green); }
.foot-note {
  max-width: 1200px;
  margin: 1rem auto 0;
  color: var(--dim);
  font-size: 0.72rem;
  text-align: center;
}

/* ── Legal pages ────────────────────────────────────────────────────── */
.page {
  padding: 3rem 2rem;
  max-width: 760px;
  margin: 0 auto;
  color: var(--text);
}
.page .eyebrow.warn { color: var(--amber); }
.page h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0.3rem 0 1.5rem;
  letter-spacing: -0.02em;
}
.page section { margin: 2rem 0; }
.page h2 {
  color: var(--green);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.page p, .page li { color: var(--muted); line-height: 1.7; }
.page li strong { color: var(--text); }
.page ol, .page ul { padding-left: 1.25rem; }

.callout {
  padding: 1.25rem;
  margin-top: 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ── Animations ─────────────────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .hero canvas { display: none; }
  .fade-up, .pill .dot { animation: none !important; }
  .tier { transition: none !important; }
}

/* ── Wallet connect ──────────────────────────────────────────────────── */
#wallet-connect-btn.connected {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  color: var(--green);
  border: 1px solid rgba(111, 184, 107, 0.5);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  box-shadow: none;
}
#wallet-connect-btn.connected:hover {
  background: rgba(232, 83, 78, 0.12);
  border-color: var(--danger);
  color: var(--danger);
}

#wallet-status {
  display: none;
  padding: 0.55rem 1rem;
  font-size: 0.78rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: rgba(111, 184, 107, 0.08);
  color: var(--green);
}
#wallet-status.warn { background: rgba(232, 184, 76, 0.1); color: var(--amber); }
#wallet-status.error { background: rgba(232, 83, 78, 0.1); color: var(--danger); }
#wallet-status.success { background: rgba(111, 184, 107, 0.12); color: var(--green); }
#wallet-status.info { color: var(--muted); }

#wallet-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}
#wallet-modal[data-open="true"] { display: flex; }

.wallet-modal-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, rgba(24, 28, 25, 0.98), rgba(14, 18, 16, 0.96));
  border: 1px solid rgba(111, 184, 107, 0.22);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: fade-up 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.wallet-modal-card h2 {
  margin: 0;
  font-size: 1.35rem;
  background: linear-gradient(180deg, #fff, var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wallet-modal-card .sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.4rem 0 1.25rem;
  line-height: 1.55;
}
.wallet-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
}
.wallet-modal-close:hover {
  color: var(--text);
  border-color: var(--muted);
}

#wallet-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.wallet-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(34, 40, 36, 0.55);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.15s;
  text-align: left;
}
.wallet-option:hover {
  background: rgba(111, 184, 107, 0.08);
  border-color: rgba(111, 184, 107, 0.5);
  transform: translateY(-1px);
}
.wallet-option .wallet-icon {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wallet-option .wallet-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.wallet-option .wallet-name {
  font-weight: 700;
}
.wallet-option .wallet-hint {
  color: var(--muted);
  font-size: 0.72rem;
}
.wallet-option .wallet-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.wallet-option .wallet-badge.detected {
  background: rgba(111, 184, 107, 0.18);
  color: var(--green);
}
.wallet-option .wallet-badge.install {
  background: rgba(160, 168, 163, 0.15);
  color: var(--muted);
}

.wallet-modal-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.55;
}

/* ── Live-status banner ──────────────────────────────────────────── */
.live-banner {
  margin: 1rem auto 0;
  max-width: 520px;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.82rem;
  text-align: center;
  background: rgba(111, 184, 107, 0.08);
  border: 1px solid rgba(111, 184, 107, 0.25);
  color: var(--text);
  line-height: 1.5;
}
.live-banner.ok {
  background: rgba(111, 184, 107, 0.12);
  border-color: rgba(111, 184, 107, 0.4);
}
.live-banner.ok .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6FB86B;
  margin-right: 0.45rem;
  animation: livepulse 1.8s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111,184,107,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(111,184,107,0); }
}
.live-banner.warn {
  background: rgba(232, 184, 76, 0.08);
  border-color: rgba(232, 184, 76, 0.35);
  color: #e8b84c;
}

/* ── Compete / match shared panels ───────────────────────────────── */
.compete-shell {
  max-width: 920px;
  margin: 5.5rem auto 3rem;
  padding: 0 1.25rem;
  color: var(--text);
}
.compete-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}
.compete-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.compete-card p.sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 1rem;
}
.compete-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}
.compete-step .badge-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(111,184,107,0.12);
  border: 1px solid rgba(111,184,107,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #6FB86B;
}
.compete-step.done .badge-num {
  background: rgba(111,184,107,0.3);
  color: #fff;
}
.compete-step .label {
  font-size: 0.95rem;
}
.compete-step .hint {
  color: var(--dim);
  font-size: 0.75rem;
  margin-top: 0.1rem;
}
.compete-step .action .btn {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}
.compete-log {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  background: rgba(0,0,0,0.25);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--muted);
  max-height: 160px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.status-ok    { color: #6FB86B; }
.status-warn  { color: #e8b84c; }
.status-err   { color: #e46b6b; }
