@font-face {
  font-family: "Cinzel";
  src: url("../assets/fonts/cinzel.woff2") format("woff2-variations");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel Decorative";
  src: url("../assets/fonts/cinzel-decorative.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../assets/fonts/newsreader-italic.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/fonts/plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --wall: #161c17;
  --wall-2: #10150f;
  --moss: #2a3a2c;
  --brass: #c6a25a;
  --brass-dark: #8a6d32;
  --brass-deep: #5c471c;
  --card: #f3efe4;
  --card-2: #e7e0cf;
  --ink: #16140f;
  --ink-soft: #3d382e;
  --pond: #3f6a4e;
  --glass: rgba(243, 239, 228, 0.06);
  --display: "Cinzel", "Palatino Linotype", serif;
  --ornament: "Cinzel Decorative", "Cinzel", serif;
  --serif: "Newsreader", "Georgia", serif;
  --mono: "IBM Plex Mono", "Courier New", ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  color: var(--card);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  background:
    linear-gradient(180deg, rgba(16,21,15,0.55), rgba(16,21,15,0.2) 28%, rgba(16,21,15,0.55)),
    url("../assets/ui/wall.jpg");
  background-size: auto, 420px 420px;
  background-color: var(--wall-2);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}
.skip:focus {
  left: 8px;
  z-index: 80;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
}

/* ----- Header ----- */
.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 10px 28px;
  background: rgba(16, 21, 15, 0.92);
  border-bottom: 1px solid var(--brass-dark);
  backdrop-filter: blur(8px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  object-position: left center;
  background: var(--card);
  padding: 4px 8px;
  border: 1px solid var(--brass);
}
.brand-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0;
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav a { text-decoration: none; color: var(--card-2); }
.nav a:hover { color: var(--brass); }
.bar-actions { display: flex; gap: 8px; flex: none; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 11px 18px;
  border: 1px solid var(--brass-deep);
  cursor: pointer;
  background: var(--brass);
  color: var(--ink);
  box-shadow: 0 1px 0 #fff3 inset, 0 2px 0 var(--brass-deep);
}
.btn:hover { background: #d4b56a; }
.btn.ghost {
  background: var(--card);
  color: var(--ink);
}
.btn.ghost:hover { background: #fffaf0; }
.btn.soon,
.btn[aria-disabled="true"] {
  background: #cfc6b0;
  color: var(--ink-soft);
  cursor: default;
  pointer-events: none;
  box-shadow: none;
  border-style: dashed;
}

/* ----- Hero ----- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 28px 20px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 36px;
  align-items: center;
  container-type: inline-size;
  container-name: hero;
}
.vitrine {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(198,162,90,0.16), transparent 55%),
    linear-gradient(180deg, #1c241d, #0f130f);
  border: 1px solid var(--brass-dark);
  box-shadow:
    0 0 0 8px #1a201b,
    0 0 0 9px var(--brass-deep),
    0 24px 50px #0008;
  padding: 28px 24px 20px;
  min-width: 0;
}
.vitrine::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.14) 0%, transparent 36%, transparent 58%, rgba(255,255,255,0.05) 100%);
}
.vitrine .mount {
  display: grid;
  place-items: center;
  min-height: 0;
}
.vitrine .mount img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(68vh, 620px);
  object-fit: contain;
  object-position: center;
}
.vitrine figcaption,
.plate figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  text-align: center;
  margin: 14px 0 0;
}
.acc {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 10px;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 10px;
}
h1, .display {
  font-family: var(--ornament);
  font-weight: 400;
  font-size: clamp(2.4rem, 12cqi, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
  color: var(--card);
  text-wrap: balance;
}
.deck {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--card-2);
  max-width: 38ch;
  margin: 0 0 22px;
}
.hero-copy, .hero-art { min-width: 0; }

.plaque {
  background-color: var(--card);
  background-image: url("../assets/ui/plaster.jpg");
  background-size: 280px 280px;
  color: var(--ink);
  border: 1px solid var(--brass);
  box-shadow: 0 8px 0 var(--brass-deep);
  padding: 14px 16px 16px;
  max-width: 100%;
}
.plaque p {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.ca {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: #fffdf6;
  border: 1px dashed var(--brass-deep);
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.ca span {
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.ca code { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-all; }
.ca em { font-style: normal; color: var(--pond); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ----- Sections ----- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 28px;
  container-type: inline-size;
  scroll-margin-top: 76px;
}
.section h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 9cqi, 3.6rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.sec-lead {
  font-style: italic;
  color: var(--card-2);
  max-width: 62ch;
  margin: 0 0 28px;
}
.rule {
  height: 1px;
  border: 0;
  margin: 0 auto;
  max-width: 1180px;
  background: linear-gradient(90deg, transparent, var(--brass-dark), transparent);
}

/* Lore */
.lore-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: start;
}
.lore-art { display: grid; gap: 16px; min-width: 0; }
.plate {
  background: #0e120e;
  border: 1px solid var(--brass-dark);
  padding: 14px 14px 12px;
  box-shadow: 0 0 0 6px #171d18, 0 0 0 7px var(--brass-deep);
}
.plate .mount { background: #f7f4ea; padding: 10px; }
.plate .mount img,
.frame .mount img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.timeline li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid #ffffff14;
}
.timeline time {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  padding-top: 4px;
}
.sources {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.sources a { color: var(--brass); }

/* Tokenomics plaques */
.records {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.record {
  background-color: var(--card);
  background-image: url("../assets/ui/plaster.jpg");
  background-size: 240px 240px;
  color: var(--ink);
  padding: 18px 18px 20px;
  border: 1px solid var(--brass);
  min-width: 0;
}
.record .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin: 0 0 8px;
}
.record .value {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.4rem, 6cqi, 2rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.record .note { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps li {
  background: var(--glass);
  border: 1px solid #c6a25a44;
  padding: 18px 16px 20px;
  min-width: 0;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--brass);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.steps h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 15px;
  margin: 0 0 8px;
}
.steps p { margin: 0; color: var(--card-2); font-size: 16px; }

/* Gallery */
.collection {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
}
.frame {
  background: #0e120e;
  border: 1px solid var(--brass-dark);
  padding: 12px 12px 10px;
  box-shadow: 0 10px 24px #0006;
  min-width: 0;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px #0008;
  z-index: 1;
}
.frame .mount { background: #111; }
.frame figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 10px 2px 4px;
}

/* FAQ */
.notes { display: grid; gap: 0; border-top: 1px solid #c6a25a44; }
.note-item {
  border-bottom: 1px solid #c6a25a44;
  padding: 16px 0;
}
.note-item h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 16px;
  margin: 0 0 8px;
}
.note-item p { margin: 0; color: var(--card-2); }
.note-item code { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; word-break: break-all; }

/* Footer */
.footer {
  border-top: 1px solid var(--brass-dark);
  padding: 36px 28px 48px;
  max-width: 1180px;
  margin: 0 auto;
  container-type: inline-size;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 28px;
}
.footer h2, .footer h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--brass);
  margin: 0 0 10px;
}
.footer p, .footer li { font-size: 14px; color: var(--card-2); }
.footer a { color: var(--brass); }
.footer ul { margin: 0; padding-left: 18px; }
.colophon {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #c6a25a33;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-dark);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Reveal */
.reveal { opacity: 1; }
.reveal.is-waiting { opacity: 0; transform: translateY(16px); }
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ----- Responsive: art before copy on phones/tablets ----- */
@media (max-width: 1080px) {
  .records, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .bar { padding: 8px 16px; }
  .brand-meta { display: none; }
  .nav { display: none; }
  .hero, .section, .footer { padding-left: 16px; padding-right: 16px; }
  .hero {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
  }
  .hero-art { order: -1; width: 100%; }
  .lore-grid { grid-template-columns: 1fr; }
  .lore-art { order: -1; }
  .vitrine .mount img { max-height: min(58vh, 480px); }
  h1 { font-size: clamp(2.2rem, 16cqi, 3.6rem); }
}
@media (max-width: 560px) {
  .records, .steps, .collection, .footer-grid { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .bar-actions .btn.ghost { display: none; }
}

@media (max-height: 430px) and (max-width: 900px) {
  .bar { padding-top: 4px; padding-bottom: 4px; }
  .brand img { height: 36px; }
  .hero { padding-top: 8px; gap: 12px; }
  .vitrine { padding: 10px 12px 8px; }
  .vitrine .mount img { max-height: calc(100svh - 9.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .frame, .reveal, .btn, .vitrine::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal.is-waiting { opacity: 1; transform: none; }
  .frame:hover { transform: none; }
}
