:root {
  --bg: #0c0d10;
  --bg-2: #13151a;
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(232, 196, 106, 0.18);
  --gold: #e8c46a;
  --gold-2: #f6e2a4;
  --gold-deep: #b48a35;
  --steel: #cdd4dc;
  --text: #ece8df;
  --muted: #a39d90;
  --clover: #e77fb4;
  --shiba: #e0893d;
  --radius: 18px;
  --serif: "Cinzel", Georgia, serif;
  --body-serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(232, 196, 106, 0.10), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, rgba(231, 127, 180, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.1; margin: 0; }

#sparks {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 45%, var(--gold-deep));
  color: #1b1408;
  box-shadow: 0 8px 30px rgba(232, 196, 106, .28), inset 0 1px 0 rgba(255,255,255,.6);
}
.btn-gold:hover { box-shadow: 0 12px 40px rgba(232, 196, 106, .45), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--gold); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.btn-lg { padding: 1.1rem 2.2rem; font-size: 1.15rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  transition: background .3s ease, border-color .3s ease, padding .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12, 13, 16, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
  padding-top: .65rem; padding-bottom: .65rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-weight: 900; font-size: 1.15rem;
  color: var(--text); text-decoration: none; letter-spacing: .04em;
}
.brand img { border-radius: 50%; border: 1px solid var(--gold); }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: var(--gold); }
.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 7rem clamp(1rem, 5vw, 4rem) 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/knight.jpg") center / cover no-repeat;
  filter: blur(40px) saturate(1.1) brightness(.35);
  transform: scale(1.2);
  z-index: 0;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,13,16,.2) 0%, rgba(12,13,16,.55) 60%, var(--bg) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .28em;
  font-size: .75rem; font-weight: 600;
  color: var(--gold);
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 6.2rem);
  font-weight: 900;
  letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff 0%, var(--steel) 55%, #8a929c 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 30px rgba(232,196,106,.15));
}
.hero h1 span {
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text;
}
.ticker {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--clover);
  letter-spacing: .12em;
  margin: .4rem 0 1.2rem;
}
.lede {
  font-family: var(--body-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--text);
  max-width: 34rem;
  margin: 0 0 2rem;
  line-height: 1.45;
}

.ca {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .55rem .55rem .55rem 1rem;
  max-width: 36rem;
  margin-bottom: 1.6rem;
}
.ca-label {
  font-family: var(--serif); font-weight: 700; font-size: .8rem;
  color: var(--gold); letter-spacing: .1em;
  flex-shrink: 0;
}
.ca code {
  flex: 1; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
  color: var(--steel);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ca-copy {
  display: inline-flex; align-items: center; gap: .4rem;
  background: rgba(232,196,106,.12);
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .5rem .8rem;
  font: 600 .85rem var(--sans);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
.ca-copy:hover { background: rgba(232,196,106,.25); }
.ca-copy.copied { background: var(--gold); color: #1b1408; }

.cta-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 1.6rem; }

.socials { display: flex; gap: .7rem; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255,255,255,.04);
  transition: all .2s;
}
.socials a:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-2px); }

.hero-art { position: relative; justify-self: center; width: min(100%, 460px); }
.hero-art img {
  position: relative; z-index: 1;
  width: 100%; height: auto;
  border-radius: 28px;
  border: 1px solid rgba(232,196,106,.4);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 8px rgba(232,196,106,.06);
  animation: float 6s ease-in-out infinite;
}
.halo {
  position: absolute; inset: -12%;
  background: radial-gradient(circle, rgba(246,226,164,.45), rgba(232,196,106,.12) 40%, transparent 70%);
  filter: blur(20px);
  animation: pulse 4s ease-in-out infinite;
}
.badge {
  position: absolute; z-index: 2;
  right: -18px; bottom: 28px;
  background: linear-gradient(180deg, #1c1d22, #101114);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: .7rem 1rem;
  font-family: var(--serif); font-weight: 700; color: var(--gold);
  text-align: center; line-height: 1.1;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  transform: rotate(4deg);
  animation: float 6s ease-in-out infinite reverse;
}
.badge small { font-family: var(--body-serif); font-style: italic; color: var(--clover); font-size: .95rem; font-weight: 500; }

.scroll-hint {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px; z-index: 2;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold); border-radius: 2px;
  animation: scroll 1.8s ease-in-out infinite;
}

@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes pulse { 0%, 100% { opacity: .7; scale: 1; } 50% { opacity: 1; scale: 1.06; } }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 2;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(232,196,106,.08), rgba(231,127,180,.06), rgba(232,196,106,.08));
  padding: 1rem 0;
}
.marquee-track {
  display: flex; gap: 2rem; width: max-content;
  animation: marquee 30s linear infinite;
  font-family: var(--serif); font-weight: 700; letter-spacing: .15em;
  white-space: nowrap;
}
.marquee-track span { color: var(--text); }
.marquee-track i { font-style: normal; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  padding: clamp(5rem, 10vw, 8rem) clamp(1rem, 5vw, 3rem);
  scroll-margin-top: 40px;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.section-head h2, .oath-card h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 60%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub {
  font-family: var(--body-serif); font-style: italic;
  font-size: 1.3rem; color: var(--muted); margin: 1rem 0 0;
}

/* Chapters */
.chapters {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem;
}
.chapter {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 2rem 2rem;
  overflow: hidden;
}
.chapter::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--gold), transparent);
}
.numeral {
  position: absolute; right: 1.2rem; top: .2rem;
  font-family: var(--serif); font-weight: 900;
  font-size: 4.5rem; color: rgba(232,196,106,.08);
  line-height: 1;
}
.chapter h3 { font-size: 1.45rem; color: var(--text); margin-bottom: .8rem; }
.chapter p {
  font-family: var(--body-serif);
  font-size: 1.22rem; line-height: 1.6;
  color: #d7d2c6; margin: 0;
}
.chapter em { color: var(--clover); }
.chapter strong { color: var(--gold); }
.chapter q { color: var(--gold-2); font-style: italic; }
.chapter-final {
  grid-column: 1 / -1;
  text-align: center;
  background: radial-gradient(600px 200px at 50% 0%, rgba(232,196,106,.12), transparent), rgba(255,255,255,.03);
}
.chapter-final::before { display: none; }
.chapter-final p { max-width: 46rem; margin: 0 auto; }

/* Oath */
.oath-section { max-width: 900px; }
.oath-card {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.2rem, 5vw, 4rem);
  border-radius: 28px;
  border: 1px solid rgba(232,196,106,.35);
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(232,196,106,.15), transparent 70%),
    linear-gradient(180deg, #17181d, #0f1013);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.oath-list {
  list-style: none; padding: 0; margin: 2.2rem auto 2.4rem;
  max-width: 36rem; text-align: left;
  display: grid; gap: .95rem;
}
.oath-list li {
  display: flex; gap: 1rem; align-items: baseline;
  font-family: var(--body-serif); font-size: 1.3rem; color: var(--text);
  padding-bottom: .95rem; border-bottom: 1px dashed rgba(232,196,106,.15);
}
.oath-list li:last-child { border-bottom: 0; }
.oath-list span { color: var(--gold); flex-shrink: 0; width: 1.2rem; text-align: center; }
.oath-list li:nth-child(even) span { color: var(--clover); }
.sworn {
  margin: 1.4rem 0 0;
  font-family: var(--body-serif); font-style: italic; font-size: 1.3rem;
  color: var(--gold-2);
}

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 2rem; }
.stat {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem;
  padding: 2rem 1rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .25s, border-color .25s;
}
.stat:hover { transform: translateY(-4px); border-color: var(--gold); }
.stat-icon { font-size: 1.8rem; margin-bottom: .4rem; }
.stat strong { font-family: var(--serif); font-size: 1.45rem; color: var(--gold); }
.stat span:last-child { color: var(--muted); font-size: .9rem; }
.ca-wide { max-width: 760px; margin: 0 auto; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
.step {
  position: relative;
  padding: 2rem 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
.step-num {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  font-family: var(--serif); font-weight: 900; font-size: 1.2rem;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  color: #1b1408;
  margin-bottom: 1rem;
  box-shadow: 0 0 0 6px rgba(232,196,106,.1);
}
.step h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Chart */
.chart-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0a0b0d;
  aspect-ratio: 16 / 9;
  min-height: 420px;
}
.chart-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chart-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 1rem; }

/* Final */
.final {
  position: relative; z-index: 2;
  text-align: center;
  padding: 6rem 1rem 7rem;
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
}
.final-img {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 60px rgba(232,196,106,.4);
}
.final h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; color: var(--steel); }
.final h2 span { color: var(--gold); }

/* Footer */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  padding: 3rem clamp(1rem, 5vw, 3rem) 2.5rem;
  text-align: center;
  background: #090a0c;
}
.footer-brand {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--serif); font-weight: 700; color: var(--text);
}
.footer-brand img { border-radius: 50%; border: 1px solid var(--gold); }
.disclaimer { max-width: 720px; margin: 1.4rem auto 0; color: #77726a; font-size: .82rem; }
.copy { color: #5b5750; font-size: .8rem; margin: 1rem 0 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 2rem; z-index: 100;
  transform: translate(-50%, 150%);
  background: var(--gold); color: #1b1408;
  font-family: var(--serif); font-weight: 700;
  padding: .8rem 1.4rem; border-radius: 999px;
  box-shadow: 0 10px 40px rgba(232,196,106,.4);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3);
}
.toast.show { transform: translate(-50%, 0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .stats, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(78vw, 300px);
    flex-direction: column; gap: 1.6rem;
    padding: 6rem 2rem 2rem;
    background: rgba(12,13,16,.97);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .35s ease;
    margin-left: 0;
  }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.15rem; color: var(--text); }
  .nav .btn-sm { margin-left: auto; }
  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 10px;
    background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; position: relative; z-index: 60;
  }
  .burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
  .burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-art { order: -1; width: min(78%, 360px); }
  .lede, .ca { margin-left: auto; margin-right: auto; }
  .cta-row, .socials { justify-content: center; }
  .badge { right: -8px; }
  .chapters { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .stats, .steps { grid-template-columns: 1fr; }
  .ca { flex-wrap: wrap; }
  .ca code { flex-basis: 100%; order: 2; white-space: normal; word-break: break-all; font-size: .8rem; }
  .ca-copy { margin-left: auto; }
  .chapter { padding: 1.8rem 1.3rem; }
  .chart-frame { aspect-ratio: auto; height: 480px; }
  .cta-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
