@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --ink: #050b18;
  --space: #07152f;
  --space-2: #0b2452;
  --paper: #f3f0e8;
  --moon: #f5bd54;
  --orange: #c66a28;
  --red: #d8453d;
  --ice: #82b7ff;
  --line: rgba(223, 234, 255, .21);
  --panel: rgba(8, 20, 46, .72);
  --shadow: 0 30px 80px rgba(0,0,0,.38);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--moon) var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  transition: background .6s ease, filter .6s ease;
}
body[data-mode="night"] { --moon: #ff6d55; --ice: #9f85ff; --space-2: #28104c; }
body[data-mode="ghost"] { --moon: #bafcff; --ice: #54f6cb; --space-2: #07383f; filter: saturate(.8); }
body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }

::selection { background: var(--moon); color: var(--ink); }

.boot {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center; gap: 22px;
  background: #050b18; transition: opacity .6s ease, visibility .6s ease;
}
.boot.is-gone { opacity: 0; visibility: hidden; }
.boot p { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; }
.boot__moon { width: 76px; height: 76px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; padding: 9px; animation: spin 2s linear infinite; }
.boot__moon span { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 4%, var(--moon) 5% 42%, transparent 43%); box-shadow: 0 0 30px color-mix(in srgb, var(--moon), transparent 50%); }
.boot__line { width: 180px; height: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.boot__line i { display: block; height: 100%; background: var(--moon); animation: loading 1.4s ease forwards; }
@keyframes loading { from { width: 0; } to { width: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }

.noise { position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .055; 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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.aurora { position: fixed; z-index: -2; width: 65vw; height: 65vw; top: -26vw; right: -18vw; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--ice), transparent 70%), transparent 65%); filter: blur(50px); transition: background .6s ease; }
.cursor-glow { position: fixed; z-index: 77; left: 0; top: 0; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--moon), transparent 87%), transparent 67%); transform: translate(-50%, -50%); opacity: .7; }
.relic-field { position: fixed; z-index: -1; width: min(72vw, 1120px); right: -16vw; top: 18vh; opacity: .075; mix-blend-mode: screen; filter: saturate(.65) contrast(1.2); animation: relicFloat 14s ease-in-out infinite alternate; pointer-events: none; }
@keyframes relicFloat { to { transform: translate3d(-3vw, -7vh, 0) rotate(-3deg) scale(1.05); } }

.topbar {
  position: fixed; z-index: 100; top: 0; left: 0; width: 100%; min-height: 82px; padding: 16px clamp(20px,4vw,64px); display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(5,11,24,.92), rgba(5,11,24,0)); transition: background .3s ease, backdrop-filter .3s ease;
}
.topbar.is-scrolled { background: rgba(5,11,24,.74); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.brand__mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; color: var(--ink); font-size: 11px; background: var(--moon); border: 5px double var(--ink); box-shadow: 0 0 0 1px var(--moon); transform: rotate(-10deg); }
.brand small { display: block; margin-top: 3px; opacity: .55; font-weight: 500; font-size: 8px; }
nav { display: flex; align-items: center; gap: clamp(18px,2.2vw,34px); }
nav a { font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; position: relative; }
nav a:not(.nav-buy)::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--moon); transform: scaleX(0); transform-origin: right; transition: transform .25s ease; }
nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-x { border: 1px solid var(--line); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; }
.nav-buy { color: var(--ink); background: var(--moon); padding: 13px 18px; border-radius: 999px; box-shadow: 0 0 30px color-mix(in srgb, var(--moon), transparent 82%); transition: transform .2s ease; }
.nav-buy:hover { transform: rotate(-2deg) scale(1.04); }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; }

.hero { min-height: 100svh; position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(370px,.9fr); align-items: center; gap: clamp(24px,5vw,90px); padding: 130px clamp(24px,7vw,110px) 110px; overflow: hidden; isolation: isolate; background: radial-gradient(circle at 75% 45%, rgba(41,91,166,.22), transparent 37%), linear-gradient(140deg, #050b18 0%, var(--space) 52%, #0b2147 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .42; background-image: radial-gradient(circle at 14% 18%, white 0 1px, transparent 1.8px), radial-gradient(circle at 72% 27%, white 0 1px, transparent 1.6px), radial-gradient(circle at 86% 83%, var(--moon) 0 1.2px, transparent 2px), radial-gradient(circle at 42% 68%, white 0 1px, transparent 1.7px); background-size: 137px 137px, 221px 221px, 171px 171px, 97px 97px; animation: starDrift 40s linear infinite; }
@keyframes starDrift { to { background-position: 137px 274px, -221px 442px, 342px -342px, -194px 194px; } }
.hero__copy { position: relative; z-index: 4; max-width: 700px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; font-size: 11px; font-weight: 800; letter-spacing: .23em; color: var(--ice); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(216,69,61,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(216,69,61,0); } }
h1 { margin: 0; font-size: clamp(5.2rem,11.7vw,11rem); line-height: .72; letter-spacing: -.09em; font-weight: 950; transform: rotate(-1.5deg); }
h1 > span { display: block; }
h1 > span:nth-child(2) { margin-left: .29em; color: transparent; -webkit-text-stroke: 2px var(--paper); position: relative; }
h1 > span:nth-child(2)::after { content: ""; position: absolute; width: .55em; height: .08em; background: var(--moon); left: -.16em; top: .45em; transform: rotate(-9deg); border-radius: 100%; }
h1 sup { font-size: .12em; letter-spacing: .08em; color: var(--moon); -webkit-text-stroke: 0; margin-left: .3em; vertical-align: top; }
.hero__lede { font-family: Georgia, serif; font-size: clamp(1.15rem,2vw,1.5rem); line-height: 1.45; max-width: 560px; margin: 34px 0 26px 8px; color: rgba(243,240,232,.78); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button { min-width: 170px; min-height: 54px; display: inline-flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 18px 0 22px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; letter-spacing: .12em; font-weight: 900; position: relative; overflow: hidden; transition: border-color .25s ease, transform .25s ease, background .25s ease; }
.button b { font-size: 18px; }
.button--primary { background: var(--moon); color: var(--ink); border-color: var(--moon); }
.button--ghost { background: rgba(255,255,255,.04); backdrop-filter: blur(10px); }
.button:hover { border-color: var(--moon); transform: translateY(-3px); }
.signal-strip { display: flex; gap: 0; margin-top: 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: 590px; }
.signal-strip span { flex: 1; padding: 13px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; border-right: 1px solid var(--line); }
.signal-strip span:last-child { border-right: 0; }
.signal-strip small { display: block; opacity: .42; font-size: 8px; margin-bottom: 4px; }

.hero__visual { position: relative; z-index: 2; width: min(43vw, 630px); aspect-ratio: .94; justify-self: center; transform-style: preserve-3d; will-change: transform; }
.portrait-shell { position: absolute; inset: 6% 5% 2%; border-radius: 47% 47% 43% 43%; overflow: hidden; border: 1px solid rgba(255,255,255,.4); box-shadow: 0 50px 100px rgba(0,0,0,.5), inset 0 0 0 10px rgba(217,226,239,.08), 0 0 80px rgba(89,148,237,.15); clip-path: polygon(15% 4%, 85% 4%, 100% 24%, 94% 85%, 72% 100%, 28% 100%, 6% 85%, 0 24%); }
.portrait-shell img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.portrait-glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.22), transparent 23% 64%, rgba(108,159,255,.1)); mix-blend-mode: screen; }
.portrait-orbit { position: absolute; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; pointer-events: none; }
.portrait-orbit::before { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; top: 50%; left: -6px; background: var(--moon); box-shadow: 0 0 20px var(--moon); }
.orbit-a { inset: -2%; transform: rotate(-18deg); animation: orbit 12s linear infinite; }
.orbit-b { inset: 8% -10%; transform: rotate(32deg); animation: orbitReverse 18s linear infinite; }
@keyframes orbit { to { transform: rotate(342deg); } }
@keyframes orbitReverse { to { transform: rotate(-328deg); } }
.scribble { position: absolute; z-index: 6; font: 700 12px/1.25 "Comic Sans MS", cursive; color: var(--moon); transform: rotate(-9deg); text-transform: uppercase; letter-spacing: .04em; }
.scribble--one { left: -14%; top: 13%; }
.scribble--two { right: -6%; bottom: 9%; transform: rotate(8deg); }
.stamp { position: absolute; z-index: 7; right: -4%; top: 11%; width: 88px; aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--red); display: grid; place-items: center; text-align: center; color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .12em; transform: rotate(14deg); background: rgba(5,11,24,.5); }
.helmet-hotspot { position: absolute; right: 6%; top: 22%; width: 25px; height: 25px; border: 0; border-radius: 50%; background: var(--moon); cursor: pointer; box-shadow: 0 0 0 8px rgba(245,189,84,.15), 0 0 30px var(--moon); animation: hotPulse 1.3s infinite alternate; }
.helmet-hotspot i { position: absolute; right: 32px; top: 0; width: 115px; color: var(--paper); font-style: normal; font-size: 8px; letter-spacing: .12em; text-align: right; }
@keyframes hotPulse { to { transform: scale(1.15); box-shadow: 0 0 0 14px rgba(245,189,84,0), 0 0 35px var(--moon); } }
.mode-dock { position: absolute; z-index: 8; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; padding: 6px; border: 1px solid var(--line); background: rgba(5,11,24,.62); backdrop-filter: blur(14px); border-radius: 999px; box-shadow: var(--shadow); }
.mode-dock > span { padding: 0 14px; font-size: 8px; letter-spacing: .18em; opacity: .5; }
.mode-dock button { border: 0; background: transparent; padding: 10px 14px; border-radius: 999px; cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .14em; transition: .3s ease; }
.mode-dock button.is-active { background: var(--moon); color: var(--ink); }
.scroll-cue { position: absolute; left: 24px; bottom: 30px; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 8px; letter-spacing: .2em; opacity: .5; display: flex; gap: 10px; align-items: center; }
.scroll-cue i { display: inline-block; height: 50px; width: 1px; background: var(--paper); }

.marquee { overflow: hidden; padding: 18px 0; background: var(--moon); color: var(--ink); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(-.7deg) scale(1.02); position: relative; z-index: 4; }
.marquee div { width: max-content; white-space: nowrap; font-size: 14px; font-weight: 950; letter-spacing: .12em; animation: marquee 28s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { position: relative; padding: 130px clamp(24px,7vw,110px); overflow: hidden; }
.section-label { display: flex; align-items: center; gap: 14px; font-size: 10px; letter-spacing: .23em; font-weight: 850; margin-bottom: 70px; color: var(--ice); }
.section-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.section-label span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--moon); }
.origin { background: linear-gradient(180deg, #07152f, #091a37 60%, #050b18); }
.origin::after { content: "44"; position: absolute; right: -2vw; top: 7%; font-size: 34vw; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.025); font-weight: 950; pointer-events: none; }
.origin__grid { display: grid; grid-template-columns: minmax(190px,.42fr) minmax(400px,1fr) minmax(220px,.52fr); gap: clamp(24px,4vw,64px); position: relative; z-index: 2; }
.chapter-index { display: flex; flex-direction: column; }
.chapter-tab { width: 100%; min-height: 82px; display: grid; grid-template-columns: 32px 1fr 28px; align-items: center; gap: 10px; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; opacity: .42; transition: opacity .3s ease, padding .3s ease; }
.chapter-tab:first-child { border-top: 1px solid var(--line); }
.chapter-tab b { font: 500 11px ui-monospace, monospace; color: var(--moon); }
.chapter-tab span { font-family: Georgia, serif; font-size: 16px; }
.chapter-tab i { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; position: relative; }
.chapter-tab i::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; }
.chapter-tab:hover, .chapter-tab.is-active { opacity: 1; padding-left: 8px; }
.chapter-tab.is-active i { background: var(--moon); color: var(--ink); border-color: var(--moon); transform: rotate(45deg); }
.story-console { min-height: 610px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); padding: clamp(24px,4vw,54px); box-shadow: var(--shadow); backdrop-filter: blur(16px); position: relative; overflow: hidden; }
.story-console::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 5px); mix-blend-mode: overlay; }
.console-top { display: flex; justify-content: space-between; font: 9px ui-monospace, monospace; letter-spacing: .14em; opacity: .55; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.console-status { color: var(--moon); }
.story-number { position: absolute; right: 18px; top: 36px; font-size: 10rem; font-weight: 950; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.06); }
.story-kicker { margin-top: 54px; color: var(--moon); font-size: 10px; font-weight: 850; letter-spacing: .2em; }
.story-title { margin: 13px 0 26px; max-width: 580px; font: 500 clamp(2.2rem,4vw,4.7rem)/.98 Georgia, serif; letter-spacing: -.04em; }
.story-text { columns: 2; column-gap: 32px; color: rgba(243,240,232,.7); line-height: 1.7; font-size: 15px; }
.story-text p { margin: 0 0 15px; }
.story-meta { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 28px; }
.story-meta div { padding: 14px; border-right: 1px solid var(--line); }
.story-meta div:last-child { border-right: 0; }
.story-meta small { display: block; opacity: .45; font-size: 8px; letter-spacing: .14em; margin-bottom: 5px; }
.story-meta strong { font: 700 10px ui-monospace, monospace; }
.next-chapter { margin-top: 24px; margin-left: auto; display: flex; align-items: center; gap: 20px; border: 0; background: none; font-size: 9px; font-weight: 900; letter-spacing: .15em; cursor: pointer; }
.next-chapter span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--moon); color: var(--ink); }
.relic-card { align-self: end; transform: rotate(3deg); border: 1px solid var(--line); background: #e4ded2; color: var(--ink); padding: 12px; box-shadow: 0 26px 50px rgba(0,0,0,.3); }
.relic-card img { aspect-ratio: 1/1.12; width: 100%; object-fit: cover; filter: saturate(.75) contrast(1.08); }
.relic-card > div { padding: 18px 8px 8px; }
.relic-card span { display: block; font: 8px ui-monospace, monospace; opacity: .55; margin-bottom: 8px; }
.relic-card strong { font: 500 21px/1.05 Georgia, serif; }

.nameplate { min-height: 90vh; display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 9vw; background: var(--paper); color: var(--ink); }
.nameplate::before { content: ""; position: absolute; inset: 0; opacity: .08; background: repeating-linear-gradient(75deg, transparent 0 32px, #07152f 33px 34px); }
.nameplate__moon { position: relative; width: min(35vw, 480px); aspect-ratio: 1; border-radius: 50%; background: var(--moon); padding: 21% 18%; box-shadow: inset -50px -20px 0 rgba(150,85,15,.13), 30px 35px 0 #07152f; transform: rotate(-7deg); }
.nameplate__moon::after { content: ""; position: absolute; inset: 5%; border: 2px dashed rgba(7,21,47,.35); border-radius: 50%; }
.nameplate__moon span { font-size: 10px; letter-spacing: .25em; }
.nameplate__moon strong { display: block; font-size: clamp(3.4rem,6vw,6.6rem); line-height: .76; letter-spacing: -.09em; margin-top: 15px; position: relative; z-index: 2; }
.nameplate__moon i { position: absolute; right: -12%; top: 15%; width: 84px; height: 84px; border: 2px solid var(--red); border-radius: 50%; }
.nameplate__copy { position: relative; z-index: 2; max-width: 760px; }
.big-copy { font: 500 clamp(2rem,4vw,4.1rem)/1.08 Georgia, serif; letter-spacing: -.035em; margin: 0 0 34px; }
.nameplate__copy > p:not(.big-copy) { max-width: 610px; font-size: 17px; line-height: 1.65; }
.signature { margin-top: 30px; font: 700 13px "Comic Sans MS", cursive; color: var(--red); transform: rotate(-2deg); }

.orbit { background: radial-gradient(circle at 50% 50%, #122e62 0, #07152f 43%, #050b18 78%); }
.orbit__intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 40px; }
.orbit__intro h2, .signal__header h2 { margin: 0; font: 500 clamp(3rem,6vw,7rem)/.9 Georgia, serif; letter-spacing: -.06em; }
.orbit__intro p, .signal__header p { max-width: 350px; color: rgba(243,240,232,.65); line-height: 1.6; }
.orbit-map { height: min(72vw, 720px); min-height: 570px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 44px; background: radial-gradient(circle at 50% 48%, rgba(130,183,255,.16), transparent 36%), #040914; box-shadow: inset 0 0 80px rgba(56,111,198,.13), var(--shadow); cursor: grab; touch-action: pan-y; }
.orbit-map.is-dragging { cursor: grabbing; }
.orbit-sky { position: absolute; inset: -100px; background-image: radial-gradient(circle, white 0 1px, transparent 1.5px); background-size: 59px 59px; opacity: .17; transition: transform .1s linear; }
.orbit-lines { position: absolute; width: 100%; height: 100%; overflow: visible; }
.orbit-lines ellipse { fill: none; stroke: rgba(155,190,246,.18); stroke-width: 1; stroke-dasharray: 6 10; transform-origin: center; animation: dash 30s linear infinite; }
.orbit-lines ellipse:nth-child(2) { animation-direction: reverse; animation-duration: 45s; }
@keyframes dash { to { stroke-dashoffset: 500; } }
.signal-path { fill: none; stroke: var(--moon); stroke-width: 2; stroke-dasharray: 8 12; filter: url(#glow); animation: dash 13s linear infinite reverse; opacity: .75; }
.map-core { position: absolute; left: 50%; top: 50%; width: 17%; aspect-ratio: 1; transform: translate(-50%,-50%); border-radius: 50%; overflow: hidden; border: 8px solid rgba(255,255,255,.12); box-shadow: 0 0 0 1px var(--moon), 0 0 70px rgba(245,189,84,.3); }
.map-core img { width: 100%; height: 100%; object-fit: cover; }
.map-core span { position: absolute; inset: 0; display: grid; place-items: end center; padding-bottom: 8%; font-size: 10px; font-weight: 900; letter-spacing: .2em; background: linear-gradient(transparent, rgba(5,11,24,.75)); }
.orbit-node { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%); display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; z-index: 3; }
.orbit-node i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: normal 10px ui-monospace, monospace; border: 1px solid rgba(255,255,255,.32); background: #07152f; transition: .25s ease; }
.orbit-node span { font-size: 8px; font-weight: 800; letter-spacing: .13em; opacity: .55; white-space: nowrap; }
.orbit-node:hover i, .orbit-node.is-active i { transform: scale(1.2); color: var(--ink); background: var(--moon); border-color: var(--moon); box-shadow: 0 0 25px var(--moon); }
.orbit-node.is-active span { opacity: 1; color: var(--moon); }
.orbit-card { position: absolute; left: 4%; bottom: 5%; width: min(380px, 42%); padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: rgba(7,21,47,.83); backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.orbit-card small { color: var(--moon); font-size: 8px; letter-spacing: .18em; }
.orbit-card h3 { margin: 10px 0 8px; font: 500 28px Georgia, serif; }
.orbit-card p { font-size: 13px; line-height: 1.55; opacity: .66; }
.orbit-card > div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; font: 8px ui-monospace, monospace; }
.orbit-card b { color: var(--ice); }
.drag-note { position: absolute; right: 25px; bottom: 24px; font-size: 8px; letter-spacing: .17em; opacity: .4; }

.signal { background: linear-gradient(180deg, #050b18, #0a1b39); }
.signal::before { content: ""; position: absolute; left: 5%; top: 18%; width: 60%; height: 40%; border: 1px solid rgba(255,255,255,.05); border-radius: 50%; transform: rotate(12deg); }
.signal__header { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 52px; }
.lab-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 22px; }
.star-lab { height: 610px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #020712; cursor: crosshair; box-shadow: var(--shadow); }
#star-canvas { width: 100%; height: 100%; display: block; }
.lab-hud { position: absolute; top: 0; left: 0; right: 0; padding: 16px 20px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(2,7,18,.55); font: 9px ui-monospace, monospace; letter-spacing: .13em; pointer-events: none; }
.lab-hud b { color: var(--moon); }
.canvas-hint { position: absolute; left: 20px; bottom: 9px; font-size: 8px; letter-spacing: .16em; opacity: .42; pointer-events: none; }
.decoded-message { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-45%) scale(.88); width: min(480px,80%); opacity: 0; visibility: hidden; text-align: center; padding: 40px; border: 1px solid var(--moon); background: rgba(7,21,47,.93); box-shadow: 0 0 100px rgba(245,189,84,.2); transition: .5s cubic-bezier(.2,.8,.2,1); }
.decoded-message.is-visible { opacity: 1; visibility: visible; transform: translate(-50%,-50%) scale(1); }
.decoded-message small { color: var(--moon); letter-spacing: .2em; font-size: 8px; }
.decoded-message strong { display: block; margin: 14px 0 24px; font: 500 clamp(1.7rem,3vw,3rem)/1.1 Georgia, serif; }
.decoded-message button { border: 1px solid var(--line); background: transparent; padding: 10px 16px; border-radius: 999px; font-size: 9px; letter-spacing: .13em; cursor: pointer; }
.frequency-mixer { border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.035); overflow: hidden; box-shadow: var(--shadow); }
.mixer-title { display: flex; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: .14em; }
.mixer-title small { opacity: .45; font-size: 8px; }
.relic-buttons { display: grid; grid-template-columns: 1fr 1fr; }
.relic-buttons button { min-height: 96px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 16px; background: transparent; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; transition: .25s ease; }
.relic-buttons button:nth-child(2n) { border-right: 0; }
.relic-buttons b { font: 500 10px ui-monospace, monospace; color: var(--moon); }
.relic-buttons span { font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.relic-buttons button:hover, .relic-buttons button.is-active { background: var(--moon); color: var(--ink); }
.relic-buttons button.is-active b { color: var(--ink); }
.waveform { height: 82px; margin: 32px 20px 14px; background: repeating-linear-gradient(90deg, var(--ice) 0 2px, transparent 2px 8px); clip-path: polygon(0 50%, 5% 37%, 10% 66%, 15% 8%, 20% 78%, 25% 30%, 30% 58%, 35% 19%, 40% 88%, 45% 41%, 50% 67%, 55% 15%, 60% 82%, 65% 46%, 70% 62%, 75% 25%, 80% 92%, 85% 39%, 90% 61%, 95% 43%, 100% 50%, 100% 52%, 0 52%); animation: wave 1.2s steps(4) infinite alternate; }
@keyframes wave { to { transform: scaleY(.65) scaleX(1.02); filter: hue-rotate(30deg); } }
.frequency-mixer blockquote { margin: 0; padding: 20px 28px 36px; min-height: 156px; font: 500 22px/1.35 Georgia, serif; }
.mixer-readout { display: flex; justify-content: space-between; padding: 16px 20px; border-top: 1px solid var(--line); font: 8px ui-monospace, monospace; letter-spacing: .12em; color: var(--moon); }

.portrait-break { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8vw; align-items: center; background: var(--paper); color: var(--ink); }
.portrait-break__image { position: relative; transform: rotate(-2deg); padding: 12px 12px 48px; background: #fff; box-shadow: 24px 32px 0 var(--space), 0 30px 90px rgba(0,0,0,.25); }
.portrait-break__image img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.scan { position: absolute; left: 12px; right: 12px; top: 12px; height: 3px; background: var(--moon); box-shadow: 0 0 20px var(--moon); animation: scan 4s ease-in-out infinite alternate; }
@keyframes scan { to { transform: translateY(calc(min(40vw, 570px) - 18px)); } }
.portrait-break__copy > span { font-size: 10px; letter-spacing: .22em; font-weight: 900; color: var(--red); }
.portrait-break__copy h2 { margin: 16px 0 28px; font: 500 clamp(2.5rem,5vw,5.8rem)/.94 Georgia, serif; letter-spacing: -.055em; }
.portrait-break__copy p { max-width: 650px; font-size: 16px; line-height: 1.7; color: rgba(5,11,24,.72); }
.quote-chip { display: inline-block; margin-top: 22px; padding: 16px 22px; border: 2px solid var(--ink); border-radius: 50%; font: 800 10px/1.5 "Comic Sans MS", cursive; transform: rotate(3deg); }

.finale { min-height: 100vh; display: grid; place-items: center; text-align: center; background: radial-gradient(circle, #183d78 0, #08172f 35%, #020611 72%); overflow: hidden; }
.finale::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, white 0 1px, transparent 1.6px); background-size: 83px 83px; opacity: .2; }
.finale__halo { position: absolute; width: min(70vw, 900px); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 80px rgba(255,255,255,.015), 0 0 0 160px rgba(255,255,255,.01); animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); opacity: .7; } }
.finale__content { position: relative; z-index: 2; }
.finale__content > span { font-size: 10px; letter-spacing: .24em; color: var(--moon); }
.finale__content h2 { margin: 18px 0; font-size: clamp(5rem,13vw,13rem); line-height: .75; letter-spacing: -.09em; }
.finale__content p { font: 500 22px Georgia, serif; opacity: .65; }
.finale__content .hero__actions { justify-content: center; margin-top: 34px; }
.finale__footer { position: absolute; z-index: 3; bottom: 24px; left: clamp(24px,7vw,110px); right: clamp(24px,7vw,110px); display: flex; justify-content: space-between; font-size: 8px; letter-spacing: .15em; opacity: .6; }
.sound-toggle { border: 0; background: none; font-size: inherit; letter-spacing: inherit; cursor: pointer; }

.toast { position: fixed; z-index: 120; left: 50%; bottom: 32px; transform: translate(-50%,30px); opacity: 0; padding: 13px 20px; background: var(--moon); color: var(--ink); border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .14em; pointer-events: none; transition: .35s ease; }
.toast.is-visible { transform: translate(-50%,0); opacity: 1; }
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .85s ease, transform .85s cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr .8fr; padding-left: 5vw; padding-right: 5vw; }
  .hero__visual { width: 46vw; }
  h1 { font-size: clamp(5rem,12vw,8.8rem); }
  .origin__grid { grid-template-columns: 190px 1fr; }
  .relic-card { display: none; }
  .lab-grid { grid-template-columns: 1fr; }
  .frequency-mixer { display: grid; grid-template-columns: .7fr 1fr; }
  .mixer-title, .mixer-readout { grid-column: 1 / -1; }
  .waveform { align-self: center; }
}

@media (max-width: 760px) {
  .topbar { min-height: 70px; padding: 12px 18px; }
  .menu-toggle { display: block; position: relative; z-index: 2; }
  .menu-toggle span { display: block; width: 24px; height: 1px; background: var(--paper); margin: 7px auto; transition: .3s ease; }
  .menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  nav { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; background: rgba(5,11,24,.97); transform: translateY(-100%); transition: transform .45s cubic-bezier(.2,.8,.2,1); }
  .menu-open nav { transform: translateY(0); }
  nav a { font-size: 18px; }
  .nav-x { width: 50px; height: 50px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 112px 20px 100px; }
  .hero__copy { order: 2; margin-top: -12vw; position: relative; }
  .hero__visual { order: 1; width: 88vw; align-self: center; }
  h1 { font-size: 26vw; }
  .hero__lede { font-size: 1.05rem; margin-left: 0; }
  .signal-strip { overflow-x: auto; }
  .signal-strip span { min-width: 128px; }
  .scribble--one { left: 0; }
  .scroll-cue { display: none; }
  .mode-dock { position: fixed; z-index: 90; bottom: 10px; }
  .mode-dock > span { display: none; }
  .section { padding: 90px 20px; }
  .section-label { margin-bottom: 45px; }
  .origin__grid { grid-template-columns: 1fr; }
  .chapter-index { display: grid; grid-template-columns: 1fr 1fr; }
  .chapter-tab { min-height: 64px; border-top: 1px solid var(--line); }
  .story-console { min-height: 0; padding: 22px; }
  .story-title { font-size: 2.5rem; }
  .story-text { columns: 1; }
  .story-meta { grid-template-columns: 1fr; }
  .story-meta div { border-right: 0; border-bottom: 1px solid var(--line); }
  .nameplate { grid-template-columns: 1fr; gap: 80px; }
  .nameplate__moon { width: 80vw; justify-self: center; }
  .orbit__intro, .signal__header { display: block; }
  .orbit__intro p, .signal__header p { margin-top: 22px; }
  .orbit-map { height: 680px; min-height: 680px; border-radius: 25px; }
  .map-core { width: 31%; }
  .orbit-card { left: 4%; width: 92%; bottom: 4%; }
  .orbit-node { flex-direction: column; }
  .orbit-node span { display: none; }
  .drag-note { display: none; }
  .star-lab { height: 520px; }
  .frequency-mixer { display: block; }
  .portrait-break { grid-template-columns: 1fr; gap: 76px; }
  .portrait-break__image { max-width: 540px; }
  .finale__footer { flex-direction: column; gap: 8px; align-items: center; }
  .cursor-glow { display: none; }
}

@media (max-width: 430px) {
  .brand > span:last-child { font-size: 9px; }
  .hero__actions .button { width: 100%; }
  .mode-dock button { padding: 9px 12px; }
  .chapter-index { grid-template-columns: 1fr; }
  .chapter-tab { min-height: 54px; }
  .signal__header h2, .orbit__intro h2 { font-size: 3.1rem; }
  .relic-buttons button { min-height: 78px; }
  .finale__content h2 { font-size: 23vw; }
}

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