:root {
  --ink: #0F1E27;
  --ink-soft: #162933;
  --ink-line: #28414c;
  --parchment: #F1E9D6;
  --parchment-dim: #cfc6ad;
  --gold: #D6A23C;
  --gold-bright: #EFC766;
  --teal: #3E8E9C;
  --terracotta: #C2592F;

  --font-display: "Spectral", serif;
  --font-mono: "Space Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-display);
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 50% -10%, rgba(214, 162, 60, 0.10), transparent 60%);
}

.hidden { display: none !important; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 5vw, 3rem);
  border-bottom: 1px solid var(--ink-line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--parchment);
  padding: 3px;
}

.brand-name {
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--parchment);
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.65rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.5; }

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold-bright);
}
.btn-outline:hover { background: rgba(214, 162, 60, 0.12); }

.btn-claim {
  width: 100%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #251705;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.95rem 1.1rem;
  margin-top: 1.4rem;
  box-shadow: 0 6px 18px rgba(214, 162, 60, 0.25);
}
.btn-claim:hover:not(:disabled) { filter: brightness(1.05); }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 6vw, 4rem);
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3rem) 2rem;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.coin-wrap {
  flex: 0 0 auto;
  width: clamp(140px, 22vw, 220px);
}

.coin {
  width: 100%;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.45));
  animation: coinSpin 9s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .coin { animation: none; }
}
@keyframes coinSpin {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(180deg) scale(0.94); }
  100% { transform: rotateY(360deg) scale(1); }
}

.hero-text { flex: 1 1 360px; min-width: 280px; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  font-size: 0.78rem;
  margin: 0 0 0.6rem;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.12;
  margin: 0 0 0.9rem;
  font-weight: 600;
  color: var(--parchment);
}

.lede {
  color: var(--parchment-dim);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 480px;
  margin: 0;
}

/* ---------- Ledger card ---------- */
.ledger-card {
  max-width: 560px;
  margin: 1rem auto 3rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 10px;
}

.ledger-empty p {
  color: var(--parchment-dim);
  text-align: center;
  margin: 1rem 0;
}

.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--ink-line);
  gap: 1rem;
}
.ledger-row:last-of-type { border-bottom: none; }

.ledger-row-small { font-size: 0.85rem; opacity: 0.75; }

.ledger-row-highlight {
  border-top: 1px dashed var(--gold);
  border-bottom: 1px dashed var(--gold);
  padding: 1.1rem 0;
}

.ledger-label {
  color: var(--parchment-dim);
  font-size: 0.9rem;
}

.ledger-value {
  font-size: 1rem;
  color: var(--parchment);
  text-align: right;
  word-break: break-all;
}

.mono { font-family: var(--font-mono); }

.gold-amount {
  color: var(--gold-bright);
  font-size: 1.3rem;
  font-weight: 700;
}

.optin-warning {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(194, 89, 47, 0.15);
  border: 1px solid var(--terracotta);
  border-radius: 6px;
  color: #f0c4ad;
  font-size: 0.85rem;
  line-height: 1.4;
}

.status-msg {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
  color: var(--teal);
}
.status-msg.error { color: var(--terracotta); }

.footnote {
  text-align: center;
  color: var(--ink-line);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding-bottom: 1.25rem;
}

.ecosystem {
  max-width: 560px;
  margin: 0 auto 3rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 2.25rem);
  border-top: 1px dashed var(--ink-line);
  text-align: center;
}

.ecosystem-title {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--teal);
  margin: 0 0 1rem;
}

.ecosystem-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
}

.ecosystem-links li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.ecosystem-links a {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.ecosystem-links a:hover,
.ecosystem-links a:focus-visible {
  border-bottom-color: var(--gold-bright);
}

.ecosystem-tag {
  color: var(--parchment-dim);
  font-size: 0.72rem;
  margin-left: 0.25rem;
}

@media (max-width: 600px) {
  .hero { flex-direction: column; text-align: center; }
  .lede { margin: 0 auto; }
  .ledger-row { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .ledger-value { text-align: left; }
}
