:root {
  --bg: #0e0a0b;
  --bg-2: #140d0f;
  --panel: #1b1215;
  --panel-2: #23171b;
  --line: rgba(212, 162, 58, 0.16);
  --line-2: rgba(212, 162, 58, 0.36);
  --gold: #d4a23a;
  --gold-hi: #f2d58a;
  --gold-lo: #8a5a12;
  --ivory: #f3ece0;
  --muted: #b5a693;
  --wine: #5e1620;
  --wine-2: #7b1f2c;
  --ok: #8fc79a;
  --err: #ef8a7c;
  --radius: 14px;
  --maxw: 1180px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
.wrap { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.6rem; }
p { margin: 0; }
.lede { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.eyebrow {
  display: inline-block;
  font: 600 0.74rem/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.gold-text {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rule {
  width: 120px; height: 1px; margin: 22px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 10, 11, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand span { font: 700 1.5rem/1 var(--serif); letter-spacing: 0.14em; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.92rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--ivory); }
.nav-links a.btn-gold, .nav-links a.btn-gold:hover { color: #2a1606; }
.icon-link { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 50%; }
.icon-link svg { width: 16px; height: 16px; fill: currentColor; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.85em 1.5em; border-radius: 999px;
  font: 600 0.95rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #2a1606; box-shadow: 0 6px 22px rgba(212, 162, 58, 0.22); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(212, 162, 58, 0.34); }
.btn-ghost { background: transparent; color: var(--ivory); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--gold); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn-sm { padding: 0.6em 1.1em; font-size: 0.85rem; }
.btn .short { display: none; }
@media (max-width: 480px) { .btn .long { display: none; } .btn .short { display: inline; } }
.btn svg { width: 15px; height: 15px; fill: currentColor; }

/* ------------------------------------------------------------------ gilt frame for pixel art */
.frame {
  position: relative; margin: 0; padding: 7px;
  background: linear-gradient(135deg, #f6dc8e 0%, #c8932e 26%, #8a5a12 50%, #d9a640 72%, #f2d58a 100%);
  border-radius: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 240, 200, 0.4);
}
.frame::after { content: ""; position: absolute; inset: 5px; box-shadow: inset 0 0 0 2px rgba(60, 32, 8, 0.85); pointer-events: none; }
.frame img { width: 100%; height: auto; image-rendering: pixelated; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; }
.hero picture img { width: 100%; height: auto; image-rendering: pixelated; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero-copy { text-align: center; padding: 26px 0 70px; }
.hero-copy .lede { margin: 0 auto 30px; text-align: center; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ------------------------------------------------------------------ sections */
section { padding: 96px 0; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head .lede { margin: 18px auto 0; text-align: center; }
.band { background: radial-gradient(1200px 400px at 50% 0%, rgba(123, 31, 44, 0.32), transparent 70%), var(--bg-2); border-block: 1px solid var(--line); }

.marquee { overflow: hidden; padding: 30px 0 44px; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; gap: 22px; width: max-content; animation: drift 90s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .frame { width: 190px; flex: none; }
@keyframes drift { to { transform: translateX(-50%); } }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; }
.fact b { display: block; font: 600 1.7rem/1.1 var(--serif); color: var(--gold-hi); margin-bottom: 6px; }
.fact span { color: var(--muted); font-size: 0.85rem; letter-spacing: 0.04em; }

.build { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.build .frame { max-width: 470px; margin-inline: auto; }
.steps-list { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 4px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.steps-list li:last-child { border-bottom: 0; }
.steps-list img { width: 56px; height: 56px; border-radius: 4px; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--line-2); }
.steps-list h3 { font-size: 1.25rem; }
.steps-list h3::before { content: counter(s, upper-roman) ". "; color: var(--gold); }
.steps-list p { color: var(--muted); font-size: 0.92rem; }

.rarities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.rarity { text-align: center; }
.rarity .frame { max-width: 300px; margin: 0 auto 22px; }
.rarity h3 { margin-bottom: 6px; }
.rarity .odds { color: var(--gold); font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; }
.rarity p { color: var(--muted); margin-top: 8px; }

.salon { display: grid; grid-template-columns: repeat(6, 1fr); gap: 40px 22px; }
.salon .frame:nth-child(4n+2) { transform: translateY(18px); }
.salon .frame:nth-child(4n+3) { transform: translateY(-8px); }

.petition {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--line-2); border-radius: 22px; padding: 72px 28px;
  background: radial-gradient(800px 300px at 50% -20%, rgba(212, 162, 58, 0.18), transparent 70%), linear-gradient(180deg, var(--wine-2), var(--wine));
}
.petition .crest { width: 74px; margin: 0 auto 18px; image-rendering: pixelated; }
.petition .lede { margin: 16px auto 30px; color: #e6d6c2; text-align: center; }

.roadmap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; }
.roadmap::before {
  content: ""; position: absolute; top: 34px; left: 16.7%; right: 16.7%; height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 30%, var(--line-2) 50%, var(--line) 100%);
}
.phase { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.phase-node {
  position: relative; z-index: 1; width: 68px; height: 68px; margin-bottom: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line-2);
  font: 600 1.5rem/1 var(--serif); color: var(--muted);
}
.phase.current .phase-node {
  color: #2a1606; border-color: var(--gold); background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 0 0 6px rgba(212, 162, 58, 0.12), 0 0 30px rgba(212, 162, 58, 0.35);
  animation: glow 3s ease-in-out infinite;
}
@keyframes glow { 50% { box-shadow: 0 0 0 10px rgba(212, 162, 58, 0.06), 0 0 44px rgba(212, 162, 58, 0.5); } }
.phase-card { flex: 1; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 28px; }
.phase.current .phase-card { border-color: var(--line-2); background: radial-gradient(420px 180px at 50% 0%, rgba(212, 162, 58, 0.12), transparent 70%), var(--panel); }
.phase-status { display: inline-block; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; font: 600 0.7rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.phase.current .phase-status { color: #2a1606; background: var(--gold); }
.phase.sealed .phase-status { color: var(--muted); border: 1px solid var(--line-2); }
.phase-card h3 { font-size: 1.45rem; margin-bottom: 16px; }
.phase.sealed h3 { color: var(--muted); }
.phase-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; text-align: left; color: var(--muted); }
.phase-card li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.phase-card li::before { content: "✦"; color: var(--gold); }
.phase .seal { width: 96px; height: 96px; margin: 2px auto 14px; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.phase.sealed p { color: var(--muted); font-size: 0.92rem; font-style: italic; }

.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 600 1.28rem/1.3 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; color: var(--gold); font: 400 1.6rem/1 var(--sans); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 20px; max-width: 70ch; }

.notice { display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 20px 22px; }
.notice svg { flex: none; width: 22px; height: 22px; fill: var(--gold); margin-top: 2px; }
.notice p { color: var(--muted); font-size: 0.94rem; }
.notice strong { color: var(--ivory); }

footer { border-top: 1px solid var(--line); padding: 40px 0 54px; color: var(--muted); font-size: 0.88rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ivory); }

/* ------------------------------------------------------------------ allowlist page */
.page-head { text-align: center; padding: 70px 0 34px; }
.page-head .crest { width: 82px; margin: 0 auto 16px; image-rendering: pixelated; }
.page-head .lede { margin: 16px auto 0; text-align: center; }
.counter { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--gold-hi); font-size: 0.9rem; }
.counter::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

.petition-grid { display: grid; grid-template-columns: 0.95fr 1.25fr; gap: 26px; align-items: start; padding-bottom: 90px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.card h2 { font-size: 1.9rem; margin-bottom: 6px; }
.card p.sub { color: var(--muted); margin-bottom: 22px; font-size: 0.95rem; }

.task { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.task-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font: 600 1.05rem/1 var(--serif); color: var(--gold); transition: background 0.2s, color 0.2s; }
.task.done .task-num { background: var(--gold); color: #2a1606; border-color: var(--gold); }
.task.done .task-num span { display: none; }
.task.done .task-num::after { content: "✓"; font: 700 0.95rem/1 var(--sans); }
.task h3 { font: 600 1rem/1.3 var(--sans); }
.task p { color: var(--muted); font-size: 0.84rem; }
.task .hint { color: var(--gold); }

.field { margin-bottom: 18px; }
.field label, .field legend { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; }
.field label small, .field legend small { color: var(--muted); font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.input { position: relative; }
.input .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
input[type="text"], select {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  background: var(--bg-2); color: var(--ivory); border: 1px solid var(--line-2);
  font: 500 0.98rem/1.2 var(--sans); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.input.has-prefix input { padding-left: 30px; }
input[type="text"]:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 162, 58, 0.18); }
input.invalid { border-color: var(--err); }
input.valid { border-color: rgba(143, 199, 154, 0.7); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.msg { min-height: 1.2em; font-size: 0.82rem; margin-top: 6px; color: var(--muted); }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { margin: 0; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); cursor: pointer; font-weight: 500; font-size: 0.9rem; transition: all 0.15s; }
.chips input:checked + span { background: rgba(212, 162, 58, 0.16); border-color: var(--gold); color: var(--gold-hi); }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(212, 162, 58, 0.3); }

.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; margin-bottom: 12px; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold); }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-error { display: none; margin: 4px 0 16px; padding: 12px 14px; border-radius: 10px; background: rgba(239, 138, 124, 0.1); border: 1px solid rgba(239, 138, 124, 0.4); color: var(--err); font-size: 0.9rem; }
.form-error.show { display: block; }
.privacy { margin-top: 18px; color: var(--muted); font-size: 0.8rem; }

.success { display: none; text-align: center; padding: 26px 8px; }
.success.show { display: block; }
.success .crest { width: 70px; margin: 0 auto 14px; image-rendering: pixelated; }
.success h2 { margin-bottom: 10px; }
.success p { color: var(--muted); margin-bottom: 22px; }
.success .seal { display: inline-block; margin-bottom: 22px; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--gold-hi); font-size: 0.9rem; }

/* ------------------------------------------------------------------ motion */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .phase.current .phase-node { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .build { grid-template-columns: 1fr; gap: 40px; }
  .salon { grid-template-columns: repeat(4, 1fr); }
  .petition-grid { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: 1fr; gap: 22px; }
  .roadmap::before { top: 0; bottom: 0; left: 33px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--gold), var(--line-2) 40%, var(--line)); }
  .phase { display: grid; grid-template-columns: 68px 1fr; gap: 18px; align-items: start; text-align: left; }
  .phase-node { margin: 0; }
  .phase .seal { margin-left: 0; }
}
@media (max-width: 900px) {
  .nav-links a:not(.btn):not(.icon-link) { display: none; }
}
@media (max-width: 720px) {
  section { padding: 70px 0; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .rarities { grid-template-columns: 1fr; }
  .salon { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .salon .frame { transform: none !important; padding: 5px; }
  .marquee .frame { width: 140px; }
  .row { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .task { grid-template-columns: 34px 1fr; }
  .task .btn { grid-column: 2; justify-self: start; }
  footer .wrap { flex-direction: column; text-align: center; }
}
