:root {
  --earth: #100a03;
  --earth-2: #1a1005;
  --ore: #2a1907;
  --panel: #171009;
  --paper: #f7ead1;
  --paper-dim: #d8c49b;
  --muted: #a9956f;
  --gold: #f0c14b;
  --gold-2: #b9851f;
  --gold-3: #ffd86b;
  --green: #77d17b;
  --line: rgba(240, 193, 75, 0.22);
  --line-strong: rgba(240, 193, 75, 0.38);
  --max: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--earth);
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 216, 107, 0.22), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(185, 133, 31, 0.18), transparent 34%),
    linear-gradient(180deg, #120a02, #1b1005 42%, #0b0703);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(240, 193, 75, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 193, 75, 0.035) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(#000, transparent 82%);
}

img, svg { display: block; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
code { font-family: var(--mono); }
.svg-defs { position: absolute; width: 0; height: 0; }

svg use,
.btn svg,
.iconbtn svg,
.copybtn svg,
.prooflink svg,
.benefit-grid svg,
.chart-pending svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(16, 10, 3, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}

.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav a,
.eyebrow,
.stats span,
.contract-band span,
.status-grid span,
.book h3,
.feed h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topnav a { color: var(--paper-dim); font-weight: 700; }
.topnav a:hover,
.topnav a:focus-visible { color: var(--gold-3); }
.topbar__actions,
.hero__actions,
.join__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.btn,
.iconbtn,
.copybtn {
  border-radius: 8px;
  border: 1px solid transparent;
}

.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn svg { width: 17px; height: 17px; }
.btn--small { min-height: 40px; padding: 0 15px; font-size: 0.9rem; }
.btn--gold {
  color: #1a1005;
  background: linear-gradient(135deg, #fff1a6, #f0c14b 42%, #b9851f 76%, #ffe08a);
  box-shadow: 0 16px 36px rgba(240, 193, 75, 0.2);
}
.btn--ghost {
  color: var(--paper);
  border-color: var(--line);
  background: rgba(247, 234, 209, 0.045);
}
.btn:hover,
.btn:focus-visible { transform: translateY(-2px); }
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--gold); }
.btn[aria-disabled="true"],
.iconbtn[aria-disabled="true"] { opacity: 0.52; pointer-events: none; }

.iconbtn,
.copybtn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--paper);
  border-color: var(--line);
  background: rgba(247, 234, 209, 0.045);
}
.iconbtn svg,
.copybtn svg { width: 17px; height: 17px; }
.iconbtn:hover,
.copybtn:hover { color: var(--gold-3); border-color: var(--gold); }

.hero {
  position: relative;
  min-height: 720px;
  isolation: isolate;
  overflow: hidden;
}

.hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 10, 3, 0.94), rgba(16, 10, 3, 0.66) 48%, rgba(16, 10, 3, 0.18)),
    linear-gradient(180deg, transparent 66%, var(--earth));
}

.hero__inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 92px 24px 118px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
}

.eyebrow { color: var(--gold); margin: 0 0 12px; font-weight: 700; }
.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.2rem, 9vw, 8.2rem);
  line-height: 0.87;
  font-weight: 400;
  letter-spacing: 0;
}

.hero__lede {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--paper-dim);
  font-size: 1.14rem;
}

.hero__links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}

.prooflink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--gold-3);
  background: rgba(16, 10, 3, 0.54);
}
.prooflink svg { width: 16px; height: 16px; }
.hero__actions { margin-top: 30px; }

.hero__coin {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px;
  background: rgba(16, 10, 3, 0.42);
  box-shadow: var(--shadow);
}
.hero__coin img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: cover;
}
.coin__caption {
  margin-top: 10px;
  color: var(--gold-3);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: center;
  text-transform: uppercase;
}

.stats {
  width: min(100%, var(--max));
  margin: -68px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0 24px;
}
.stats div {
  min-height: 132px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(23, 16, 9, 0.9);
  backdrop-filter: blur(14px);
}
.stats div:first-child { border-radius: 8px 0 0 8px; }
.stats div:last-child { border-radius: 0 8px 8px 0; }
.stats span,
.stats small { color: var(--muted); font-family: var(--mono); }
.stats strong {
  display: block;
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 400;
  line-height: 1;
  overflow-wrap: anywhere;
}
.stats small { display: block; margin-top: 10px; font-size: 0.75rem; }

.contract-band {
  width: min(calc(100% - 48px), var(--max));
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 16, 9, 0.72);
}
.contract-band span { color: var(--muted); }
.contract-band code {
  color: var(--gold-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.benefits,
.ledger,
.chartsec,
.join,
.foot {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 104px 24px;
}

.section-head { max-width: 750px; }
.section-head--center { margin: 0 auto; text-align: center; }
.section-head h2,
.join h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.95;
}
.section-head p:not(.eyebrow),
.join p {
  margin: 18px 0 0;
  color: var(--paper-dim);
  font-size: 1.06rem;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.benefit-grid article,
.book,
.feed,
.status-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 234, 209, 0.06), rgba(247, 234, 209, 0.025));
}
.benefit-grid article {
  min-height: 240px;
  padding: 22px;
}
.benefit-grid svg { width: 28px; height: 28px; color: var(--gold); }
.benefit-grid h3 {
  margin: 54px 0 0;
  font-size: 1.1rem;
}
.benefit-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}
.benefit-grid code { color: var(--gold-3); overflow-wrap: anywhere; }

.status-panel {
  position: relative;
  margin-top: 36px;
  padding: 24px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  color: var(--paper-dim);
}
.status-pill small { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.dot.paper { background: var(--gold); }
.dot.live { background: var(--green); box-shadow: 0 0 0 6px rgba(119, 209, 123, 0.15); }
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.status-grid div {
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 10, 3, 0.42);
}
.status-grid span { color: var(--muted); }
.status-grid strong {
  display: block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.books {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.book { padding: 22px; }
.book h3,
.feed h3 { margin: 0 0 10px; color: var(--gold); }
.brow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.brow span { color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }
.brow strong { font-family: var(--mono); font-size: 0.9rem; text-align: right; overflow-wrap: anywhere; }

.feeds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.feed {
  min-height: 220px;
  padding: 22px;
}
.feed__list { display: grid; gap: 9px; }
.feed__item {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 10, 3, 0.46);
}
.feed__item strong { color: var(--paper); font-family: var(--mono); font-size: 0.82rem; overflow-wrap: anywhere; }
.feed__item span,
.feed__empty { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }

.chart-shell {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.chart-shell iframe { width: 100%; height: 620px; border: 0; background: var(--panel); }
.chart-pending {
  min-height: 460px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
}
.chart-pending svg { width: 44px; height: 44px; color: var(--gold); }
.chart-pending strong { color: var(--paper); font-family: var(--serif); font-weight: 400; font-size: 2rem; }

.join {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
}
.join img {
  width: 100%;
  min-height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.join__actions { margin-top: 26px; }

.foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-top: 42px;
  padding-bottom: 60px;
  border-top: 1px solid var(--line);
}
.foot strong { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.foot p { max-width: 760px; margin: 0; color: var(--muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  padding: 11px 18px;
  border-radius: 8px;
  background: var(--gold-3);
  color: var(--earth);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .topnav { display: none; }
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 70px; }
  .hero__coin { max-width: 340px; }
  .stats,
  .benefit-grid,
  .status-grid,
  .feeds { grid-template-columns: 1fr 1fr; }
  .books,
  .join { grid-template-columns: 1fr; }
  .stats div:first-child,
  .stats div:last-child { border-radius: 8px; }
}

@media (max-width: 620px) {
  .topbar { padding: 10px 16px; }
  .brand span:last-child { display: none; }
  .hero__inner,
  .benefits,
  .ledger,
  .chartsec,
  .join,
  .foot { padding-left: 18px; padding-right: 18px; }
  .stats,
  .benefit-grid,
  .status-grid,
  .feeds { grid-template-columns: 1fr; }
  .contract-band { grid-template-columns: 1fr auto; width: calc(100% - 36px); }
  .contract-band span { grid-column: 1 / -1; }
  .brow { grid-template-columns: 1fr; }
  .brow strong { text-align: left; }
  .foot { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
