:root {
  color-scheme: dark;
  --ink: #08080a;
  --paper: #e9e7e2;
  --muted: #8c8b91;
  --line: rgba(233, 231, 226, .14);
  --violet: #8f79ff;
  --cyan: #79d8ef;
  --copper: #d29469;
  --side: clamp(22px, 5vw, 76px);
  --image-x: 0px;
  --image-y: 0px;
  --scroll-y: 0px;
  --scene-scale: 1.08;
  --coin-rx: 0deg;
  --coin-ry: 0deg;
  --wheel-ry: 0deg;
  --board-rx: 0deg;
  --board-ry: 0deg;
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { min-width: 320px; margin: 0; overflow-x: hidden; color: var(--paper); background: var(--ink); }
a { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 20px; padding: 10px 14px; color: #08080a; background: var(--paper); }
.skip-link:focus { top: 20px; }

.visual-stage { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.core-image {
  position: absolute;
  inset: -8%;
  background: url("/scene-core-v4.png") center / cover no-repeat;
  opacity: .72;
  transform: translate3d(var(--image-x), calc(var(--image-y) + var(--scroll-y)), 0) scale(var(--scene-scale));
  filter: saturate(.78) contrast(1.08);
  will-change: transform;
}
#ledger-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,8,10,.94) 0%, rgba(8,8,10,.72) 37%, rgba(8,8,10,.1) 72%, rgba(8,8,10,.46) 100%),
    linear-gradient(0deg, rgba(8,8,10,.92), transparent 34%, transparent 72%, rgba(8,8,10,.5));
}
.grain {
  position: absolute;
  inset: 0;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--side);
  border-bottom: 1px solid rgba(233,231,226,.08);
  background: linear-gradient(180deg, rgba(8,8,10,.82), transparent);
  backdrop-filter: blur(8px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; text-decoration: none; font-size: 11px; font-weight: 750; letter-spacing: .16em; }
.brand-mark { position: relative; width: 22px; height: 22px; display: inline-block; border: 1px solid rgba(233,231,226,.34); border-radius: 50%; }
.brand-mark i { position: absolute; width: 3px; bottom: 5px; background: var(--paper); }
.brand-mark i:nth-child(1) { left: 5px; height: 6px; }
.brand-mark i:nth-child(2) { left: 9px; height: 11px; background: var(--violet); }
.brand-mark i:nth-child(3) { left: 13px; height: 8px; }
.topbar nav { display: flex; gap: clamp(18px, 3vw, 48px); }
.topbar nav a { position: relative; color: #a9a7ad; text-decoration: none; font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.topbar nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 1px; background: var(--violet); transition: right .25s ease; }
.topbar nav a:hover::after, .topbar nav a:focus-visible::after { right: 0; }
.devnet-state { justify-self: end; display: flex; align-items: center; gap: 8px; color: #9d9ba1; font-size: 8px; font-weight: 700; letter-spacing: .17em; }
.devnet-state i, .status-chip i, .release-state b i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--copper); box-shadow: 0 0 14px rgba(210,148,105,.7); }

main { position: relative; z-index: 2; }
.chapter { position: relative; min-height: 100svh; padding: 116px var(--side) 70px; }
.hero { min-height: 112svh; display: grid; grid-template-columns: minmax(300px, .9fr) 1.1fr; align-items: center; gap: 3vw; }
.hero-copy { align-self: center; max-width: 620px; }
.signal-line { display: flex; gap: 24px; margin-bottom: 28px; color: #a09ea5; font: 700 8px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; }
.signal-line span:last-child { color: var(--violet); }
h1, h2 { margin: 0; color: var(--paper); font-weight: 520; letter-spacing: -.04em; }
h1 { max-width: 600px; font-size: clamp(39px, 4.5vw, 66px); line-height: 1.02; }
h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.08; }
.hero-copy > p, .section-copy > p, .boundary-intro > p, .mining-copy > p {
  max-width: 520px;
  margin: 26px 0 0;
  color: #aaa8ae;
  font-size: clamp(14px, 1.35vw, 18px);
  font-weight: 360;
  line-height: 1.65;
}
.text-link { display: inline-flex; gap: 14px; align-items: center; margin-top: 38px; padding-bottom: 8px; border-bottom: 1px solid rgba(233,231,226,.34); text-decoration: none; font-size: 8px; font-weight: 750; letter-spacing: .18em; }
.text-link span { color: var(--violet); font-size: 15px; }

.coin-orbit {
  position: relative;
  justify-self: center;
  width: min(41vw, 540px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  perspective: 1000px;
  transform: rotateX(var(--coin-rx)) rotateY(var(--coin-ry));
}
.coin-face {
  position: absolute;
  inset: 27%;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(233,231,226,.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(255,255,255,.22), transparent 16%),
    conic-gradient(from 30deg, #17151b, #a17158, #24202c, #6b5f91, #111015, #a17158, #17151b);
  box-shadow: inset 0 0 0 8px rgba(8,8,10,.55), inset 0 0 42px rgba(255,255,255,.12), 0 32px 80px rgba(0,0,0,.62);
  animation: coin-float 6s ease-in-out infinite;
}
.coin-face::before { content: ""; position: absolute; inset: 10px; border: 1px dashed rgba(233,231,226,.36); border-radius: 50%; animation: spin 28s linear infinite; }
.coin-glyph { font: 300 clamp(42px, 6vw, 84px)/.8 Georgia, serif; text-shadow: 0 3px 20px rgba(0,0,0,.6); }
.coin-face b { margin-top: 16px; font-size: 9px; letter-spacing: .25em; }
.coin-face small { margin-top: 5px; color: rgba(233,231,226,.6); font-size: 6px; letter-spacing: .18em; }
.orbit { position: absolute; inset: 9%; border: 1px solid rgba(143,121,255,.32); border-radius: 50%; transform: rotateX(68deg) rotateZ(18deg); box-shadow: 0 0 38px rgba(143,121,255,.08); }
.orbit::after { content: ""; position: absolute; top: 49%; left: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 18px rgba(121,216,239,.9); }
.orbit-two { inset: 17%; border-color: rgba(210,148,105,.35); transform: rotateY(68deg) rotateZ(-20deg); }
.orbit-two::after { top: 18%; left: 94%; background: var(--copper); }
.orbit-note { position: absolute; padding: 8px 10px; color: #b8b6bd; border: 1px solid rgba(233,231,226,.14); background: rgba(8,8,10,.55); backdrop-filter: blur(8px); font: 700 7px/1 ui-monospace, Consolas, monospace; letter-spacing: .15em; }
.note-a { top: 16%; left: 6%; }
.note-b { top: 48%; right: 0; }
.note-c { bottom: 14%; left: 12%; }
.metric-strip { position: absolute; left: var(--side); right: var(--side); bottom: 36px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(8,8,10,.28); backdrop-filter: blur(10px); }
.metric-strip div { padding: 17px 20px; border-right: 1px solid var(--line); }
.metric-strip div:last-child { border-right: 0; }
.metric-strip b, .metric-strip span { display: block; }
.metric-strip b { font-size: 13px; font-weight: 560; letter-spacing: .02em; }
.metric-strip span { margin-top: 7px; color: #77757c; font-size: 7px; letter-spacing: .16em; }

.section-label { display: flex; align-items: center; gap: 13px; margin-bottom: 48px; color: #99979d; font: 700 8px/1 ui-monospace, Consolas, monospace; letter-spacing: .17em; }
.section-label span { color: var(--violet); }
.section-label::after { content: ""; width: 72px; height: 1px; background: var(--line); }
.coin-section { min-height: 108svh; padding-top: 140px; overflow: hidden; background: linear-gradient(90deg, rgba(8,8,10,.96), rgba(8,8,10,.76) 50%, rgba(8,8,10,.34)); }
.section-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; min-height: 63vh; gap: 5vw; }
.section-copy { max-width: 540px; }
.utility-wheel { position: relative; justify-self: center; width: min(52vw, 680px); aspect-ratio: 1.65; perspective: 1100px; transform: rotateX(4deg) rotateY(var(--wheel-ry)); }
.utility-wheel::before, .utility-wheel::after { content: ""; position: absolute; inset: 10% 17%; border: 1px solid rgba(143,121,255,.26); border-radius: 50%; transform: rotateX(66deg); box-shadow: 0 0 60px rgba(143,121,255,.08); }
.utility-wheel::after { inset: 22% 30%; border-color: rgba(121,216,239,.2); }
.wheel-core { position: absolute; z-index: 2; left: 42%; top: 31%; width: 24%; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border: 1px solid rgba(233,231,226,.25); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #6c5d91, #17151d 46%, #09090b 72%); box-shadow: 0 20px 60px rgba(0,0,0,.7), 0 0 50px rgba(143,121,255,.14); }
.wheel-core b { font-size: clamp(12px, 1.6vw, 20px); letter-spacing: .18em; }
.wheel-core span { margin-top: 6px; color: #85828b; font-size: 6px; letter-spacing: .16em; }
.utility-item { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); background: rgba(11,11,14,.72); backdrop-filter: blur(10px); font: 700 7px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .12em; box-shadow: 0 12px 32px rgba(0,0,0,.32); }
.utility-item i { width: 7px; height: 7px; border: 1px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 12px rgba(121,216,239,.4); }
.u1 { left: 2%; top: 15%; }
.u2 { right: 1%; top: 8%; }
.u3 { right: 5%; bottom: 8%; }
.u4 { left: 8%; bottom: 5%; }
.ticker-band { position: absolute; left: -2%; bottom: 34px; width: 104%; display: flex; align-items: center; justify-content: space-around; gap: 22px; padding: 17px var(--side); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(-1deg); color: #77757c; background: rgba(12,12,15,.76); font-size: 8px; font-weight: 700; letter-spacing: .16em; white-space: nowrap; }
.ticker-band span:first-child { color: var(--violet); }
.ticker-band i { width: 4px; height: 4px; border-radius: 50%; background: var(--copper); }

.boundary-section { min-height: 110svh; padding-top: 140px; background: rgba(8,8,10,.88); }
.boundary-layout { display: grid; grid-template-columns: .62fr 1.38fr; gap: 7vw; align-items: center; }
.boundary-intro { max-width: 450px; }
.boundary-board { min-height: 520px; display: grid; grid-template-columns: 1fr 78px 1fr; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(26,24,31,.82), rgba(10,10,13,.76)); box-shadow: 0 50px 120px rgba(0,0,0,.42); transform: perspective(1400px) rotateY(var(--board-ry)) rotateX(var(--board-rx)); }
.board-column { padding: 28px; }
.board-column header { display: flex; gap: 10px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 8px; font-weight: 750; letter-spacing: .18em; }
.board-column header i { width: 7px; height: 7px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 14px rgba(210,148,105,.5); }
.private-column header i { background: var(--cyan); box-shadow: 0 0 14px rgba(121,216,239,.5); }
.board-column ul { margin: 0; padding: 0; list-style: none; }
.board-column li { display: flex; gap: 16px; align-items: center; min-height: 86px; border-bottom: 1px solid rgba(233,231,226,.08); font-size: clamp(10px, 1.1vw, 14px); letter-spacing: .08em; }
.board-column li span { color: #67656d; font: 8px ui-monospace, Consolas, monospace; }
.boundary-axis { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 16px; padding: 24px 0; overflow: hidden; color: #65636a; font: 6px/1 ui-monospace, Consolas, monospace; letter-spacing: .14em; writing-mode: vertical-rl; }
.boundary-axis i { width: 1px; height: 100%; background: linear-gradient(var(--copper), rgba(233,231,226,.12), var(--cyan)); }

.mining-section { min-height: 112svh; padding-top: 140px; background: linear-gradient(90deg, rgba(8,8,10,.94), rgba(8,8,10,.62)); overflow: hidden; }
.mining-grid { position: relative; display: grid; grid-template-columns: .9fr 1.1fr; min-height: 70vh; align-items: center; gap: 4vw; }
.mining-copy { max-width: 530px; }
.status-chip { width: max-content; display: flex; align-items: center; gap: 10px; margin-top: 32px; padding: 10px 13px; border: 1px solid rgba(210,148,105,.3); background: rgba(15,12,12,.6); color: #c2a28b; font: 700 7px/1 ui-monospace, Consolas, monospace; letter-spacing: .15em; }
.block-stack { position: relative; width: min(48vw, 650px); height: 410px; perspective: 1000px; transform-style: preserve-3d; }
.block { position: absolute; width: 170px; height: 170px; display: grid; place-items: end start; padding: 18px; border: 1px solid rgba(233,231,226,.2); background: linear-gradient(145deg, rgba(95,83,126,.34), rgba(10,10,13,.92)); box-shadow: inset 0 0 30px rgba(143,121,255,.12), 0 34px 70px rgba(0,0,0,.5); transform-style: preserve-3d; }
.block::before, .block::after { content: ""; position: absolute; background: rgba(143,121,255,.12); border: 1px solid rgba(233,231,226,.11); }
.block::before { width: 28px; top: -15px; bottom: 14px; right: -29px; transform: skewY(-45deg); transform-origin: left; }
.block::after { height: 28px; left: 14px; right: -15px; top: -29px; transform: skewX(-45deg); transform-origin: bottom; }
.block span { color: #85818d; font: 7px ui-monospace, Consolas, monospace; letter-spacing: .18em; }
.b1 { left: 4%; top: 38%; transform: rotateY(-8deg) rotateX(4deg); }
.b2 { left: 28%; top: 22%; transform: translateZ(60px) rotateY(-8deg) rotateX(4deg); }
.b3 { left: 52%; top: 7%; transform: translateZ(120px) rotateY(-8deg) rotateX(4deg); }
.b4 { left: 70%; top: -3%; transform: translateZ(180px) rotateY(-8deg) rotateX(4deg); opacity: .72; }
.hash-beam { position: absolute; left: 10%; right: 4%; top: 51%; height: 1px; background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent); box-shadow: 0 0 18px rgba(143,121,255,.7); transform: rotate(-19deg) translateZ(220px); }
.spec-grid { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.spec-grid div { padding: 16px 18px; border-right: 1px solid var(--line); }
.spec-grid div:last-child { border-right: 0; }
.spec-grid span, .spec-grid b { display: block; }
.spec-grid span { color: #6e6c73; font-size: 7px; letter-spacing: .14em; }
.spec-grid b { margin-top: 8px; font-size: 10px; font-weight: 560; letter-spacing: .06em; }

.final-section { min-height: 88svh; display: grid; align-items: center; background: rgba(8,8,10,.91); }
.final-panel { padding: clamp(28px, 5vw, 70px); border: 1px solid var(--line); background: linear-gradient(135deg, rgba(31,28,38,.84), rgba(10,10,13,.82)); box-shadow: 0 50px 120px rgba(0,0,0,.52); }
.final-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 7vw; align-items: start; }
.release-state { border-top: 1px solid var(--line); }
.release-state > div { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.release-state span { color: #77757c; font-size: 7px; letter-spacing: .15em; }
.release-state b { display: flex; align-items: center; gap: 8px; font-size: 8px; font-weight: 650; letter-spacing: .12em; }
.disclosure { max-width: 680px; margin: 56px 0 0; color: #6d6b72; font-size: 10px; line-height: 1.6; }

.chapter-index { position: fixed; z-index: 12; right: 18px; top: 50%; display: flex; flex-direction: column; gap: 6px; transform: translateY(-50%); }
.chapter-index a { width: 31px; height: 24px; display: grid; place-items: center; color: #5d5b62; border-right: 1px solid rgba(233,231,226,.15); text-decoration: none; font: 7px ui-monospace, Consolas, monospace; transition: color .25s, border-color .25s; }
.chapter-index a.active { color: var(--paper); border-color: var(--violet); }
footer { position: relative; z-index: 3; height: 90px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 42px; padding: 0 var(--side); color: #5d5b62; border-top: 1px solid var(--line); background: var(--ink); font-size: 7px; letter-spacing: .16em; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes coin-float { 0%, 100% { transform: translateY(-4px) rotateY(-6deg); } 50% { transform: translateY(8px) rotateY(7deg); } }

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 110px; }
  .hero-copy { align-self: end; }
  .coin-orbit { position: absolute; z-index: -1; right: -10vw; top: 25%; width: 68vw; opacity: .55; }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip div:nth-child(2) { border-right: 0; }
  .section-grid, .boundary-layout, .mining-grid, .final-grid { grid-template-columns: 1fr; }
  .utility-wheel { width: 88vw; }
  .boundary-board { min-height: 450px; }
  .block-stack { justify-self: center; width: 84vw; }
  .spec-grid { position: relative; grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
  .spec-grid div:nth-child(2) { border-right: 0; }
}

@media (max-width: 620px) {
  .topbar { height: 66px; }
  .brand { font-size: 9px; }
  .devnet-state { font-size: 6px; }
  .chapter { padding-top: 98px; }
  h1 { font-size: clamp(36px, 11vw, 48px); }
  h2 { font-size: clamp(29px, 8.5vw, 38px); }
  .signal-line { flex-direction: column; gap: 8px; }
  .metric-strip { bottom: 22px; }
  .metric-strip div { padding: 12px 10px; }
  .metric-strip b { font-size: 10px; }
  .metric-strip span { font-size: 6px; }
  .ticker-band { overflow: hidden; justify-content: flex-start; }
  .boundary-board { grid-template-columns: 1fr; }
  .boundary-axis { height: 56px; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr; align-items: center; writing-mode: initial; }
  .boundary-axis i { width: 100%; height: 1px; }
  .board-column li { min-height: 62px; }
  .block-stack { height: 300px; transform: scale(.75); transform-origin: left center; }
  .chapter-index { display: none; }
  footer { grid-template-columns: 1fr auto; }
  footer span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .coin-face, .coin-face::before { animation: none; }
  .core-image { transform: none; }
}
