:root {
  --ink: #031109;
  --night: #04190d;
  --forest: #063a1b;
  --emerald: #0d7b37;
  --leaf: #40e673;
  --acid: #b6ff52;
  --mist: #d9ffd1;
  --paper: #efffda;
  --line: rgba(188, 255, 157, .28);
  --display: "Bebas Neue", Impact, sans-serif;
  --body: "DM Sans", Arial, sans-serif;
  --blackletter: "UnifrakturMaguntia", serif;
}

* { box-sizing: border-box; }
html { background: var(--night); color: var(--paper); }
body { margin: 0; min-height: 100vh; min-height: 100svh; overflow: hidden; font-family: var(--body); background: var(--night); }
button, a { font: inherit; }
button { color: inherit; }
button, a, .archive-card { cursor: pointer; }

.forest-bg { position: fixed; inset: 0; z-index: -3; background: radial-gradient(circle at 74% 30%, rgba(48, 216, 98, .22), transparent 27%), radial-gradient(circle at 13% 92%, rgba(174, 255, 58, .12), transparent 30%), linear-gradient(125deg, #020b06, #052313 48%, #010703); }
.forest-bg::after { content: "R"; position: absolute; right: -4vw; bottom: -25vh; font: 92vh/.8 var(--blackletter); color: rgba(83, 244, 112, .035); transform: rotate(-8deg); }
.grain { position: fixed; inset: 0; z-index: 20; opacity: .075; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E"); }
.cursor { position: fixed; z-index: 99; width: 18px; height: 18px; border: 1px solid var(--acid); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); transition: width .15s, height .15s, background .15s; mix-blend-mode: difference; }
.cursor.hot { width: 42px; height: 42px; background: rgba(182,255,82,.25); }

.topbar { position: fixed; inset: 0 0 auto; z-index: 30; height: 86px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 32px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(1,9,5,.95), rgba(1,9,5,.45)); backdrop-filter: blur(14px); }
.brand-mark, .menu-trigger { border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 0; letter-spacing: .12em; font-weight: 700; }
.brand-mark { justify-self: start; }
.brand-mark img { width: 54px; height: 54px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 30px rgba(62,245,111,.2); }
.brand-mark span { font: 1.4rem var(--display); letter-spacing: .09em; }
.token-stamp { font: 1.25rem var(--display); letter-spacing: .12em; color: var(--acid); }
.token-stamp span { font-family: var(--body); }
.menu-trigger { justify-self: end; min-height: 44px; }
.menu-trigger i { width: 38px; height: 1px; display: block; background: var(--acid); position: relative; }
.menu-trigger i::after { content: ""; position: absolute; right: 0; top: 7px; width: 24px; border-top: 1px solid var(--acid); }

.forest-nav { position: fixed; z-index: 29; inset: 86px 0 0; display: flex; flex-direction: column; justify-content: center; padding: 6vw 13vw; background: rgba(1,12,6,.96); backdrop-filter: blur(24px); clip-path: inset(0 0 100% 0); transition: clip-path .65s cubic-bezier(.77,0,.18,1); }
.forest-nav { visibility: hidden; pointer-events: none; }
.forest-nav.open { clip-path: inset(0); visibility: visible; pointer-events: auto; }
.forest-nav > p { color: var(--leaf); letter-spacing: .22em; font-size: .78rem; }
.forest-nav button { border: 0; border-bottom: 1px solid var(--line); background: none; display: grid; grid-template-columns: 60px 1fr; align-items: baseline; text-align: left; padding: 15px 0 9px; transition: color .2s, padding-left .2s; }
.forest-nav button:hover { color: var(--acid); padding-left: 20px; }
.forest-nav button b { color: var(--leaf); font-size: .8rem; }
.forest-nav button span { font: clamp(2.8rem, 7vw, 6.8rem)/.9 var(--display); }

.app-shell { height: 100vh; height: 100svh; position: relative; }
.view { position: absolute; inset: 86px 0 0; padding: 38px 7vw 42px; visibility: hidden; opacity: 0; transform: translateY(25px) scale(.985); transition: opacity .45s ease, transform .65s cubic-bezier(.2,.8,.2,1), visibility 0s .65s; overflow: auto; }
.view.active { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; z-index: 2; }
.section-index { position: absolute; left: 2.2vw; top: 42px; display: flex; flex-direction: column; align-items: center; gap: 80px; }
.section-index::after { content: ""; position: absolute; top: 35px; height: 62px; border-left: 1px solid var(--line); }
.section-index span { color: var(--acid); font: 1.1rem var(--display); }
.section-index b { writing-mode: vertical-rl; font-size: .67rem; letter-spacing: .2em; color: rgba(239,255,218,.6); }
.eyebrow { margin: 0 0 18px; color: var(--leaf); font-size: .72rem; font-weight: 700; letter-spacing: .22em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; }

.home-view { display: grid; grid-template-columns: minmax(420px, .92fr) 1.08fr; align-items: center; gap: 4vw; padding-top: 50px; }
.home-copy { position: relative; min-width: 0; max-width: 690px; z-index: 3; }
.home-copy h1 { margin: 0; font-size: clamp(6rem, 11vw, 10.5rem); line-height: .7; letter-spacing: -.025em; }
.home-copy h1 span { display: block; }
.home-copy h1 span:last-child { color: transparent; -webkit-text-stroke: 2px var(--acid); margin-left: .33em; }
.hero-rule { display: flex; align-items: center; gap: 16px; margin: 34px 0 20px; color: var(--acid); letter-spacing: .18em; }
.hero-rule span { flex: 1; height: 1px; background: var(--line); }
.hero-rule strong { font: 1.25rem var(--display); }
.intro { max-width: 590px; color: rgba(239,255,218,.78); line-height: 1.65; font-size: 1rem; }
.cta-dock { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.art-button { width: 184px; height: 58px; border: 1px solid var(--line); border-radius: 6px; background: #075025 center/100% 100% no-repeat; display: inline-grid; place-items: center; color: var(--paper); text-decoration: none; filter: drop-shadow(0 12px 20px rgba(0,0,0,.25)); transition: transform .2s, filter .2s; }
.art-button.buy { background-image: url("assets/button-buy.png"); }
.art-button.x { background-image: url("assets/button-x.png"); }
.art-button.chart { background-image: url("assets/button-chart.png"); }
.art-button span { font: 1.12rem var(--display); letter-spacing: .08em; text-shadow: 0 2px 4px #001b08; }
.art-button:hover { transform: translateY(-5px) rotate(-1deg); filter: drop-shadow(0 16px 24px rgba(44,229,94,.22)); }
.contract { width: min(100%, 580px); margin-top: 18px; padding: 10px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px dashed rgba(182,255,82,.42); color: var(--paper); background: rgba(2,27,12,.7); text-align: left; }
.contract span, .contract b { color: var(--acid); font-size: .66rem; letter-spacing: .12em; }
.contract code { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: rgba(239,255,218,.72); }
.hero-art { pointer-events: none; position: relative; justify-self: stretch; height: min(72vh, 760px); min-height: 520px; }
.hero-scene { position: absolute; inset: 4% 3% 3% 8%; width: 88%; height: 90%; object-fit: cover; clip-path: polygon(12% 0,100% 6%,94% 90%,68% 100%,0 88%,4% 12%); filter: saturate(.8) contrast(1.08) brightness(.72); box-shadow: 0 45px 80px rgba(0,0,0,.5); }
.hero-art::after { content: ""; position: absolute; inset: 4% 3% 3% 8%; clip-path: polygon(12% 0,100% 6%,94% 90%,68% 100%,0 88%,4% 12%); background: linear-gradient(155deg, transparent 48%, rgba(0,0,0,.78)); pointer-events: none; }
.hero-coin { position: absolute; z-index: 2; width: 36%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; left: -3%; bottom: 3%; box-shadow: 0 25px 60px rgba(0,0,0,.5), 0 0 45px rgba(72,255,113,.28); transform: rotate(-8deg); }
.orbit { position: absolute; z-index: 1; border: 1px solid var(--line); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 86%; aspect-ratio: 1; left: -2%; top: -3%; animation: orbit 20s linear infinite; }
.orbit-two { width: 62%; aspect-ratio: 1; right: -1%; bottom: -2%; animation: orbit 13s linear infinite reverse; }
.orbit::after { content: ""; position: absolute; width: 7px; height: 7px; background: var(--acid); border-radius: 50%; top: 10%; left: 17%; box-shadow: 0 0 14px var(--acid); }
.hero-caption { position: absolute; z-index: 3; right: 0; bottom: 5%; display: flex; gap: 18px; font-size: .7rem; letter-spacing: .15em; }
.hero-caption b { color: var(--acid); }
.trail-cue { position: absolute; z-index: 4; right: 7vw; bottom: 18px; border: 0; background: none; display: flex; align-items: center; gap: 14px; font-size: .7rem; letter-spacing: .16em; }
.trail-cue i { color: var(--acid); font-size: 1.5rem; animation: bob 1.4s ease-in-out infinite; }

.legend-stage { min-height: calc(100svh - 166px); display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 5vw; }
.legend-copy h2, .gallery-head h2, .roadmap-copy h2, .chart-head h2 { font-size: clamp(4.8rem, 8vw, 8rem); line-height: .82; margin: 0 0 30px; }
.chapter-copy { max-width: 590px; border-left: 1px solid var(--leaf); padding-left: 24px; min-height: 200px; }
.chapter-copy.fade { animation: chapter .42s ease; }
.chapter-number { color: var(--acid); font-size: .7rem; letter-spacing: .18em; }
.chapter-copy h3 { font: 2.5rem/1 var(--display); margin-bottom: 14px; }
.chapter-copy > p:last-child { line-height: 1.65; color: rgba(239,255,218,.74); }
.chapter-controls { display: flex; align-items: center; gap: 22px; margin-top: 26px; }
.chapter-controls button { width: 52px; height: 38px; border: 1px solid var(--line); background: rgba(8,64,28,.45); font-size: 1.5rem; }
.chapter-controls button:hover { background: var(--emerald); }
.chapter-controls div { display: flex; gap: 5px; align-items: baseline; }
.chapter-controls b { color: var(--acid); font: 1.5rem var(--display); }
.chapter-controls span { font-size: .7rem; }
.legend-image { position: relative; margin: 0; height: min(72vh, 720px); }
.legend-image img { width: 100%; height: 100%; object-fit: cover; clip-path: polygon(8% 0,100% 3%,93% 100%,0 92%); filter: saturate(.88) contrast(1.05); }
.legend-image figcaption { position: absolute; right: 5%; bottom: 7%; padding: 10px 14px; background: rgba(0,22,9,.82); color: var(--acid); font-size: .7rem; letter-spacing: .15em; }

.gallery-view { padding-top: 54px; }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.gallery-head h2 { margin: 0; }
.gallery-head > p { max-width: 320px; line-height: 1.6; color: rgba(239,255,218,.65); }
.archive-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 12px; padding-bottom: 60px; }
.archive-card { position: relative; border: 0; padding: 0; overflow: hidden; background: #062914; text-align: left; }
.archive-card.wide { grid-column: span 2; }
.archive-card.tall { grid-row: span 2; }
.archive-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.75) brightness(.8); transition: transform .55s, filter .45s; }
.archive-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,15,6,.92)); }
.archive-card span { position: absolute; z-index: 2; left: 16px; bottom: 14px; color: var(--paper); font-size: .68rem; letter-spacing: .15em; }
.archive-card:hover img { transform: scale(1.06); filter: saturate(1.05) brightness(1); }

.roadmap-view { overflow: hidden; display: grid; grid-template-columns: .65fr 1.35fr; align-items: center; gap: 5vw; }
.roadmap-copy { position: relative; z-index: 3; }
.roadmap-copy > p:last-child { max-width: 470px; line-height: 1.65; color: rgba(239,255,218,.7); }
.path-map { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; padding-top: 90px; }
.path-line { position: absolute; left: 0; right: 0; top: 109px; height: 2px; background: linear-gradient(90deg, var(--acid), var(--emerald)); box-shadow: 0 0 18px rgba(182,255,82,.45); }
.milestone { position: relative; padding-top: 55px; opacity: .62; transition: opacity .25s, transform .25s; }
.milestone::before { content: ""; position: absolute; top: 12px; left: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--night); border: 2px solid var(--acid); box-shadow: 0 0 0 6px rgba(182,255,82,.08); }
.milestone:hover, .milestone.active { opacity: 1; transform: translateY(-8px); }
.milestone b { color: var(--acid); font: 1.5rem var(--display); }
.milestone span { display: block; margin: 12px 0 24px; font-size: .65rem; letter-spacing: .15em; color: var(--leaf); }
.milestone h3 { font: 1.7rem/1 var(--display); }
.milestone p { color: rgba(239,255,218,.62); font-size: .83rem; line-height: 1.55; }
.roadmap-art { position: absolute; inset: 0 0 0 auto; width: 68%; height: 100%; object-fit: cover; opacity: .17; mask-image: linear-gradient(90deg, transparent, black 48%); }

.chart-view { display: flex; flex-direction: column; padding-top: 50px; }
.chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.chart-head h2 { margin-bottom: 12px; }
.chart-head > p { max-width: 340px; color: rgba(239,255,218,.68); line-height: 1.6; }
.chart-frame { position: relative; flex: 1; min-height: 460px; border: 1px solid var(--line); background: #011007; box-shadow: 0 35px 90px rgba(0,0,0,.45); overflow: hidden; }
.chart-frame iframe { width: 100%; height: 100%; border: 0; }
.chart-actions { display: flex; flex-wrap: wrap; flex-shrink: 0; gap: 8px; padding-top: 12px; }

.view-rail { position: fixed; z-index: 22; right: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.view-rail button { width: 31px; height: 31px; border: 0; background: transparent; color: rgba(239,255,218,.4); font-size: .58rem; position: relative; }
.view-rail button::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(182,255,82,.25); transform: rotate(45deg); transition: background .2s, inset .2s; }
.view-rail button span { position: relative; z-index: 1; opacity: 0; }
.view-rail button:hover span, .view-rail button.active span { opacity: 1; }
.view-rail button.active::before { inset: 2px; background: var(--emerald); border-color: var(--acid); }

.lightbox { position: fixed; z-index: 80; inset: 0; background: rgba(0,10,4,.94); display: grid; place-items: center; padding: 5vw; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(86vw, 900px); max-height: 78vh; object-fit: contain; box-shadow: 0 30px 100px #000; }
.lightbox p { color: var(--acid); letter-spacing: .2em; font-size: .74rem; }
.lightbox-close { position: absolute; right: 28px; top: 22px; border: 0; background: none; font-size: 3rem; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 120px); padding: 12px 18px; background: var(--acid); color: var(--ink); font-weight: 700; font-size: .72rem; letter-spacing: .12em; transition: transform .35s; }
.toast.show { transform: translate(-50%, 0); }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(7px); } }
@keyframes chapter { from { opacity: .15; transform: translateY(15px); } }

@media (max-width: 1050px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; min-height: 100svh; }
  .view { position: relative; inset: auto; display: none; min-height: calc(100svh - 74px); padding: 38px 7vw 70px; overflow: visible; }
  .view.active { display: block; }
  .topbar { height: 74px; padding: 10px 18px; }
  .brand-mark img { width: 46px; height: 46px; }
  .brand-mark span { display: none; }
  .menu-trigger span { display: none; }
  .forest-nav { inset: 74px 0 0; padding: 8vw; }
  .forest-nav button span { font-size: clamp(2.6rem, 10vw, 5.5rem); }
  .home-view { grid-template-columns: 1fr; padding-top: 105px; }
  .home-copy { position: relative; z-index: 3; }
  .hero-art { margin-top: 34px; min-height: 450px; height: 58vh; }
  .trail-cue { display: none; }
  .legend-stage { grid-template-columns: 1fr; padding-top: 60px; }
  .legend-image { height: 65vh; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .roadmap-view { grid-template-columns: 1fr; padding-top: 120px; overflow: visible; }
  .path-map { grid-template-columns: repeat(2, 1fr); }
  .path-line { display: none; }
  .milestone { border-top: 1px solid var(--line); }
  .roadmap-art { width: 100%; opacity: .12; }
  .chart-view { padding-top: 115px; }
  .chart-frame { height: 64vh; min-height: 520px; }
  .section-index { left: 6vw; top: 92px; flex-direction: row; gap: 14px; }
  .section-index::after { display: none; }
  .section-index b { writing-mode: horizontal-tb; }
  .view-rail { display: none; }
  .cursor { display: none; }
}

@media (max-width: 640px) {
  .home-view { padding-top: 98px; }
  .home-copy h1 { font-size: clamp(5.2rem, 27vw, 7rem); }
  .home-copy h1 span:last-child { margin-left: .08em; }
  .intro { font-size: .92rem; }
  .cta-dock { display: grid; grid-template-columns: 1fr 1fr; }
  .art-button { width: 100%; }
  .cta-dock .chart { grid-column: 1 / -1; }
  .contract { grid-template-columns: minmax(0, 1fr) auto; }
  .contract span { display: none; }
  .hero-art { min-height: 390px; }
  .hero-coin { width: 46%; }
  .legend-copy h2, .gallery-head h2, .roadmap-copy h2, .chart-head h2 { font-size: clamp(4rem, 20vw, 6rem); }
  .gallery-head, .chart-head { display: block; }
  .archive-grid { grid-template-columns: 1fr; grid-auto-rows: 290px; }
  .archive-card.wide, .archive-card.tall { grid-column: span 1; grid-row: span 1; }
  .path-map { grid-template-columns: 1fr; padding-top: 35px; }
  .milestone { padding-top: 35px; }
  .chart-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

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

button:focus-visible, a:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }
