/* ==========================================================================
   Doge Drip — Dogecoin Faucet
   Design system: Dark Mode (OLED) · Dogecoin gold · Fredoka/Nunito/JetBrains Mono
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand — anchored on Dogecoin's official #C2A633, warmed for OLED */
  --gold: #f2b441;
  --gold-bright: #ffd066;
  --gold-deep: #c2a633;
  --gold-ember: #f59e0b;
  --violet: #8b5cf6;
  --violet-dim: #6d4ed6;

  /* Surface — warm near-black, not cold slate */
  --bg: #08090f;
  --bg-raise: #0d0f17;
  --bg-sunk: #050609;
  --surface: rgba(255, 255, 255, 0.032);
  --surface-hi: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(242, 180, 65, 0.28);

  /* Text — warm white reads friendlier than #F8FAFC */
  --text: #f5f3ee;
  --text-dim: #b8b4a8;
  --text-mute: #8a877d;

  /* Semantic */
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;

  /* Type */
  --f-display: "Fredoka", system-ui, sans-serif;
  --f-body: "Nunito", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Space + shape */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --pad: clamp(1rem, 4vw, 2rem);
  --maxw: 1200px;

  /* Elevation */
  --shadow-lg: 0 24px 70px -18px rgba(0, 0, 0, 0.85);
  --glow-gold: 0 0 44px -8px rgba(242, 180, 65, 0.5);

  /* Motion */
  --e-out: cubic-bezier(0.22, 1, 0.36, 1);
  --e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t: 220ms;

  /* z-scale: 10 base / 20 sticky / 30 overlay / 50 toast */
  --z-nav: 20;
  --z-toast: 50;
}

/* --------------------------------------------------------------------------
   2. Reset + base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

/* Any author `display` rule outranks the UA's [hidden]{display:none}, so
   `el.hidden = true` silently fails on styled elements. Enforce it once here
   rather than patching each component. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

::selection { background: var(--gold); color: #1a1204; }

/* Accessibility primitives */
:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: #1a1204;
  font-weight: 700;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top var(--t) var(--e-out);
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   3. Ambient background — starfield + gold aura
   -------------------------------------------------------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.75;
}

/* Warm aura behind the console — gives the gold somewhere to bloom */
.aura {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  will-change: transform;
}
.aura--gold {
  top: -12%; left: 50%;
  width: min(760px, 96vw);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
    circle,
    rgba(242, 180, 65, 0.2) 0%,
    rgba(245, 158, 11, 0.09) 42%,
    transparent 70%
  );
  animation: breathe 14s var(--e-out) infinite;
}
.aura--violet {
  top: 44%; right: -12%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.13) 0%, transparent 68%);
  animation: breathe 18s var(--e-out) infinite reverse;
}

@keyframes breathe {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;    transform: translateX(-50%) scale(1.1); }
}
.aura--violet { animation-name: breathe-v; }
@keyframes breathe-v {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.12); }
}

/* Fine grain — kills banding on the big gradients */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   4. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { position: relative; }

.section-head {
  text-align: center;
  max-width: 60ch;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  margin-bottom: 0.85rem;
}
.section-head p {
  color: var(--text-dim);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-hi);
  border-radius: 100px;
  background: rgba(242, 180, 65, 0.07);
  color: var(--gold-bright);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.grad-text {
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   5. Nav — floats off the edges, never flush
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0.9rem; left: 0.9rem; right: 0.9rem;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--maxw) - 2rem);
  margin-inline: auto;
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(10, 11, 18, 0.72);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: background var(--t) var(--e-out), border-color var(--t) var(--e-out),
    box-shadow var(--t) var(--e-out);
}
.nav.is-stuck {
  background: rgba(8, 9, 15, 0.9);
  border-color: var(--line-hi);
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.9);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand__mark { width: 30px; height: 30px; flex-shrink: 0; }

/* Below ~900px the links can't fit beside the brand and CTA without wrapping
   off-screen. Every link has a matching entry in the footer, so drop them here
   and keep the one thing that matters on mobile: the claim button. */
.nav__links { display: none; }
@media (min-width: 900px) {
  .nav__links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
}
.nav__links a {
  padding: 0.5rem 0.85rem;
  border-radius: 100px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--t), background var(--t);
}
.nav__links a:hover { color: var(--text); background: var(--surface-hi); }

.nav__cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Live balance pill */
/* Nice-to-have, not load-bearing — it's the first thing to go when space is tight. */
.balance-pill { display: none; }
@media (min-width: 620px) {
  .balance-pill { display: flex; }
}
.balance-pill {
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.balance-pill strong {
  color: var(--gold-bright);
  font-weight: 600;
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 2.4s var(--e-out) infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65); }
  70%  { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* --------------------------------------------------------------------------
   6. Buttons
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.75rem 1.4rem;
  border-radius: 100px;
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  /* Colour/shadow only — never scale, that shifts layout */
  transition: background var(--t) var(--e-out), box-shadow var(--t) var(--e-out),
    border-color var(--t) var(--e-out), color var(--t) var(--e-out),
    opacity var(--t) var(--e-out);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: #1a1204;
  box-shadow: 0 8px 26px -8px rgba(242, 180, 65, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.btn--gold:hover:not(:disabled) {
  box-shadow: 0 12px 38px -8px rgba(242, 180, 65, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn--ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--line-hi);
  background: var(--surface-hi);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

/* Sheen sweep on gold buttons */
.btn--gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.42) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  pointer-events: none;
}
.btn--gold:hover:not(:disabled)::after { animation: sheen 900ms var(--e-out); }
@keyframes sheen {
  to { transform: translateX(120%); }
}

.btn--xl {
  width: 100%;
  min-height: 62px;
  padding-inline: 2rem;
  font-size: 1.15rem;
}

/* Spinner shown while claiming */
.btn__spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(26, 18, 4, 0.3);
  border-top-color: #1a1204;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  place-items: center;
  /* padding-block, not the `padding` shorthand: .hero is also .wrap, and the
     shorthand would zero out .wrap's padding-inline and go edge-to-edge. */
  padding-block: clamp(7rem, 14vw, 9.5rem) clamp(3rem, 7vw, 5rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
  width: 100%;
}
@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 480px;
    gap: 4rem;
  }
}

.hero__copy { text-align: center; }
@media (min-width: 1024px) {
  .hero__copy { text-align: left; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
  margin-bottom: 1.25rem;
}
.hero h1 span { display: block; }

.hero__sub {
  max-width: 46ch;
  margin: 0 auto 2rem;
  color: var(--text-dim);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
}
@media (min-width: 1024px) {
  .hero__sub { margin-inline: 0; }
}

/* Trust strip */
.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
@media (min-width: 1024px) {
  .trust { justify-content: flex-start; }
}
.trust__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.83rem;
  font-weight: 600;
}
.trust__item svg { width: 15px; height: 15px; color: var(--ok); flex-shrink: 0; }

/* --------------------------------------------------------------------------
   8. Claim console — the centrepiece
   -------------------------------------------------------------------------- */
.console {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, rgba(24, 20, 12, 0.86) 0%, rgba(10, 11, 18, 0.94) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg), var(--glow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Gold hairline that rides the top edge */
.console::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.console__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.console__title {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.console__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 100px;
  background: rgba(52, 211, 153, 0.1);
  color: var(--ok);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Coin + progress ring --- */
.dial {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(170px, 42vw, 208px);
  aspect-ratio: 1;
  margin: 0 auto 1.5rem;
}

.dial__ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.dial__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 5;
}
.dial__bar {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 5;
  stroke-linecap: round;
  /* dasharray/offset set from JS against the real radius */
  filter: drop-shadow(0 0 7px rgba(242, 180, 65, 0.75));
  transition: stroke-dashoffset 900ms linear;
}
.dial.is-ready .dial__bar { transition: stroke-dashoffset 600ms var(--e-out); }

.coin {
  width: 68%;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: float 5.5s ease-in-out infinite;
  filter: drop-shadow(0 10px 26px rgba(242, 180, 65, 0.45));
  transition: opacity 400ms var(--e-out), filter 400ms var(--e-out);
}

/* Mid-cooldown the timer sits over the coin, so the coin recedes to let the
   digits read. It returns to full strength the moment a claim is available. */
.dial:not(.is-ready) .coin {
  opacity: 0.22;
  filter: blur(1.5px) saturate(0.6);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.dial.is-ready .coin { animation: float 5.5s ease-in-out infinite, glowPulse 2.4s ease-in-out infinite; }
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 10px 26px rgba(242, 180, 65, 0.45)); }
  50%      { filter: drop-shadow(0 10px 40px rgba(255, 208, 102, 0.95)); }
}

/* Countdown readout centred in the dial */
.dial__readout {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.dial__time {
  font-family: var(--f-mono);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text);
  /* Tabular digits stop the timer jittering every tick */
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 0 18px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.7);
}
.dial__label {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
}

/* Reward headline */
.reward {
  text-align: center;
  margin-bottom: 1.5rem;
}
.reward__amt {
  font-family: var(--f-display);
  font-size: clamp(2rem, 5vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.reward__amt sup {
  font-family: var(--f-body);
  font-size: 0.4em;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  vertical-align: super;
  margin-left: 0.35rem;
}
.reward__meta {
  margin-top: 0.4rem;
  color: var(--text-mute);
  font-size: 0.85rem;
}

/* --- Form --- */
.field { margin-bottom: 1rem; }
.field__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}
.field__wrap { position: relative; }
.field__icon {
  position: absolute;
  top: 50%; left: 0.95rem;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--text-mute);
  pointer-events: none;
  transition: color var(--t);
}
.input {
  width: 100%;
  min-height: 54px;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-family: var(--f-mono);
  font-size: 0.92rem;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.input::placeholder { color: var(--text-mute); font-family: var(--f-body); }
.input:hover { border-color: rgba(255, 255, 255, 0.16); }
.input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 4px rgba(242, 180, 65, 0.14);
}
.input:focus ~ .field__icon { color: var(--gold); }
.input[aria-invalid="true"] {
  border-color: var(--err);
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.13);
}

.field__hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-mute);
}
.field__err {
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--err);
}
.field__err svg { width: 14px; height: 14px; flex-shrink: 0; }
.field__err.is-on { display: flex; }

/* Turnstile slot — reserve height so nothing jumps when it loads */
.captcha {
  display: grid;
  place-items: center;
  min-height: 68px;
  margin-bottom: 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.25);
}
.captcha:empty::after {
  content: "Loading verification…";
  color: var(--text-mute);
  font-size: 0.8rem;
}

.console__foot {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-mute);
}
.console__foot a { color: var(--gold); font-weight: 600; }
.console__foot a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   9. Stats
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
  overflow: hidden;
}
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.stat {
  padding: clamp(1.25rem, 3vw, 1.85rem) 1rem;
  background: var(--bg-raise);
  text-align: center;
  transition: background var(--t);
}
.stat:hover { background: #12151f; }
.stat__val {
  font-family: var(--f-mono);
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat__key {
  margin-top: 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
/* Skeleton while stats fetch — reserves the same box, no jump */
.stat__val.is-loading {
  color: transparent;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hi) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   10. Steps
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  position: relative;
  padding: 2rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--t), background var(--t);
}
.step:hover { border-color: var(--line-hi); background: var(--surface-hi); }
.step__num {
  position: absolute;
  top: -14px; left: 1.5rem;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  color: #1a1204;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 14px -3px rgba(242, 180, 65, 0.7);
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.step p { color: var(--text-dim); font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   11. Bento features
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento__cell--wide { grid-column: span 2; }
}
.bento__cell {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--surface-hi), rgba(255, 255, 255, 0.012));
  transition: border-color var(--t), background var(--t);
}
.bento__cell:hover { border-color: var(--line-hi); }
.bento__ico {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 1rem;
  border: 1px solid var(--line-hi);
  border-radius: 12px;
  background: rgba(242, 180, 65, 0.09);
  color: var(--gold);
}
.bento__ico svg { width: 20px; height: 20px; }
.bento__cell h3 { font-size: 1.08rem; margin-bottom: 0.4rem; }
.bento__cell p { color: var(--text-dim); font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   12. Live payouts
   -------------------------------------------------------------------------- */
.payouts {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-raise);
  overflow: hidden;
}
.payouts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
}
.payouts__live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ok);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.payouts__list { list-style: none; padding: 0; margin: 0; }
.payout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 0.88rem;
  animation: slideIn 420ms var(--e-out);
}
.payout:last-child { border-bottom: none; }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.payout__who {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.payout__avatar {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-deep), rgba(139, 92, 246, 0.5));
  color: #1a1204;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  font-weight: 700;
}
.payout__addr {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payout__amt {
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}
.payout__ago {
  flex-shrink: 0;
  min-width: 62px;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .payout__ago { display: none; }
}

/* --------------------------------------------------------------------------
   12b. Earnings calculator
   -------------------------------------------------------------------------- */
.calc {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, rgba(24, 20, 12, 0.7) 0%, rgba(13, 15, 23, 0.92) 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.calc__control { margin-bottom: clamp(1.5rem, 3vw, 2rem); }

.calc__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.calc__out {
  font-family: var(--f-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

/* Range input — restyled in both engines; the thumb needs separate rules. */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  /* --fill is set from JS so the track shows progress */
  background-image: linear-gradient(90deg, var(--gold-bright), var(--gold-deep));
  background-size: var(--fill, 17%) 100%;
  background-repeat: no-repeat;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px; height: 26px;
  border: 3px solid #1a1204;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  box-shadow: 0 3px 12px rgba(242, 180, 65, 0.7);
  cursor: grab;
  transition: box-shadow var(--t);
}
.range::-webkit-slider-thumb:active { cursor: grabbing; }
.range:hover::-webkit-slider-thumb { box-shadow: 0 3px 20px rgba(255, 208, 102, 0.95); }
.range::-moz-range-thumb {
  width: 20px; height: 20px;
  border: 3px solid #1a1204;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 3px 12px rgba(242, 180, 65, 0.7);
  cursor: grab;
}
.range::-moz-range-track {
  height: 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.09);
}
.range:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 6px; }

.calc__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-mute);
}
.calc__note {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--text-mute);
  max-width: 62ch;
}

.calc__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--line);
  overflow: hidden;
}
@media (min-width: 640px) {
  .calc__grid { grid-template-columns: repeat(3, 1fr); }
}
.calc__cell {
  padding: 1.4rem 1rem;
  background: var(--bg-raise);
  text-align: center;
}
.calc__cell--hero {
  background: linear-gradient(160deg, rgba(242, 180, 65, 0.12), var(--bg-raise) 70%);
}
.calc__k {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.calc__v {
  margin: 0.35rem 0 0.15rem;
  font-family: var(--f-mono);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.calc__cell--hero .calc__v { color: #fff; text-shadow: 0 0 24px rgba(242, 180, 65, 0.55); }
.calc__sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.calc__usd { color: var(--ok); }
.calc__usd:empty { display: none; }

.calc__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.calc__price {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.calc__price strong { color: var(--text); font-weight: 700; }
.calc__price .up   { color: var(--ok); }
.calc__price .down { color: var(--err); }
@media (max-width: 560px) {
  .calc__foot { flex-direction: column; align-items: stretch; }
  .calc__foot .btn { width: 100%; }
  .calc__price { justify-content: center; }
}

/* --------------------------------------------------------------------------
   13. Referral
   -------------------------------------------------------------------------- */
.refer {
  position: relative;
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, rgba(139, 92, 246, 0.12) 0%, rgba(13, 15, 23, 0.9) 55%);
  text-align: center;
  overflow: hidden;
}
.refer::before {
  content: "";
  position: absolute;
  top: -50%; left: 50%;
  width: 420px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18), transparent 68%);
  filter: blur(50px);
  pointer-events: none;
}
.refer > * { position: relative; }
.refer h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 0.75rem; }
.refer p { max-width: 52ch; margin: 0 auto 1.75rem; color: var(--text-dim); }
.refer__pct {
  font-family: var(--f-display);
  font-size: 1em;
  background: linear-gradient(135deg, #c4b5fd, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.refer__math {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  max-width: 640px;
  margin: 0 auto 1.75rem;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: var(--r-md);
  background: rgba(139, 92, 246, 0.22);
  overflow: hidden;
}
@media (min-width: 640px) {
  .refer__math { grid-template-columns: repeat(3, 1fr); }
}
.refer__math li {
  padding: 1rem 0.75rem;
  background: rgba(13, 15, 23, 0.92);
}
.refer__math-v {
  display: block;
  font-family: var(--f-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #c4b5fd;
  font-variant-numeric: tabular-nums;
}
.refer__math-k {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: var(--text-mute);
  line-height: 1.45;
}

.copybox {
  display: flex;
  gap: 0.6rem;
  max-width: 520px;
  margin: 0 auto;
}
.copybox .input {
  padding-left: 1rem;
  font-size: 0.85rem;
  text-overflow: ellipsis;
}
.copybox .btn { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   14. FAQ
   -------------------------------------------------------------------------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: 0.75rem;
  transition: border-color var(--t), background var(--t);
}
.faq__item:hover { border-color: var(--line-hi); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.35rem;
  text-align: left;
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-md);
}
.faq__q svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform var(--t) var(--e-out);
}
.faq__q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--e-out);
}
.faq__a[data-open="true"] { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p {
  padding: 0 1.35rem 1.25rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
}
.footer__about { max-width: 38ch; margin-top: 0.9rem; color: var(--text-mute); font-size: 0.88rem; }
.footer h4 {
  margin-bottom: 0.9rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer li a {
  /* inline-block + padding-block lifts these from 20px to ~28px, clearing the
     24px minimum target size (WCAG 2.5.8) for standalone nav links. */
  display: inline-block;
  padding-block: 0.25rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color var(--t);
}
.footer li a:hover { color: var(--gold); }
.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--text-mute);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   16. Toasts
   -------------------------------------------------------------------------- */
.toasts {
  position: fixed;
  bottom: 1.25rem; right: 1.25rem;
  z-index: var(--z-toast);
  display: grid;
  gap: 0.6rem;
  width: min(360px, calc(100vw - 2.5rem));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(15, 17, 26, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 320ms var(--e-spring);
}
.toast.is-out { animation: toastOut 240ms var(--e-out) forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(28px); }
}
.toast--ok  { border-color: rgba(52, 211, 153, 0.4); }
.toast--err { border-color: rgba(248, 113, 113, 0.4); }
.toast__ico { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.toast--ok .toast__ico  { color: var(--ok); }
.toast--err .toast__ico { color: var(--err); }
.toast__title { font-weight: 800; font-size: 0.9rem; }
.toast__msg { color: var(--text-dim); font-size: 0.83rem; line-height: 1.5; }

/* --------------------------------------------------------------------------
   17. Coin burst on successful claim
   -------------------------------------------------------------------------- */
.burst {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  overflow: hidden;
}
.burst__coin {
  position: absolute;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
  box-shadow: 0 0 10px rgba(242, 180, 65, 0.9);
  will-change: transform, opacity;
}

/* --------------------------------------------------------------------------
   18. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms var(--e-out), transform 620ms var(--e-out);
}
.reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   19. Reduced motion — kill every non-essential animation
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .aura { animation: none; }
  #stars { display: none; }
  .coin { animation: none; }
  .burst { display: none; }
}
