/* First-Dollar Sparks — mint site styles. Plain CSS, no framework. */
:root {
  --bg: #0f0a06; --bg2: #1a120b; --card: #211710; --line: #3a2a1a;
  --ink: #f5ead9; --muted: #b8a88f; --orange: #ff8c1a; --orange2: #ffb347;
  --gold: #f5b301; --green: #4ade80; --red: #f87171; --blue: #35d0ff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: var(--orange2); }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; word-break: break-all; }

/* topbar */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(15,10,6,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo { color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.logo b { color: var(--orange); }
.nav-links { display: flex; gap: 14px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.nav-links a:hover { color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-badge { font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: #1a120b; background: var(--gold); border-radius: 999px; padding: 3px 9px; }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle button { background: transparent; border: 0; color: var(--muted); padding: 5px 12px; cursor: pointer; font-size: .85rem; }
.lang-toggle button.active { background: var(--orange); color: #1a120b; font-weight: 700; }
.load-banner { background: #5b1a1a; color: #ffd9d9; text-align: center; padding: 10px 16px; font-size: .92rem; }

/* hero */
.hero { padding: 64px 0 40px; background: radial-gradient(700px 320px at 50% -40px, rgba(255,140,26,.28), transparent 70%); text-align: center; }
.eyebrow { color: var(--orange2); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin: 0 0 10px; }
.hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.2; margin: 0 0 14px; }
.grad { background: linear-gradient(90deg, var(--orange), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subtitle { color: var(--muted); font-size: 1.08rem; max-width: 640px; margin: 0 auto 22px; }
.subtitle strong { color: var(--ink); }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-live { margin-top: 18px; color: var(--muted); }
.hero-live .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-right: 6px; }

/* buttons */
.btn-primary, .btn-ghost, .btn-small, .btn-mint {
  display: inline-block; border-radius: 999px; cursor: pointer; font-weight: 700;
  text-decoration: none; border: 1px solid transparent; font-family: inherit;
}
.btn-primary { background: var(--orange); color: #1a120b; padding: 11px 24px; font-size: 1rem; }
.btn-primary:hover { background: var(--orange2); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); padding: 11px 24px; font-size: 1rem; }
.btn-ghost:hover { border-color: var(--orange); }
.btn-ghost:disabled { opacity: .45; cursor: not-allowed; }
.btn-small { background: var(--card); color: var(--ink); border-color: var(--line); padding: 6px 14px; font-size: .88rem; }
.btn-small:hover { border-color: var(--orange); }
.btn-mint { display: block; width: 100%; background: var(--orange); color: #1a120b; padding: 14px; font-size: 1.08rem; margin-top: 14px; }
.btn-mint:hover { background: var(--orange2); }
.btn-mint:disabled { opacity: .45; cursor: not-allowed; }

/* sections */
.section { padding: 48px 0; }
.section-head { text-align: center; margin-bottom: 26px; }
.section-title { font-size: 1.7rem; margin: 0 0 8px; }
.section-note { color: var(--muted); max-width: 640px; margin: 0 auto; }
.stats-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); padding: 26px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 900; color: var(--gold); }
.stat-num em { font-style: normal; font-size: 1.1rem; }
.stat-label { color: var(--muted); font-size: .88rem; }
.progress-wrap { margin-top: 20px; }
.progress-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.progress-track { height: 10px; background: #2c2013; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--gold)); transition: width .6s; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-icon { font-size: 1.6rem; }
.card-num { float: right; font-weight: 900; color: var(--gold); }
.card-num em { font-style: normal; }
.card h3 { margin: 10px 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.fee-note { max-width: 760px; margin: 22px auto 0; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 10px; padding: 14px 18px; color: var(--muted); font-size: .95rem; }
.fee-note strong { color: var(--ink); }

/* claim */
.claim { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 0; }
.free-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0; margin: 0 0 22px; }
.free-steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-num { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 50%; background: var(--orange); color: #1a120b; font-weight: 900; }
.free-steps h3 { margin: 10px 0 4px; }
.free-steps p { color: var(--muted); margin: 0; font-size: .95rem; }
.demo-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 760px; margin: 0 auto; }
.demo-tag { color: var(--orange2); font-weight: 700; font-size: .85rem; margin: 0 0 12px; }
.demo-input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-input-row input {
  flex: 1; min-width: 220px; background: #120c07; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-size: 1rem; font-family: inherit;
}
.demo-result { margin: 12px 0 0; min-height: 1.4em; }
.demo-result.ok { color: var(--green); }
.demo-result.bad { color: var(--red); }
.demo-foot { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }

/* mint panel */
.mint-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 760px; margin: 0 auto; }
.mint-live { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.mint-big { font-size: 1.25rem; font-weight: 800; }
.mint-sub { color: var(--muted); font-size: .92rem; margin: 4px 0 10px; }
.mint-sub .live { color: var(--green); font-weight: 700; }
.mint-sub .paused { color: var(--red); font-weight: 700; }
.mint-err { color: var(--red); font-size: .9rem; }
.price-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.price-rows > div { background: #120c07; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.price-rows span { display: block; color: var(--muted); font-size: .85rem; }
.price-rows strong { font-size: .95rem; }
.wallet-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wallet-info { color: var(--muted); }
.wallet-note { color: var(--muted); font-size: .9rem; }
.my-state { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.my-state > div { background: #120c07; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.my-state span { color: var(--muted); font-size: .85rem; }
.warn { color: #fbbf24; font-size: .9rem; }
.ok { color: var(--green); font-size: .9rem; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; flex-wrap: wrap; }
.qty-ctl { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-ctl button { background: var(--card); color: var(--ink); border: 0; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; }
.qty-ctl button:hover { background: #2c2013; }
.qty-ctl span { min-width: 44px; text-align: center; font-weight: 800; font-size: 1.1rem; }
.qty-max { color: var(--muted); font-size: .9rem; }
.fee-box { background: #120c07; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-top: 12px; }
.fee-box > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.fee-box span { color: var(--muted); }
.mint-hint { color: var(--muted); font-size: .92rem; text-align: center; margin: 10px 0 0; }
.mint-status { text-align: center; min-height: 1.4em; margin: 8px 0 0; }
.mint-status.err { color: var(--red); }

/* my nfts */
.nft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto; }
.nft-grid .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); }
.nft-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 12px; cursor: pointer; color: var(--ink); font-family: inherit;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
}
.nft-card:hover { border-color: var(--orange); }
.nft-card.selected { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange) inset; background: #2c1f10; }
.nft-id { font-weight: 900; font-size: 1.1rem; }
.nft-trait, .nft-rarity { font-size: .9rem; color: var(--muted); }
.nft-rarity { font-weight: 800; }
.nft-rarity.rN { color: #9ca3af; } .nft-rarity.rR { color: var(--blue); }
.nft-rarity.rSR { color: #a78bfa; } .nft-rarity.rSSR { color: var(--gold); }
.nft-sel { color: var(--green); font-weight: 700; font-size: .85rem; }

/* apex */
.apex-live { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.apex-live > div { background: #120c07; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.apex-live span { color: var(--muted); font-size: .85rem; display: block; }
.apex-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.apex-actions .btn-mint { width: auto; flex: 1; min-width: 200px; margin-top: 0; }
.apex-actions .btn-ghost { padding: 14px 20px; }

/* contracts */
.contracts-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; max-width: 760px; margin: 0 auto; }
.contracts-box h3 { margin: 0 0 12px; }
.contracts-box dl { margin: 0; }
.contracts-box dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.contracts-box dt { color: var(--muted); }
.contracts-box dd { margin: 0; word-break: break-all; font-size: .92rem; }
.contracts-note { color: var(--muted); font-size: .9rem; }
.mainnet-tbd { background: #2c2013; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; color: var(--muted); }

/* faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 4px 18px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.faq-item p { color: var(--muted); margin: 0 0 14px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 36px 0 28px; background: var(--bg2); }
.footer-inner { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-brand { flex: 1; min-width: 240px; }
.footer-tag { color: var(--muted); font-size: .92rem; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.footer-col a, .footer-col span { display: block; color: var(--ink); text-decoration: none; font-size: .92rem; margin-bottom: 6px; }
.footer-col a:hover { color: var(--orange2); }
.footer-meta { color: var(--muted); font-size: .85rem; margin-top: 24px; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards, .free-steps { grid-template-columns: 1fr; }
  .price-rows, .my-state, .apex-live { grid-template-columns: 1fr 1fr; }
  .contracts-box dl > div { grid-template-columns: 1fr; gap: 2px; }
  .nav-links { display: none; }
}
