:root {
  --ink: #0d0a08;
  --ink-soft: #1a130f;
  --cream: #f6ead0;
  --paper: #e7d1a2;
  --gold: #f4bb3e;
  --gold-deep: #b66d1b;
  --red: #b30d14;
  --red-bright: #df1920;
  --line: rgba(246, 234, 208, 0.17);
  --mono: "DM Mono", monospace;
  --condensed: "Oswald", sans-serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --title: "Cinzel Decorative", Georgia, serif;
  --section-title: "Cinzel", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--cream);
  background: var(--ink);
  font-family: var(--mono);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

.page-grain {
  /* Grain belongs to the opening scene only — the scroll stays clean. */
  position: absolute;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  pointer-events: none;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  min-height: 96px;
  padding: 12px clamp(18px, 4vw, 72px);
  border-bottom: 1px solid transparent;
  transition: background 200ms ease, border-color 200ms ease, min-height 200ms ease;
}

.site-header.is-scrolled {
  min-height: 78px;
  border-color: var(--line);
  background: rgba(13, 10, 8, 0.93);
  backdrop-filter: blur(12px);
}

.brand, .brand-seal, .brand-copy, .ticker-line, .chart-heading, footer div { display: flex; align-items: center; }

.brand { justify-self: start; gap: 10px; }

.brand-seal {
  width: 56px;
  height: 56px;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 1px rgba(244, 187, 62, 0.6);
}

.brand-seal img { width: 66px; height: 66px; object-fit: contain; }

.brand-copy { flex-direction: column; align-items: flex-start; line-height: 1; letter-spacing: 0.02em; }
.brand-copy > span { font-family: var(--condensed); font-weight: 700; font-size: 22px; }
.brand-copy small { margin-top: 5px; color: var(--gold); font-size: 10px; letter-spacing: 0.2em; }

nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); }
nav a { font-size: 12px; letter-spacing: 0.1em; opacity: 0.66; transition: color 180ms, opacity 180ms; }
nav a:hover { color: var(--gold); opacity: 1; }

.buy-button {
  justify-self: end;
  display: inline-flex;
  gap: 18px;
  align-items: center;
  padding: 14px 15px 14px 20px;
  color: var(--ink);
  background: var(--gold);
  font-family: var(--condensed);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: background 180ms ease, transform 180ms ease;
}
.buy-button:hover { background: #ffd168; transform: translateY(-2px); }
.buy-arrow { display: grid; width: 29px; height: 29px; place-items: center; color: var(--cream); background: var(--red); font-family: var(--mono); }

.hero {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 130px clamp(22px, 7vw, 126px) 60px;
  background: url("assets/images/mcnapoleon-hero-background.png") center center / cover no-repeat;
  isolation: isolate;
}

.hero-copy {
  align-self: center;
  max-width: 535px;
  padding: 22px 0;
  transform: scale(1.44);
  transform-origin: left center;
}

/* A leather spine overlaps both scenes, so the parchment reads as the next page of one book. */
.book-binding {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 58px);
  width: 100%;
  height: clamp(92px, 8.2vw, 132px);
  margin: clamp(-54px, -3vw, -38px) 0;
  overflow: hidden;
  border-top: 3px solid #8e4b12;
  border-bottom: 3px solid #8e4b12;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(130, 65, 21, 0.42), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255, 214, 127, 0.035) 0 1px, transparent 1px 8px),
    linear-gradient(90deg, #130a07 0%, #3b1d12 12%, #1d0d09 31%, #4a2415 50%, #1d0d09 69%, #3b1d12 88%, #130a07 100%);
  box-shadow:
    0 -14px 30px rgba(0, 0, 0, 0.44),
    0 16px 30px rgba(0, 0, 0, 0.56),
    inset 0 1px rgba(255, 224, 150, 0.28),
    inset 0 -1px rgba(0, 0, 0, 0.78);
}

.book-binding::before,
.book-binding::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(244, 187, 62, 0.68) 13%, rgba(255, 225, 149, 0.82) 50%, rgba(244, 187, 62, 0.68) 87%, transparent);
  box-shadow: 0 2px 0 rgba(6, 3, 2, 0.74);
}

.book-binding::before { top: 15px; }
.book-binding::after { bottom: 15px; }

.book-binding__rule {
  position: relative;
  z-index: 1;
  display: block;
  width: min(22vw, 300px);
  height: 10px;
  border-top: 1px solid rgba(255, 219, 128, 0.76);
  border-bottom: 1px solid rgba(255, 219, 128, 0.48);
  background: linear-gradient(90deg, transparent, rgba(244, 187, 62, 0.9) 13%, rgba(244, 187, 62, 0.9) 87%, transparent) center / 100% 1px no-repeat;
}

.book-binding__rule::before,
.book-binding__rule::after {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  content: "";
  border: 1px solid rgba(255, 219, 128, 0.8);
  transform: translateY(-50%) rotate(45deg);
  background: #32170e;
}

.book-binding__rule::before { left: 7%; }
.book-binding__rule::after { right: 7%; }

.book-binding__seal {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 auto;
  width: clamp(62px, 5.6vw, 84px);
  height: clamp(62px, 5.6vw, 84px);
  place-items: center;
  border: 1px solid rgba(255, 218, 130, 0.92);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 229, 163, 0.18), transparent 23%),
    radial-gradient(circle, #5f2714 0%, #270e0a 63%, #120705 100%);
  box-shadow:
    0 0 0 5px #24100a,
    0 0 0 6px rgba(244, 187, 62, 0.56),
    0 7px 13px rgba(0, 0, 0, 0.62),
    inset 0 0 14px rgba(0, 0, 0, 0.7);
}

.book-binding__seal img {
  width: 76%;
  height: 76%;
  object-fit: contain;
  filter: sepia(0.18) saturate(0.9) contrast(1.06);
}
.eyebrow, .section-index, .roadmap-kicker { margin: 0; color: var(--gold); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; }
.eyebrow { display: flex; gap: 9px; align-items: center; margin-bottom: 16px; }
.eyebrow span { display: inline-block; width: 22px; height: 1px; background: var(--gold); }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 700; }
h1 {
  max-width: 550px;
  margin-bottom: 18px;
  color: var(--cream);
  font-family: var(--title);
  font-size: clamp(56px, 5.4vw, 94px);
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 0.9;
}
h1 span { display: block; color: var(--red-bright); letter-spacing: -0.015em; text-shadow: 2px 2px 0 var(--gold-deep); }

.hero-statement { max-width: 405px; margin: 28px 0; color: rgba(246, 234, 208, 0.78); font-size: 13px; line-height: 1.75; }
.ticker-line { gap: 11px; margin-bottom: 24px; color: rgba(246, 234, 208, 0.57); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.ticker-line strong { color: var(--cream); font-family: var(--condensed); font-size: 18px; font-weight: 600; letter-spacing: 0.02em; }
.ticker-line i { width: 4px; height: 4px; border-radius: 50%; background: var(--red-bright); }

.social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-width: 462px; }
.social-button {
  display: grid;
  grid-template-columns: 25px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 57px;
  padding: 9px 12px;
  border: 1px solid rgba(246, 234, 208, 0.24);
  background: rgba(22, 14, 10, 0.65);
  font-family: var(--condensed);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.social-button:hover { transform: translate(-3px, -3px); border-color: var(--gold); background: rgba(179, 13, 20, 0.28); }
.social-button img { width: 23px; height: 23px; object-fit: contain; }
.social-button.pump img { width: 27px; height: 27px; border-radius: 4px; }
.social-button.dex img { border-radius: 5px; }
.social-button b { color: var(--gold); font-family: var(--mono); font-size: 15px; font-weight: 400; }
.section-shell { max-width: 1600px; margin: 0 auto; padding: 138px clamp(22px, 7vw, 126px); }
.parchment-zone {
  position: relative;
  padding: clamp(34px, 5vw, 92px) 20px;
  background:
    linear-gradient(rgba(13, 10, 8, 0.50), rgba(13, 10, 8, 0.66)),
    url("assets/images/roadmap-chart-background.png") center / cover no-repeat;
}

.paper-scroll {
  width: clamp(700px, 40vw, 980px);
  margin: 0 auto;
  background: url("assets/images/torn-imperial-scroll-v2.png") center / 100% 100% no-repeat;
}
.paper-scroll .roadmap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(30px, 3vw, 48px); }
.paper-scroll .section-shell { padding: clamp(86px, 7vw, 128px) clamp(54px, 5vw, 84px) 58px; }
.paper-scroll .chart-section { padding: 56px clamp(54px, 5vw, 84px) clamp(94px, 8vw, 136px); }
.paper-scroll iframe { height: clamp(360px, 25vw, 460px); }
.paper-scroll h2 { font-size: clamp(43px, 3.7vw, 66px); }
.paper-scroll .roadmap-list { min-width: 0; }
.paper-scroll .roadmap-list li { grid-template-columns: 52px minmax(0, 1fr); gap: 14px; }
.paper-scroll .roadmap-list li > div { min-width: 0; }
#roadmap, #chart { scroll-margin-top: 110px; }
.roadmap { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: clamp(42px, 9vw, 166px); color: var(--ink); background: transparent; }
.section-intro { max-width: 395px; }
.section-index { margin-bottom: 16px; color: var(--red); }
h2 { margin-bottom: 27px; font-family: var(--display); font-size: clamp(45px, 5.2vw, 76px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.87; }
h2 em { color: var(--red); font-style: italic; }
.section-intro > p:last-child { color: rgba(13, 10, 8, 0.76); font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.4; }
.roadmap-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(13, 10, 8, 0.24); }
.roadmap-list li { display: grid; grid-template-columns: 76px 1fr; gap: 24px; padding: 23px 0 25px; border-bottom: 1px solid rgba(13, 10, 8, 0.24); transition: padding-left 180ms ease, background 180ms ease; }
.roadmap-list li:hover { padding-left: 14px; background: rgba(179, 13, 20, 0.055); }
.roadmap-number { color: var(--red); font-family: var(--display); font-size: 44px; font-style: italic; font-weight: 700; line-height: 0.85; }
.roadmap-kicker { margin-bottom: 8px; color: var(--gold-deep); font-size: 9px; }
.roadmap-list h3 { margin-bottom: 9px; font-family: var(--section-title); font-size: 18px; font-weight: 800; letter-spacing: 0.045em; line-height: 1.25; text-transform: uppercase; }
.roadmap-list p:last-child { max-width: 500px; margin: 0; color: rgba(13, 10, 8, 0.72); font-family: var(--display); font-size: 16px; font-weight: 600; line-height: 1.35; }

.chart-section { max-width: 1600px; margin: 0 auto; padding: 122px clamp(22px, 7vw, 126px) 136px; background: transparent; }
.chart-heading { justify-content: space-between; gap: 30px; margin-bottom: 35px; }
.chart-heading h2 { margin: 0; color: var(--ink); }
.chart-heading .section-index { color: var(--red); }
.chart-heading > a { flex: 0 0 auto; padding-bottom: 7px; border-bottom: 1px solid var(--red); color: var(--red); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.chart-heading > a span { margin-left: 4px; font-size: 15px; }
.chart-window { overflow: hidden; border: 1px solid rgba(246, 234, 208, 0.28); background: #101314; box-shadow: 18px 18px 0 rgba(179, 13, 20, 0.65); }
.chart-window-bar { display: flex; gap: 7px; align-items: center; min-height: 45px; padding: 0 14px; border-bottom: 1px solid rgba(246, 234, 208, 0.16); background: #181614; }
.chart-window-bar span { width: 8px; height: 8px; border-radius: 50%; background: #6f231e; }
.chart-window-bar span:nth-child(2) { background: var(--gold-deep); }
.chart-window-bar span:nth-child(3) { background: #567548; }
.chart-window-bar strong { margin-left: 10px; color: rgba(246, 234, 208, 0.64); font-size: 9px; font-weight: 400; letter-spacing: 0.11em; }
.chart-window-bar i { margin-left: auto; color: #98d780; font-family: var(--mono); font-size: 9px; font-style: normal; letter-spacing: 0.12em; }
iframe { display: block; width: 100%; height: 640px; border: 0; background: #101314; }
.chart-note { margin: 26px 0 0; color: rgba(13, 10, 8, 0.72); font-family: var(--display); font-size: 15px; font-weight: 600; line-height: 1.4; }
.chart-note code { color: var(--red); }
code { color: var(--gold); font-family: var(--mono); }

footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; min-height: 105px; padding: 22px clamp(22px, 7vw, 126px); border-top: 1px solid var(--line); background: #090706; color: rgba(246, 234, 208, 0.58); font-size: 9px; letter-spacing: 0.11em; text-transform: uppercase; }
footer div { gap: 8px; color: var(--cream); font-family: var(--condensed); font-size: 15px; }
footer img { width: 31px; height: 31px; object-fit: contain; }
footer p { margin: 0; }
footer a { padding-bottom: 4px; border-bottom: 1px solid rgba(246, 234, 208, 0.3); }

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 76px; padding: 10px 17px; }
  nav { display: none; }
  .brand-seal { width: 45px; height: 45px; }
  .brand-seal img { width: 54px; height: 54px; }
  .brand-copy > span { font-size: 18px; }
  .buy-button { gap: 9px; padding: 10px 10px 10px 14px; font-size: 13px; }
  .buy-arrow { width: 25px; height: 25px; }
  .hero { height: auto; min-height: 100svh; padding: 100px 22px 55px; background-position: 63% center; }
  .hero-copy { max-width: none; padding: 5px 0 38px; transform: none; }
  .book-binding { height: 86px; margin: -30px 0; border-top-width: 2px; border-bottom-width: 2px; }
  .book-binding::before { top: 12px; }
  .book-binding::after { bottom: 12px; }
  .book-binding__rule { width: min(26vw, 170px); }
  h1 { font-size: clamp(61px, 18.2vw, 98px); }
  .hero-statement { max-width: 355px; margin: 24px 0; }
  .section-shell { padding: 85px 22px; }
  .parchment-zone { padding: 20px 9px; }
  .paper-scroll { width: 100%; }
  .paper-scroll .roadmap { grid-template-columns: 1fr; gap: 35px; }
  .paper-scroll .section-shell { padding: 82px 52px 48px; }
  .paper-scroll .chart-section { padding: 48px 52px 86px; }
  .paper-scroll iframe { height: 430px; }
  .roadmap { grid-template-columns: 1fr; gap: 35px; }
  .section-intro { max-width: 480px; }
  .chart-section { padding: 85px 22px 96px; }
  .chart-heading { display: block; }
  .chart-heading > a { display: inline-block; margin-bottom: 31px; }
iframe { height: 560px; }
  footer { flex-wrap: wrap; padding: 25px 22px; }
}

@media (max-width: 480px) {
  .brand-copy small { display: none; }
  h1 { font-size: clamp(52px, 13.5vw, 65px); }
  .social-grid { grid-template-columns: 1fr; max-width: none; }
  .social-button { min-height: 50px; }
  .ticker-line { flex-wrap: wrap; gap: 8px; }
  .roadmap-list li { grid-template-columns: 51px 1fr; gap: 12px; }
  .roadmap-number { font-size: 32px; }
  .roadmap-list h3 { font-size: 22px; }
  .paper-scroll .section-shell { padding: 62px 36px 42px; }
  .paper-scroll .chart-section { padding: 40px 36px 72px; }
  .paper-scroll iframe { height: 340px; }
  .chart-window { box-shadow: 8px 8px 0 rgba(179, 13, 20, 0.65); }
  .chart-window-bar strong { overflow: hidden; max-width: 150px; white-space: nowrap; text-overflow: ellipsis; }
  iframe { height: 510px; }
  footer { display: grid; grid-template-columns: 1fr 1fr; }
  footer p { display: none; }
  footer a { justify-self: end; }
}

[hidden] { display: none !important; }
