/* Mistake — Certified Regret
   Palette: paper #F2EFE9 · ink #111111 · red #E03A2F · blue #1D4ED8
   yellow #FFE84A · gold #D4AF37 · green #2F7D5B · void #141414 */

:root {
  --paper: #F2EFE9;
  --ink: #111111;
  --red: #E03A2F;
  --blue: #1D4ED8;
  --yellow: #FFE84A;
  --gold: #D4AF37;
  --green: #2F7D5B;
  --void: #141414;
  --font-display: 'Archivo Black', 'Arial Black', sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --max-w: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
.mono { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.08em; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: var(--ink); }
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo { text-decoration: none; display: inline-flex; flex-direction: column; gap: 3px; }
.nav-logo-word {
  font-family: var(--font-display); color: var(--paper);
  font-size: 22px; letter-spacing: 0.28em; line-height: 1;
}
.nav-logo-rule { width: 100%; height: 4px; background: var(--red); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) {
  color: #B9B5AC; text-decoration: none; font-family: var(--font-mono);
  font-weight: 700; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
}
.nav-links a:not(.btn):hover { color: var(--paper); }

.mint-banner {
  background: var(--yellow); color: var(--ink); text-align: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; padding: 8px 16px;
}
.mint-live { background: var(--red); color: #fff; }
.mint-soldout { background: var(--void); color: var(--paper); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 15px 30px; border: 3px solid var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.btn-red { background: var(--red); border-color: var(--ink); color: #fff; }
.btn-outline { background: transparent; color: inherit; }
.btn-small { padding: 9px 20px; font-size: 13px; background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-large { padding: 19px 44px; font-size: 17px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  max-width: var(--max-w); margin: 0 auto; padding: 72px 24px 56px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center;
}
.hero-kicker { font-size: 13px; color: var(--red); margin-bottom: 18px; }
.hero-title {
  font-family: var(--font-display); font-size: clamp(64px, 11vw, 148px);
  letter-spacing: 0.06em; line-height: 0.95;
}
.hero-rule { width: min(420px, 70%); height: 12px; background: var(--red); margin: 22px 0; }
.hero-sub { font-size: 19px; max-width: 46ch; color: #333; }
.hero-actions { display: flex; gap: 16px; margin: 32px 0 40px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats dt { font-size: 11px; color: #777; letter-spacing: 0.16em; }
.hero-stats dd { font-size: 21px; margin-top: 4px; }

.hero-art { position: relative; justify-self: center; }
.case-frame {
  background: var(--paper); border: 4px solid var(--ink); padding: 14px;
  box-shadow: 10px 10px 0 rgba(17, 17, 17, 0.12); max-width: 420px;
}
.case-frame img { width: 100%; height: auto; border: 2px solid var(--ink); }
.case-frame figcaption {
  background: var(--ink); color: var(--paper); font-size: 13px;
  padding: 8px 12px; margin-top: 12px; display: flex; justify-content: space-between;
}
.stamp {
  position: absolute; z-index: 2; font-family: var(--font-mono); font-weight: 700;
  border: 4px solid currentColor; padding: 8px 18px; letter-spacing: 0.14em;
  font-size: 15px; transform: rotate(-10deg); background: rgba(242, 239, 233, 0.85);
}
.stamp-blue { color: var(--blue); top: -18px; right: -26px; }
.stamp-green { color: var(--green); }
.stamp-red { color: var(--red); }

/* ---------- ticker ---------- */
.ticker { background: var(--ink); overflow: hidden; border-block: 3px solid var(--ink); }
.ticker-track {
  white-space: nowrap; display: inline-block; padding: 12px 0;
  color: var(--yellow); font-family: var(--font-mono); font-size: 13px;
  letter-spacing: 0.1em; animation: tick 38s linear infinite;
}
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } html { scroll-behavior: auto; } .btn:hover { transform: none; } }

/* ---------- clearance notice ---------- */
.notice { background: var(--yellow); border-block: 4px solid var(--ink); }
.notice-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 30px 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 34px; align-items: center;
}
.notice-label { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.notice-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--red); flex: none;
  box-shadow: 0 0 0 4px rgba(224, 58, 47, 0.28); animation: noticePulse 1.6s ease-in-out infinite;
}
@keyframes noticePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(224, 58, 47, 0.28); }
  50% { box-shadow: 0 0 0 9px rgba(224, 58, 47, 0.04); }
}
.notice-title {
  font-family: var(--font-display); font-size: clamp(26px, 3.6vw, 44px);
  letter-spacing: 0.03em; line-height: 1.02; margin: 12px 0 10px;
}
.notice-sub { max-width: 62ch; font-size: 16px; color: #2A2A2A; }
.notice-action { display: grid; gap: 12px; justify-items: start; }
.notice-status { font-size: 12px; color: var(--green); letter-spacing: 0.12em; }
@media (max-width: 760px) { .notice-inner { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .notice-dot { animation: none; } }

/* ---------- sections ---------- */
.section { max-width: var(--max-w); margin: 0 auto; padding: 88px 24px; }
.section-dark { background: var(--void); color: var(--paper); max-width: none; }
.section-dark > * { max-width: var(--max-w); margin-left: auto; margin-right: auto; }
.section-head h2 {
  font-family: var(--font-display); font-size: clamp(34px, 5vw, 58px);
  letter-spacing: 0.04em; line-height: 1.05; margin-top: 10px;
}
.section-label { color: var(--red); font-size: 13px; }
.section-dark .section-label { color: var(--gold); }
.section-intro { max-width: 60ch; margin-top: 18px; font-size: 17px; opacity: 0.85; }

/* ---------- lore ---------- */
.lore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
.lore-card {
  border: 3px solid var(--ink); background: #FBFAF5; padding: 34px;
  font-size: 17px; position: relative;
}
.lore-card p + p { margin-top: 16px; }
.lore-card-accent { background: var(--paper); box-shadow: 8px 8px 0 rgba(224, 58, 47, 0.18); }
.lore-stamp {
  display: inline-block; margin-top: 22px; color: var(--green);
  border: 3px solid currentColor; padding: 6px 14px; font-size: 13px;
  transform: rotate(-4deg);
}

/* ---------- traits ---------- */
.traits-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px; margin-top: 40px;
}
.trait-card { border: 2px solid #3A3A3A; padding: 22px; background: #1C1C1C; }
.trait-count { color: var(--gold); font-size: 15px; }
.trait-card h3 { font-family: var(--font-body); font-weight: 700; font-size: 19px; margin: 10px 0 6px; }
.trait-note { font-size: 13.5px; color: #A5A29B; }

/* ---------- gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px; margin-top: 40px;
}
.token {
  position: relative; border: none; background: none; cursor: zoom-in; padding: 0;
  transition: transform 0.14s ease;
}
.token:hover { transform: translateY(-4px); }
.token img { width: 100%; height: auto; border: 3px solid var(--ink); background: var(--paper); }
.token-id {
  position: absolute; right: 8px; bottom: 8px; background: var(--ink);
  color: var(--paper); font-size: 11px; padding: 3px 7px;
}
.gallery-note { margin-top: 26px; font-size: 13px; color: #777; }

/* ---------- legends ---------- */
.legend-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 240px;
  gap: 18px; margin-top: 40px; overflow-x: auto; padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}
.legend-card { scroll-snap-align: start; border: 3px solid var(--gold); background: #1C1C1C; }
.legend-card img { width: 100%; height: auto; }
.legend-card figcaption { padding: 12px 14px; display: grid; gap: 4px; }
.legend-name { color: var(--gold); font-size: 12.5px; }
.legend-id { color: #8B8880; font-size: 11.5px; }

/* ---------- roadmap ---------- */
.roadmap { list-style: none; margin-top: 40px; display: grid; gap: 20px; counter-reset: phase; }
.roadmap-item {
  border: 3px solid var(--ink); background: #FBFAF5; padding: 30px 34px;
  position: relative; max-width: 780px;
}
.roadmap-item h3 { font-size: 21px; margin-bottom: 8px; }
.roadmap-item p { color: #444; max-width: 58ch; }
.roadmap-stamp { position: absolute; top: -14px; right: 22px; font-size: 12px; padding: 5px 12px; background: var(--paper); }

/* ---------- faq ---------- */
.faq { margin-top: 36px; max-width: 800px; }
.faq details { border: 2px solid #3A3A3A; background: #1C1C1C; margin-bottom: 12px; }
.faq summary {
  cursor: pointer; padding: 20px 24px; font-weight: 700; list-style: none;
  position: relative; padding-right: 56px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 24px; color: var(--gold);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding: 0 24px 22px; color: #C9C6BE; max-width: 62ch; }
.faq details p a { color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; }
.faq details p a:hover { color: #fff; }

/* ---------- cta ---------- */
.cta { text-align: center; padding: 110px 24px; }
.cta-title { font-family: var(--font-display); font-size: clamp(34px, 6vw, 72px); letter-spacing: 0.04em; }
.cta-rule { width: 320px; height: 10px; background: var(--red); margin: 24px auto; }
.cta-sub { color: #666; margin-bottom: 36px; font-size: 14px; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--paper); }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 54px 24px 40px;
  display: grid; gap: 26px;
}
.footer-brand .nav-logo-rule { max-width: 180px; }
.footer-tag { font-size: 12px; color: #8B8880; margin-top: 10px; }
.footer-links { display: flex; gap: 30px; flex-wrap: wrap; }
.footer-links a { color: var(--paper); text-decoration: none; font-size: 13px; }
.footer-links a:hover { color: var(--yellow); }
.footer-fine { font-size: 12.5px; color: #77746D; max-width: 72ch; }

/* ---------- lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 300; background: rgba(20, 20, 20, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.lightbox[hidden] { display: none; }
.lightbox img { width: min(82vw, 640px); height: auto; border: 4px solid var(--paper); }
.lightbox-caption { color: var(--paper); font-size: 14px; }
.lightbox-close {
  position: absolute; top: 18px; right: 26px; background: none; border: none;
  color: var(--paper); font-size: 44px; cursor: pointer; line-height: 1;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-art { justify-self: start; }
  .lore-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 520px) {
  .section { padding: 64px 18px; }
  .hero-stats { gap: 22px; }
  .legend-row { grid-auto-columns: 200px; }
}

/* ---------- certificate of regret ---------- */
.regret-main { max-width: var(--max-w); margin: 0 auto; padding: 64px 24px 40px; }
.regret-kicker { color: var(--red); font-size: 13px; margin-bottom: 14px; }
.regret-title { font-family: var(--font-display); font-size: clamp(38px, 6vw, 72px); letter-spacing: 0.04em; }
.regret-sub { max-width: 58ch; margin-top: 18px; font-size: 17px; color: #333; }
.regret-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 48px; align-items: start; }
.regret-form { display: grid; gap: 10px; }
.regret-form label { font-size: 13px; letter-spacing: 0.12em; margin-top: 12px; }
.form-hint { color: #999; font-weight: 500; }
.regret-form textarea, .regret-form input[type="text"] {
  font-family: var(--font-body); font-size: 17px; padding: 14px 16px;
  border: 3px solid var(--ink); background: #FBFAF5; resize: vertical;
}
.regret-form textarea:focus, .regret-form input:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.verdict-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.verdict-chip {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: 0.08em;
  padding: 10px 16px; border: 3px solid var(--ink); background: transparent; cursor: pointer;
}
.verdict-chip:hover { background: #E9E5DA; }
.verdict-chip.is-active { background: var(--ink); color: var(--paper); }
.form-fine { font-size: 11px; color: #999; margin-top: 8px; }
.regret-preview { position: sticky; top: 96px; }
.cert-img { width: 100%; height: auto; border: 4px solid var(--ink); box-shadow: 10px 10px 0 rgba(17,17,17,0.12); background: var(--paper); }
.preview-empty {
  border: 3px dashed #B9B4A6; padding: 80px 24px; text-align: center;
  color: #999; font-size: 14px; line-height: 2;
}
.preview-actions { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.regret-faq { margin-top: 64px; padding: 26px; border: 3px solid var(--ink); background: #FBFAF5; }
.regret-faq p { font-size: 14px; line-height: 2.1; color: #444; }
@media (max-width: 900px) {
  .regret-grid { grid-template-columns: 1fr; }
  .regret-preview { position: static; }
}
