/* ============================================================================
   Euclid Prime — waitlist page styles (redesign)
   All color/elevation/type via var(--token) from tokens.css. Light + dark.
   Personality: the page is a taste of the product — a calm, precise "pro
   terminal". Neutral surfaces, one deep-teal accent, mono tabular numbers,
   a faint terminal grid, borders over shadows, restrained motion.
   Typeface: Gilroy (≤600 weight here — no faux-bold).
   ========================================================================== */

/* ─── Layout primitives ─── */
.wrap {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

html { scroll-behavior: smooth; }

:root {
  --header-h: 72px;
  --tape-h: 51px;
  --grid-line: rgba(15, 23, 42, 0.05);
}
[data-theme="dark"] { --grid-line: rgba(231, 232, 236, 0.045); }

.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;
  left: 12px; top: -48px;
  z-index: 1200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: top 0.12s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Brand logo theme-swap (white asset in dark mode) ─── */
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: inline-block; }

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header {
  background: color-mix(in srgb, #0c0d10 82%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo { height: 50px; width: auto; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.12s ease, background 0.12s ease;
}
.nav-link:hover { color: var(--text); background: var(--panel-strong); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.theme-toggle:hover { color: var(--text); background: var(--panel-strong); }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ─── Shared: eyebrow, buttons, inputs, card, section heads ─── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  padding: 6px 13px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  height: 46px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary:disabled { opacity: 0.7; cursor: default; transform: none; filter: none; box-shadow: none; }
.btn-primary svg { transition: transform 0.12s ease; }
.btn-primary:hover svg { transform: translateX(2px); }
.btn-primary.is-loading { cursor: progress; }
.btn-primary.is-loading:disabled { opacity: 1; } /* keep it bright so the spinner reads clearly */
.btn-spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--on-accent) 32%, transparent);
  border-top-color: var(--on-accent);
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn-spinner { animation-duration: 1.3s; } /* slow, not stopped — it must still signal "working" */
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.input.is-invalid { border-color: var(--red); }

.field-hint { font-size: 11.5px; color: var(--muted); }

/* Honeypot (hidden from people; bots fill it → server drops the submission) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Trading-type dropdown (reuses .input; themed chevron + placeholder state) */
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6b7d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px;
  cursor: pointer;
}
[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888c96' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.select:invalid { color: var(--muted); }
.select option { color: var(--text); background: var(--panel); }

/* Custom themed dropdown — JS enhances the native <select> (which stays as the
   form value + no-JS fallback). The native control is hidden once enhanced. */
.cselect { position: relative; }
.cselect select.cselect-native {
  position: absolute;
  width: 1px; height: 1px;
  min-width: 0;
  padding: 0; margin: -1px; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
}
.cselect-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 13px 0 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.cselect-trigger:focus-visible,
.cselect.is-open .cselect-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
  outline: none;
}
.cselect-trigger.is-placeholder { color: var(--muted); }
.cselect.is-invalid .cselect-trigger,
.cselect:has(.cselect-native.is-invalid) .cselect-trigger { border-color: var(--red); }
.cselect-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-chevron { flex: none; color: var(--muted); transition: transform 0.2s ease; }
.cselect.is-open .cselect-chevron { transform: rotate(180deg); }

.cselect-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 34px color-mix(in srgb, #0b0f14 22%, transparent);
  max-height: 264px;
  overflow-y: auto;
}
.cselect-menu[hidden] { display: none; }
.cselect-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.2;
  color: var(--text);
  cursor: pointer;
}
.cselect-option.is-active,
.cselect-option:hover { background: var(--accent-tint); }
.cselect-option[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.cselect-option .cselect-check { flex: none; opacity: 0; color: var(--accent); }
.cselect-option[aria-selected="true"] .cselect-check { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .cselect.is-open .cselect-menu { animation: cselect-pop 0.14s cubic-bezier(0.2, 0.6, 0.3, 1); }
}
@keyframes cselect-pop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.section-head { max-width: 660px; margin-inline: auto; text-align: center; }
.section-title {
  margin: 16px 0 0;
  font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-sub {
  margin: 14px auto 0;
  max-width: 54ch;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ─── Email capture form ─── */
.capture {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 480px;
  margin-top: 26px;
}
.capture .input { flex: 1; min-width: 200px; }
.capture .select { flex: 0 0 100%; }
.capture .cselect { flex: 0 0 100%; }
.capture-hint { flex-basis: 100%; margin: 4px 2px 0; }
.capture.is-invalid .capture-hint { color: var(--red); }
.capture--center { margin-inline: auto; }

@media (max-width: 520px) {
  .capture { flex-direction: column; align-items: stretch; }
  .capture .input { flex: none; width: 100%; }
  .capture .btn-primary { width: 100%; justify-content: center; }
}

/* Post-signup referral panel (replaces the form on success) */
.ref-success {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 14px;
  background: var(--accent-tint);
}
.ref-success-pos { margin: 0; font-size: 19px; font-weight: 600; color: var(--text); }
.ref-success-pos strong { color: var(--accent); }
.ref-success-sub { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ref-link { display: flex; gap: 8px; }
.ref-link-input { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; background: var(--panel); }
.ref-copy { flex: 0 0 auto; }
.capture--center .ref-success { margin-inline: auto; width: 100%; text-align: left; }
@media (max-width: 520px) {
  .ref-link { flex-direction: column; }
  .ref-copy { width: 100%; justify-content: center; }
}

/* ─── Hero ─── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - var(--tape-h));
  min-height: calc(100dvh - var(--header-h) - var(--tape-h));
  padding-top: 28px;
  padding-bottom: 72px;
  overflow: hidden;
}

/* Terminal grid backdrop + teal glow, fading out toward the edges */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 35%, transparent 78%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(820px 420px at 72% 18%, var(--accent-tint), transparent 65%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 56px;
  align-items: center;
}

.hero-title {
  margin: 22px 0 0;
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.028em;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.06em;
}
.ht-line { display: flex; align-items: center; gap: 0.3em; max-width: 100%; }

.rotator {
  display: inline-flex;
  align-items: center;
  gap: 0.26em;
  color: var(--accent);
  white-space: nowrap;
  will-change: transform, opacity;
}
.rotator-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.92em;
  height: 0.92em;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
}
.rotator-badge svg { width: 62%; height: 62%; display: block; }
.rotator-badge.is-logo { background: #fff; overflow: hidden; box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18); }
.rotator-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.rotator-name { font-weight: 600; }

.hero-sub {
  margin: 20px 0 0;
  max-width: 50ch;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--muted);
}
.hero-proof .mono { color: var(--text); font-weight: 500; }
.proof-sep { width: 1px; height: 14px; background: var(--border); }

/* ─── Orderbook panel ─── */
.hero-panel { position: relative; }
/* soft glow behind the panel */
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -8% -6%;
  background: radial-gradient(closest-side, var(--accent-tint), transparent 72%);
  filter: blur(42px);
  z-index: -1;
  pointer-events: none;
}

.ob {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px 16px 12px;
  max-width: 480px;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}
.ob-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.ob-pair { font-size: 14px; font-weight: 600; color: var(--text); }
.ob-quote { color: var(--muted); font-weight: 500; }
.ob-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ob-live .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}

.ob-cols {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  padding: 10px 8px 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ob-cols span:nth-child(2), .ob-cols span:nth-child(3) { text-align: right; }

.ob-rows { display: flex; flex-direction: column; }
.ob-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 4.5px 8px;
  font-size: 12.5px;
  border-radius: 6px;
  overflow: hidden;
}
.ob-row .ob-sz, .ob-row .ob-tt { text-align: right; color: var(--text); }
.ob-row .ob-tt { color: var(--muted); }
.ob-row.ask .ob-px { color: var(--red); }
.ob-row.bid .ob-px { color: var(--green); }
.ob-depth {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  border-radius: 6px;
  pointer-events: none;
  transition: width 0.5s ease;
}
.ob-row.ask .ob-depth { background: color-mix(in srgb, var(--red) 9%, transparent); }
.ob-row.bid .ob-depth { background: color-mix(in srgb, var(--green) 9%, transparent); }
.ob-px, .ob-sz, .ob-tt { position: relative; }
/* update flash */
.ob-row.flash-up .ob-px { animation: flash-text 0.6s ease; }
.ob-row.flash-dn .ob-px { animation: flash-text 0.6s ease; }
@keyframes flash-text { 0% { filter: brightness(1.6); } 100% { filter: none; } }

.ob-spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--panel-strong);
  font-size: 13px;
}
.ob-mid { font-weight: 600; color: var(--text); font-size: 15px; }
.ob-spread-val { color: var(--muted); font-size: 11px; }

.ob-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--border-soft);
  font-size: 10.5px;
  color: var(--muted);
}

/* Scroll-for-more cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.12s ease, background 0.12s ease;
  animation: scroll-bounce 1.9s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--text); background: var(--panel-strong); }
@keyframes scroll-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 7px); }
}

/* ─── Ticker tape ─── */
html:not(.js) .tape { display: none; } /* JS populates it; hide otherwise */
.tape {
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
}
[data-theme="dark"] .tape { background: #0c0d10; }
.tape-track {
  display: flex;
  width: max-content;
  animation: tape-scroll 60s linear infinite;
}
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tape-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tape-group { display: flex; }
.tape-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 26px;
  border-right: 1px solid var(--border-soft);
  white-space: nowrap;
  line-height: 1; /* tighten so Gilroy symbol + mono numbers share one midline */
}
.tape-logo {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
  flex: 0 0 auto;
}
.tape-sym { font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: 0.02em; }
.tape-px { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }
.tape-chg { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 500; }

/* ─── Rewards ─── */
.rewards { margin-bottom: 108px; scroll-margin-top: calc(var(--header-h) + 20px); }
.rewards .section-title { font-size: clamp(32px, 5vw, 50px); }
.rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 700px;
  margin: 40px auto 0;
}
.reward {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.reward::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}
.reward:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.reward-value {
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent);
  /* equal-height, centered value box so both cards' labels align regardless of
     the value's font size (a number vs. a phrase) */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  line-height: 1.1;
}
/* A worded value (e.g. "Mystery Allocation") reads as a phrase, not a number —
   smaller so it balances the numeric box beside it and fits on one line.
   Iridescent "mystery" gradient at rest; shimmers across on hover. */
.reward-value--phrase {
  font-size: clamp(20px, 2.9vw, 27px);
  line-height: 1.15;
  background-image: linear-gradient(
    100deg,
    var(--accent) 0%,
    var(--accent-ai) 28%,
    #4fd9c6 50%,
    var(--accent-ai) 72%,
    var(--accent) 100%
  );
  background-size: 220% auto;
  background-position: 0% center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .reward:hover .reward-value--phrase { animation: mystery-shimmer 2.4s linear infinite; }
}
@keyframes mystery-shimmer {
  to { background-position: -220% center; }
}
.reward-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }

/* Lootbox tier ladder (graphic below the reward boxes) */
.lootbox-tiers { margin-top: 30px; }
.lootbox-tiers-lead {
  margin: 0 auto 16px;
  max-width: 56ch;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}
.lootbox-tiers-figure {
  margin: 0 auto;
  max-width: 760px;
  border-radius: 16px;
  overflow: hidden;
}
.lootbox-tiers-figure img { display: block; width: 100%; height: auto; }

/* ─── How it works ─── */
.steps { margin-bottom: 108px; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.step {
  padding: 26px 24px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.step:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.step-num {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 8px;
  padding: 5px 10px;
  margin-bottom: 16px;
}
.step-title { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--text); }
.step-body { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* ─── Product showcase ─── */
.showcase { margin-bottom: 108px; }

/* Editorial split header: kicker + title left, lede right */
.showcase-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px 56px;
  align-items: end;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}
.showcase-title {
  margin: 14px 0 0;
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
}
.showcase-title em { font-style: italic; color: var(--accent); }
.showcase-lede {
  margin: 0 0 6px;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* The stage: laptop in atmosphere; 3D tilt on hover (desktop, JS-driven) */
.stage { position: relative; margin-top: 52px; perspective: 1600px; }
.stage-glow {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: 78%;
  height: 76%;
  background: radial-gradient(closest-side, var(--accent-tint), transparent 72%);
  filter: blur(52px);
  z-index: -1;
  pointer-events: none;
}

.stage-device {
  position: relative;
  max-width: 940px;
  margin-inline: auto;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.3, 1); /* smooth return to rest */
  will-change: transform;
}
.stage-device.is-tilting { transition: transform 0.1s ease-out; } /* responsive follow while hovering */
.showcase-laptop {
  display: block;
  width: 100%;
  height: auto;
}
.showcase-laptop--dark { display: none; }
[data-theme="dark"] .showcase-laptop--light { display: none; }
[data-theme="dark"] .showcase-laptop--dark { display: block; }

/* ─── Features: editorial rail + stats ─── */
.features { margin-bottom: 108px; }
.intel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
}
.intel-item {
  position: relative;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
}
/* accent keyline that extends on hover */
.intel-item::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 36px;
  background: var(--accent);
  transition: width 0.35s cubic-bezier(0.2, 0.6, 0.3, 1);
}
.intel-item:hover::after { width: 104px; }
.intel-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.intel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  color: var(--accent);
  background: var(--accent-tint);
  transition: background 0.2s ease, color 0.2s ease;
}
.intel-item:hover .intel-icon { background: var(--accent); color: var(--on-accent); }
.intel-index { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.intel-title { margin: 0 0 8px; font-size: 16.5px; font-weight: 600; line-height: 1.3; color: var(--text); }
.intel-body { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
/* staggered reveal */
.js .intel-grid .intel-item:nth-child(2) { transition-delay: 0.08s; }
.js .intel-grid .intel-item:nth-child(3) { transition-delay: 0.16s; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 40px;
  margin-top: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-value { font-size: 27px; font-weight: 500; color: var(--text); letter-spacing: -0.01em; }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Final CTA ─── */
.cta-band { margin-bottom: 108px; }
.cta-inner {
  position: relative;
  text-align: center;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 18px;
}
.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit; /* round the gradient itself so the parent needn't clip (which would cut the dropdown) */
  overflow: hidden;
  background:
    radial-gradient(640px 280px at 50% -20%, var(--accent-tint), transparent 70%);
}
.cta-inner > * { position: relative; }
.cta-title {
  margin: 18px 0 0;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}
.cta-sub { margin: 12px 0 0; max-width: 48ch; font-size: 16px; color: var(--muted); }
.cta-band .capture { width: 100%; }

/* ─── Footer ─── */
.site-footer { border-top: 1px solid var(--border); background: var(--panel); }
[data-theme="dark"] .site-footer { background: #0c0d10; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 40px;
}
.footer-logo { height: 44px; width: auto; }
.footer-tagline { margin: 14px 0 0; max-width: 34ch; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.footer-socials { display: flex; gap: 8px; margin-top: 18px; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.footer-social:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.footer-link {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  width: fit-content;
  transition: color 0.12s ease;
}
.footer-link:hover { color: var(--accent); }

.footer-disclaimer { background: var(--panel-strong); border-top: 1px solid var(--border-soft); }
.footer-disclaimer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 16px;
}
.disclaimer { margin: 0; font-size: 10.5px; line-height: 1.4; color: var(--muted); max-width: 70ch; }
.footer-copy { font-size: 10.5px; color: var(--muted); white-space: nowrap; }

/* ─── Lootbox modal (post-signup popup) ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: min(92vh, 760px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.12s ease;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.62); }

.lb-media { line-height: 0; }
.lb-media img {
  display: block;
  width: 100%;
  height: auto; /* show the whole 16:9 lootbox graphic, uncropped */
  border-radius: 18px 18px 0 0;
}
.lb-body { padding: 22px 24px 24px; }
.lb-title { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--text); }
.lb-title strong { color: var(--accent); }
.lb-sub { margin: 10px 0 18px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.lb-sub strong { color: var(--text); font-weight: 600; }

/* enter animation (motion-safe) */
@media (prefers-reduced-motion: no-preference) {
  .modal.is-open .modal-backdrop { animation: modal-fade 0.2s ease; }
  .modal.is-open .modal-panel { animation: modal-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .lb-body { padding: 18px 18px 20px; }
  .lb-title { font-size: 20px; }
}

/* ─── Motion: scroll reveal (JS adds .is-visible) ─── */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .eyebrow-dot, .ob-live .dot { animation: none; }
  .btn-primary:hover { transform: none; }
  .scroll-cue { animation: none; }
  .tape-track { animation: none; }
  .ob-depth { transition: none; }
  .stage-device { transition: none; }
}

/* ─── Animated theme switch ───
   app.js adds .theme-transition to <html> for ~0.45s around each flip so the
   whole palette cross-fades. Gated to users who allow motion. */
@media (prefers-reduced-motion: no-preference) {
  html.theme-transition,
  html.theme-transition *,
  html.theme-transition *::before,
  html.theme-transition *::after {
    transition: background-color 0.4s ease, color 0.4s ease,
                border-color 0.4s ease, fill 0.4s ease, stroke 0.4s ease,
                box-shadow 0.4s ease, outline-color 0.4s ease !important;
    transition-delay: 0s !important;
  }
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  .hero {
    min-height: 0;
    padding-top: 40px;
    padding-bottom: 56px;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-panel { order: 2; }
  .ob { margin-inline: auto; }
  .scroll-cue { display: none; }
  .rewards, .steps, .showcase, .features, .cta-band { margin-bottom: 76px; }
  .showcase-head { grid-template-columns: 1fr; align-items: start; gap: 16px; }
  .showcase-lede { margin-bottom: 0; }
  .stage { margin-top: 36px; }
  .intel-grid { grid-template-columns: 1fr; gap: 0; }
  .intel-item { padding: 22px 0 22px; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 22px 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  :root { --header-h: 62px; }
  .wrap { padding-inline: 18px; }
  .brand-logo { height: 40px; }
  .hero-proof { flex-wrap: wrap; gap: 10px; }
  .rewards-grid { grid-template-columns: 1fr; max-width: 460px; }
  .stat-value { font-size: 23px; }
  .cta-inner { padding: 40px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-disclaimer .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
  .footer-copy { white-space: normal; }
}
