/* ════════════════════════════════════════════════════════════════════════
   BLOCKFORGE — marketing / auth / account design system
   Aesthetic: furnace-lit workshop. Warm obsidian, molten ember accent,
   pixel-stepped corners, Silkscreen micro-labels, Bricolage display type.
   ════════════════════════════════════════════════════════════════════════ */

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

:root {
  --ink: #0c0a08;
  --coal: #14110d;
  --slate: #1c1813;
  --slate-2: #262019;
  --seam: rgba(255, 196, 130, 0.10);
  --seam-strong: rgba(255, 196, 130, 0.22);
  --parchment: #f1e7d6;
  --bone: #c9bba4;
  --mute: #8f8270;
  --ember: #ff7a1a;
  --ember-hot: #ffa040;
  --ember-glow: rgba(255, 122, 26, 0.16);
  --emerald: #3fd06c;
  --diamond: #5ad2e6;
  --redstone: #ef4a44;
  --gold: #f7c44d;
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body: 'Schibsted Grotesk', sans-serif;
  --font-pixel: 'Silkscreen', monospace;
  /* stepped "pixel" corner */
  --pixel-clip: polygon(
    0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0,
    calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px)
  );
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 122, 26, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(90, 210, 230, 0.04), transparent 55%),
    var(--ink);
  color: var(--parchment);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* faint block-grid texture over everything */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--seam) 1px, transparent 1px),
    linear-gradient(90deg, var(--seam) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 0%, transparent 75%);
  z-index: 0;
}

::selection { background: var(--ember); color: var(--ink); }

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

.shell { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Type ────────────────────────────────────────── */
.pixel-label {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember-hot);
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.015em; }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  border: none;
  clip-path: var(--pixel-clip);
  transition: transform 0.12s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:active { transform: translateY(2px); }

.btn-ember {
  background: linear-gradient(180deg, var(--ember-hot), var(--ember) 55%, #d85f08);
  color: #1b0d02;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 28px var(--ember-glow);
}
.btn-ember:hover { filter: brightness(1.12); }

.btn-stone {
  background: var(--slate-2);
  color: var(--parchment);
  box-shadow: inset 0 0 0 1px var(--seam-strong);
}
.btn-stone:hover { background: #2f2820; }

.btn-ghost {
  background: transparent;
  color: var(--bone);
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--parchment); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: wait; }

/* ── Nav ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(12, 10, 8, 0.78);
  border-bottom: 1px solid var(--seam);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand .brand-forge { color: var(--ember); }
.brand-cube { width: 28px; height: 28px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; font-size: 14.5px; color: var(--bone); }
.nav-links a:hover { color: var(--parchment); }
.nav-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav .btn { padding: 10px 20px; font-size: 14px; }

/* ── Hero ────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  padding: 84px 0 64px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  background: var(--coal);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam-strong);
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
}
.hero h1 .molten {
  color: var(--ember);
  text-shadow: 0 0 38px rgba(255, 122, 26, 0.45);
}
.hero-sub {
  margin-top: 22px;
  max-width: 52ch;
  font-size: 18px;
  color: var(--bone);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta {
  margin-top: 30px;
  font-family: var(--font-pixel);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--mute);
}
.hero-meta b { color: var(--gold); font-weight: 400; }

/* hero scene */
.hero-scene { position: relative; min-height: 380px; display: grid; place-items: center; }
.hero-scene svg { width: min(100%, 470px); overflow: visible; }
.vox { animation: vox-rise 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes vox-rise {
  from { opacity: 0; transform: translateY(-46px); }
  to { opacity: 1; transform: translateY(0); }
}
.vox-float { animation: vox-float 5s ease-in-out infinite; }
@keyframes vox-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.spark {
  animation: spark-drift 3.2s ease-in infinite;
  opacity: 0;
}
@keyframes spark-drift {
  0% { opacity: 0; transform: translateY(8px); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-70px); }
}
.scene-caption {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mute);
}

/* ── Format strip ────────────────────────────────── */
.format-strip {
  border-top: 1px solid var(--seam);
  border-bottom: 1px solid var(--seam);
  background: var(--coal);
  overflow: hidden;
  padding: 14px 0;
  white-space: nowrap;
}
.format-track {
  display: inline-flex;
  gap: 56px;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--mute);
  animation: marquee 30s linear infinite;
  padding-right: 56px;
}
.format-track .hot { color: var(--ember-hot); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Sections ────────────────────────────────────── */
.section { padding: 88px 0; }
.section-head { max-width: 560px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin-top: 14px; }
.section-head p { margin-top: 14px; color: var(--bone); }

/* step cards */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step-card {
  position: relative;
  background: var(--coal);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam);
  padding: 30px 26px 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 1px var(--seam-strong), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.step-num {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mute);
}
.step-card h3 { font-size: 21px; margin: 14px 0 10px; }
.step-card p { font-size: 14.5px; color: var(--bone); }
.step-icon { height: 46px; margin-bottom: 18px; image-rendering: pixelated; }

/* ── Wallet preview ──────────────────────────────── */
.wallet-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.wallet-copy h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; margin-top: 14px; }
.wallet-copy > p { margin-top: 16px; color: var(--bone); }
.cost-list { margin-top: 26px; display: grid; gap: 10px; }
.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 16px;
  background: var(--coal);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam);
  font-size: 14.5px;
}
.cost-row .cost {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--gold);
  white-space: nowrap;
}

.wallet-card {
  background: linear-gradient(165deg, var(--slate), var(--coal) 70%);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam-strong), 0 28px 60px rgba(0, 0, 0, 0.5);
  padding: 30px 30px 28px;
}
.wallet-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.plan-chip {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.16em;
  padding: 6px 11px;
  background: rgba(63, 208, 108, 0.12);
  color: var(--emerald);
  clip-path: var(--pixel-clip);
}
.plan-chip.chip-pro { background: rgba(90, 210, 230, 0.12); color: var(--diamond); }
.wallet-balance {
  font-family: var(--font-pixel);
  font-size: clamp(34px, 4vw, 46px);
  color: var(--gold);
  text-shadow: 0 0 26px rgba(247, 196, 77, 0.35);
  line-height: 1;
}
.wallet-balance small { font-size: 13px; color: var(--mute); letter-spacing: 0.14em; }
/* XP-style meter */
.xp-meter {
  margin-top: 22px;
  height: 14px;
  background: #0a0806;
  box-shadow: inset 0 0 0 1px var(--seam-strong);
  position: relative;
}
.xp-fill {
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 62%;
  background: repeating-linear-gradient(90deg,
    var(--emerald) 0 8px, #2ea854 8px 16px);
  box-shadow: 0 0 14px rgba(63, 208, 108, 0.5);
  transition: width 0.6s ease;
}
.xp-fill.fill-ember {
  background: repeating-linear-gradient(90deg, var(--ember-hot) 0 8px, var(--ember) 8px 16px);
  box-shadow: 0 0 14px var(--ember-glow);
}
.wallet-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mute);
}
.wallet-rows { margin-top: 24px; display: grid; gap: 8px; }
.wallet-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
  color: var(--bone);
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 0 1px var(--seam);
}
.wallet-row .delta-plus { color: var(--emerald); font-family: var(--font-pixel); font-size: 11px; }
.wallet-row .delta-minus { color: var(--redstone); font-family: var(--font-pixel); font-size: 11px; }

/* ── Pricing ─────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--coal);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam);
  padding: 32px 28px 28px;
}
.price-card.featured {
  background: linear-gradient(170deg, #241a10, var(--coal) 65%);
  box-shadow: inset 0 0 0 2px rgba(255, 122, 26, 0.55), 0 24px 60px rgba(255, 122, 26, 0.08);
}
.price-flag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-pixel);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: var(--ember);
  padding: 5px 9px;
  clip-path: var(--pixel-clip);
}
.price-tier {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mute);
}
.price-card.featured .price-tier { color: var(--ember-hot); }
.price-amount {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  margin-top: 16px;
  line-height: 1;
}
.price-amount small { font-size: 15px; font-weight: 600; color: var(--mute); }
.price-credits {
  margin-top: 8px;
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.price-list { list-style: none; margin: 22px 0 26px; display: grid; gap: 10px; flex: 1; }
.price-list li {
  font-size: 14.5px;
  color: var(--bone);
  padding-left: 24px;
  position: relative;
}
.price-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 9px; height: 9px;
  background: var(--emerald);
}
.price-list li.li-x { color: var(--mute); }
.price-list li.li-x::before { background: #3a322a; }
.price-note {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--mute);
}

/* ── FAQ ─────────────────────────────────────────── */
.faq { max-width: 760px; }
.faq details {
  background: var(--coal);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam);
  padding: 0 22px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::after { content: '+'; font-family: var(--font-pixel); color: var(--ember); }
.faq details[open] summary::after { content: '-'; }
.faq details p { padding-bottom: 20px; color: var(--bone); font-size: 14.5px; }

/* ── CTA band & footer ───────────────────────────── */
.cta-band {
  text-align: center;
  padding: 90px 24px;
  background:
    radial-gradient(600px 240px at 50% 100%, rgba(255, 122, 26, 0.14), transparent 70%),
    var(--coal);
  border-top: 1px solid var(--seam);
}
.cta-band h2 { font-size: clamp(30px, 4.5vw, 50px); font-weight: 800; }
.cta-band p { margin: 16px auto 32px; color: var(--bone); max-width: 46ch; }

.footer {
  border-top: 1px solid var(--seam);
  padding: 36px 0 44px;
  font-size: 13.5px;
  color: var(--mute);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  justify-content: space-between;
  align-items: center;
}
.footer a:hover { color: var(--parchment); }
.footer-links { display: flex; gap: 22px; }

/* ── Auth & account pages ────────────────────────── */
.auth-wrap {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 48px 20px;
  position: relative;
  z-index: 1;
}
.auth-card {
  width: min(430px, 100%);
  background: linear-gradient(170deg, var(--slate), var(--coal) 75%);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam-strong), 0 30px 70px rgba(0, 0, 0, 0.55);
  padding: 38px 34px 34px;
}
.auth-card h1 { font-size: 28px; font-weight: 800; margin: 16px 0 6px; }
.auth-card .auth-sub { color: var(--bone); font-size: 14.5px; margin-bottom: 26px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 7px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--parchment);
  background: #0a0806;
  border: none;
  box-shadow: inset 0 0 0 1px var(--seam-strong);
}
.field input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--ember), 0 0 16px var(--ember-glow);
}
.auth-error {
  display: none;
  margin: 0 0 16px;
  padding: 11px 14px;
  background: rgba(239, 74, 68, 0.1);
  box-shadow: inset 0 0 0 1px rgba(239, 74, 68, 0.4);
  color: #ff9c98;
  font-size: 13.5px;
}
.auth-error.show { display: block; }
.auth-alt { margin-top: 22px; text-align: center; font-size: 14px; color: var(--mute); }
.auth-alt a { color: var(--ember-hot); }
.auth-plan-note {
  margin-bottom: 20px;
  padding: 11px 14px;
  background: rgba(255, 122, 26, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 26, 0.35);
  font-size: 13.5px;
  color: var(--ember-hot);
}

/* account layout */
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 22px;
  padding: 48px 0 80px;
}
.account-grid h1 { grid-column: 1 / -1; font-size: 34px; font-weight: 800; }
.panel {
  background: var(--coal);
  clip-path: var(--pixel-clip);
  box-shadow: inset 0 0 0 1px var(--seam);
  padding: 28px 26px;
}
.panel h2 { font-size: 19px; margin-bottom: 18px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ledger-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--seam);
  color: var(--bone);
}
.ledger-table td:last-child { text-align: right; font-family: var(--font-pixel); font-size: 11px; }
.ledger-empty { color: var(--mute); font-size: 14px; }
.toast-success {
  grid-column: 1 / -1;
  padding: 14px 18px;
  background: rgba(63, 208, 108, 0.1);
  box-shadow: inset 0 0 0 1px rgba(63, 208, 108, 0.4);
  color: var(--emerald);
  clip-path: var(--pixel-clip);
  font-size: 14.5px;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-scene { min-height: 300px; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-split, .account-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-inner { gap: 10px; padding: 12px 16px; }
  .nav .btn { padding: 9px 13px; font-size: 13px; white-space: nowrap; }
  .nav .btn-ghost { padding: 9px 6px; }
  .brand { font-size: 17px; }
  .brand-cube { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .vox, .vox-float, .spark, .format-track { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
