:root {
  --lunorb-motion-reveal: cubic-bezier(.22, 1, .36, 1);
  --lunorb-motion-orbit: cubic-bezier(.45, 0, .55, 1);
  --lunorb-motion-focus: cubic-bezier(.4, 0, .2, 1);
  --lunorb-chapter-void: #010308;
  --lunorb-chapter-midnight: #030813;
  --lunorb-chapter-rim: #d9e9ff;
  --lunorb-chapter-blue: #447cff;
}

.chapter-one {
  height: 215svh;
  min-height: 1200px;
  padding: 0;
  display: block;
  overflow: clip;
  background: var(--lunorb-chapter-void);
  isolation: isolate;
}

.chapter-one::after {
  display: none;
}

.chapter-one__stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 72% 46%, rgba(28, 59, 114, .08), transparent 38%),
    linear-gradient(180deg, #010308 0%, #020610 66%, #01040a 100%);
}

.chapter-one__environment,
.chapter-one__starfield,
.chapter-one__haze,
.chapter-one__planet-shell,
.chapter-one__terrain,
.chapter-transition {
  position: absolute;
}

.chapter-one__environment,
.chapter-one__starfield,
.chapter-one__haze,
.chapter-transition {
  inset: 0;
}

.chapter-one__environment {
  z-index: 1;
  pointer-events: none;
}

.chapter-one__starfield {
  will-change: transform, opacity;
}

.chapter-one__starfield--far {
  opacity: .38;
  background-image:
    radial-gradient(circle, rgba(229, 238, 255, .72) 0 1px, transparent 1.35px),
    radial-gradient(circle, rgba(112, 153, 220, .5) 0 .75px, transparent 1.2px),
    radial-gradient(circle, rgba(255, 255, 255, .34) 0 .6px, transparent 1px);
  background-position: 12px 20px, 74px 41px, 39px 91px;
  background-size: 149px 149px, 223px 223px, 97px 97px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.46) 49%, #000);
}

.chapter-one__starfield--near {
  opacity: .48;
  background-image:
    radial-gradient(circle, rgba(236, 245, 255, .94) 0 1.1px, transparent 1.8px),
    radial-gradient(circle, rgba(91, 142, 255, .82) 0 1px, transparent 2.1px);
  background-position: 43px 31px, 127px 84px;
  background-size: 311px 311px, 419px 419px;
  filter: drop-shadow(0 0 4px rgba(102, 155, 255, .42));
}

.chapter-one__haze {
  opacity: .82;
  background:
    radial-gradient(ellipse at 69% 40%, rgba(91, 133, 204, .16), transparent 19%),
    radial-gradient(ellipse at 77% 49%, rgba(36, 76, 141, .18), transparent 34%),
    radial-gradient(ellipse at 52% 100%, rgba(19, 39, 72, .2), transparent 42%);
  filter: blur(22px);
  will-change: transform, opacity;
}

.chapter-one__planet-shell {
  right: -14vw;
  bottom: -48vw;
  width: min(82vw, 1160px);
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform, opacity;
}

.chapter-one__planet,
.chapter-one__rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.chapter-one__planet {
  overflow: hidden;
  background:
    radial-gradient(circle at 23% 19%, rgba(211, 225, 245, .23) 0 .5%, transparent .85%),
    radial-gradient(circle at 39% 16%, rgba(177, 197, 224, .18) 0 .9%, transparent 1.35%),
    radial-gradient(circle at 17% 37%, rgba(199, 216, 239, .15) 0 .7%, transparent 1.15%),
    radial-gradient(circle at 36% 31%, #657182 0%, #364352 9%, #192431 28%, #0a121d 50%, #030811 72%);
  box-shadow: inset -110px -145px 170px #010207, inset 34px 20px 66px rgba(203, 223, 247, .08);
}

.chapter-one__surface-noise {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: .28;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(circle at 20% 31%, transparent 0 1.4%, rgba(2, 5, 10, .75) 1.6% 2.2%, transparent 2.5%),
    radial-gradient(circle at 38% 11%, rgba(230, 239, 250, .14) 0 .3%, transparent .75%),
    radial-gradient(circle at 11% 48%, rgba(230, 239, 250, .1) 0 .45%, transparent .9%);
  background-size: 180px 180px, 121px 121px, 93px 93px;
  filter: contrast(1.7);
}

.chapter-one__crater {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: .72;
  background: radial-gradient(ellipse at 43% 40%, rgba(2, 5, 10, .9) 0 43%, rgba(27, 37, 49, .72) 50%, rgba(178, 199, 222, .13) 56%, transparent 62%);
  box-shadow: inset 9px 10px 13px rgba(0, 0, 0, .72), -1px -1px 3px rgba(213, 228, 245, .07);
  filter: blur(.15px);
}

.chapter-one__crater--one { width: 9%; height: 7%; left: 21%; top: 24%; transform: rotate(17deg); }
.chapter-one__crater--two { width: 5%; height: 4%; left: 41%; top: 13%; transform: rotate(-8deg); }
.chapter-one__crater--three { width: 3%; height: 2.5%; left: 10%; top: 42%; transform: rotate(12deg); }
.chapter-one__crater--four { width: 6%; height: 4.5%; left: 36%; top: 37%; opacity: .5; transform: rotate(-15deg); }

.chapter-one__rim {
  inset: -2px;
  border-top: 2px solid rgba(229, 240, 255, .84);
  border-left: 1px solid rgba(147, 184, 238, .5);
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transform: rotate(-18deg);
  box-shadow:
    -14px -21px 35px rgba(191, 219, 255, .25),
    -31px -38px 110px rgba(54, 111, 222, .22);
  filter: drop-shadow(-3px -5px 8px rgba(211, 232, 255, .26));
}

.chapter-one__orbit {
  position: absolute;
  inset: 39% -11% 38% -13%;
  border: 1px solid rgba(103, 151, 255, .42);
  border-radius: 50%;
  transform: rotate(-19deg);
  box-shadow: 0 -1px 8px rgba(91, 139, 255, .14);
  opacity: .34;
  will-change: transform, opacity;
}

.chapter-one__orbit i {
  position: absolute;
  width: 5px;
  height: 5px;
  top: 3%;
  left: 50%;
  border-radius: 50%;
  background: #f0f6ff;
  box-shadow: 0 0 8px #fff, 0 0 22px rgba(68, 124, 255, .95);
}

.chapter-one__terrain {
  z-index: 3;
  left: -4%;
  bottom: -4%;
  width: 58%;
  height: 25%;
  opacity: .98;
  background:
    radial-gradient(ellipse at 35% 0%, rgba(194, 213, 237, .17), transparent 13%),
    linear-gradient(152deg, #0e1722 0%, #050911 42%, #010207 74%);
  clip-path: polygon(0 35%, 8% 31%, 15% 17%, 20% 29%, 27% 13%, 35% 28%, 44% 18%, 51% 35%, 61% 23%, 70% 43%, 80% 34%, 91% 55%, 100% 47%, 100% 100%, 0 100%);
  filter: drop-shadow(0 -2px 7px rgba(170, 203, 244, .1));
  will-change: transform, opacity;
}

.chapter-one__terrain span {
  position: absolute;
  display: block;
  width: clamp(28px, 5vw, 76px);
  aspect-ratio: 1.6;
  bottom: 3%;
  left: calc(9% + var(--rock, 0) * 16%);
  border-radius: 49% 51% 35% 65%;
  background: linear-gradient(145deg, #182332, #02040a 68%);
  transform: rotate(calc(-14deg + var(--rock, 0) * 7deg));
}
.chapter-one__terrain span:nth-child(1) { --rock: 0; }
.chapter-one__terrain span:nth-child(2) { --rock: 1; width: clamp(18px, 3vw, 48px); }
.chapter-one__terrain span:nth-child(3) { --rock: 2; }
.chapter-one__terrain span:nth-child(4) { --rock: 3; width: clamp(16px, 2.5vw, 40px); }
.chapter-one__terrain span:nth-child(5) { --rock: 4; width: clamp(22px, 4vw, 64px); }

.chapter-one__deep-signals {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  will-change: transform, opacity;
}

.chapter-one__signal {
  position: absolute;
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  column-gap: 8px;
  color: rgba(194, 211, 236, .68);
  font: 500 7px/1.5 "DM Mono", monospace;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.chapter-one__signal i {
  grid-row: 1 / 3;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #dcecff;
  box-shadow: 0 0 12px rgba(68, 124, 255, .9);
}

.chapter-one__signal b { color: rgba(94, 137, 205, .54); font-weight: 400; }
.chapter-one__signal--one { top: 26%; left: 58%; }
.chapter-one__signal--two { top: 45%; right: 9%; }

.chapter-one__content {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: clamp(24px, 8vw, 132px);
  width: min(620px, 46vw);
  max-width: none;
  text-align: left;
  transform: translateY(-47%);
  will-change: transform, opacity;
}

.chapter-one__content::before { display: none; }

.chapter-one .eyebrow {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(156, 174, 199, .64);
  letter-spacing: .29em;
}

.chapter-one .eyebrow span {
  width: 26px;
  height: 1px;
  border-radius: 0;
  background: rgba(107, 151, 220, .72);
  box-shadow: none;
}

.chapter-one .eyebrow i { color: rgba(190, 211, 240, .84); }

.chapter-one__wordmark {
  display: flex;
  align-items: center;
  margin: clamp(32px, 6vh, 62px) 0 clamp(22px, 4vh, 38px);
  color: #f4f7fb;
  font: 400 clamp(19px, 2.2vw, 31px)/1 "Inter", sans-serif;
  letter-spacing: .42em;
  text-shadow: 0 0 26px rgba(151, 190, 247, .12);
}

.chapter-one__orbital-o {
  position: relative;
  display: inline-block;
  margin-left: -.08em;
}

.chapter-one__orbital-o::after {
  content: "";
  position: absolute;
  inset: 33% -33% 25% -37%;
  border: 1px solid rgba(129, 172, 239, .82);
  border-radius: 50%;
  transform: rotate(-52deg);
  box-shadow: 0 0 11px rgba(68, 124, 255, .26);
}

.chapter-one__orbital-o::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 3px;
  height: 3px;
  right: -25%;
  top: 14%;
  border-radius: 50%;
  background: #f5f9ff;
  box-shadow: 0 0 7px #fff;
}

.chapter-one h1 {
  margin: 0;
  max-width: 670px;
  color: #edf2f8;
  font: 400 clamp(47px, 5.2vw, 79px)/1.02 "Inter", sans-serif;
  letter-spacing: -.058em;
  text-wrap: balance;
}

.chapter-one h1 span {
  color: #aebfd9;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 0 42px rgba(78, 129, 218, .15);
}

.chapter-one__content > .chapter-one__support {
  max-width: 475px;
  margin: 24px 0 0;
  color: rgba(174, 189, 210, .68);
  font: 400 clamp(14px, 1.2vw, 17px)/1.75 "Inter", sans-serif;
  text-shadow: none;
}

.chapter-one__actions { margin-top: 32px; }

.chapter-one__cta {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  min-height: 48px;
  padding: 0 17px 0 20px;
  border: 1px solid rgba(100, 145, 217, .44);
  border-radius: 999px;
  color: #dce8fa;
  background: rgba(7, 14, 25, .68);
  box-shadow: inset 0 0 22px rgba(56, 103, 181, .05), 0 0 30px rgba(25, 69, 145, .08);
  font: 500 9px "DM Mono", monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: border-color .35s, background .35s, transform .35s;
}

.chapter-one__cta i { color: #91b5f2; font: normal 14px/1 "Inter", sans-serif; }
.chapter-one__cta:hover { border-color: rgba(151, 190, 247, .72); background: rgba(13, 27, 49, .76); transform: translateY(-2px); }

.chapter-one .scroll-cue {
  z-index: 8;
  bottom: 30px;
  color: rgba(151, 170, 197, .56);
  font-size: 7px;
  letter-spacing: .24em;
}

.chapter-one .scroll-cue span {
  height: 34px;
  background: linear-gradient(rgba(171, 203, 248, .72), transparent);
}

.chapter-transition {
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  will-change: opacity, transform;
}

.chapter-transition__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 70%, rgba(33, 66, 121, .13), transparent 36%),
    linear-gradient(180deg, transparent 0%, rgba(1, 4, 10, .18) 46%, #02050c 100%);
}

.chapter-transition__coordinates {
  position: absolute;
  right: clamp(24px, 7vw, 110px);
  bottom: clamp(52px, 9vh, 92px);
  display: grid;
  grid-template-columns: auto 74px auto;
  align-items: center;
  gap: 15px;
  color: rgba(154, 179, 216, .58);
  font: 500 7px "DM Mono", monospace;
  letter-spacing: .24em;
}

.chapter-transition__coordinates i { height: 1px; background: rgba(97, 137, 199, .3); }
.chapter-transition__coordinates b { color: rgba(204, 221, 244, .76); font-weight: 500; }

.chapter-transition__nodes {
  position: absolute;
  top: 15%;
  right: 6%;
  width: min(34vw, 460px);
  height: 44%;
}

.chapter-transition__nodes::before,
.chapter-transition__nodes::after {
  content: "";
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 134, 202, .22), transparent);
  transform-origin: left center;
}
.chapter-transition__nodes::before { left: 12%; top: 31%; width: 72%; transform: rotate(17deg); }
.chapter-transition__nodes::after { left: 22%; top: 64%; width: 58%; transform: rotate(-12deg); }

.chapter-transition__nodes i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(212, 230, 255, .88);
  box-shadow: 0 0 10px rgba(68, 124, 255, .72);
}
.chapter-transition__nodes i:nth-child(1) { left: 10%; top: 25%; }
.chapter-transition__nodes i:nth-child(2) { left: 35%; top: 40%; }
.chapter-transition__nodes i:nth-child(3) { left: 66%; top: 20%; }
.chapter-transition__nodes i:nth-child(4) { left: 81%; top: 54%; }
.chapter-transition__nodes i:nth-child(5) { left: 46%; top: 76%; }
.chapter-transition__nodes i:nth-child(6) { left: 19%; top: 63%; }

.js .chapter-one.chapter-one--motion-ready .chapter-one__starfield,
.js .chapter-one.chapter-one--motion-ready .chapter-one__haze,
.js .chapter-one.chapter-one--motion-ready .chapter-one__planet-shell,
.js .chapter-one.chapter-one--motion-ready .chapter-one__eyebrow,
.js .chapter-one.chapter-one--motion-ready .chapter-one__wordmark,
.js .chapter-one.chapter-one--motion-ready h1,
.js .chapter-one.chapter-one--motion-ready .chapter-one__support,
.js .chapter-one.chapter-one--motion-ready .chapter-one__actions,
.js .chapter-one.chapter-one--motion-ready .chapter-one__scroll-cue {
  visibility: hidden;
}

body[data-page="home"] .hero-grid,
body[data-page="home"] .hero > .orb,
body[data-page="home"] .hero > .nebula-vignette,
body[data-page="home"] .hero > .constellation-label { display: none; }

body[data-page="home"] #galaxyCanvas { opacity: .16; background: var(--lunorb-chapter-void); }
body[data-page="home"] #galaxyCanvas.galaxy-background--ready { opacity: .22; }
body[data-page="home"] .nav-shell { background: rgba(1, 3, 8, .52); backdrop-filter: blur(16px); }
body[data-page="home"] .nav-shell.scrolled { background: rgba(1, 3, 8, .82); }

.loader { background: #010308; }
.loader p { color: rgba(173, 196, 230, .64); letter-spacing: .38em; }
.loader-mark span { border-top-color: rgba(224, 237, 255, .82); }
.loader-mark span:nth-child(2) { border-top-color: rgba(92, 142, 226, .62); }
.loader-mark span:nth-child(3) { border-top-color: rgba(68, 124, 255, .42); }

@media (max-width: 1000px) {
  .chapter-one__planet-shell { right: -32vw; bottom: -39vw; width: 110vw; }
  .chapter-one__content { left: clamp(24px, 6vw, 70px); width: min(610px, 64vw); }
  .chapter-one__terrain { width: 70%; }
}

@media (max-width: 680px) {
  .chapter-one { height: 185svh; min-height: 980px; }
  .chapter-one__stage { min-height: 540px; }
  .chapter-one__content {
    top: 42%;
    left: 22px;
    right: 22px;
    width: auto;
    transform: translateY(-42%);
  }
  .chapter-one__wordmark { margin: 26px 0 22px; font-size: 18px; }
  .chapter-one h1 { font-size: clamp(39px, 11.5vw, 56px); }
  .chapter-one__content > .chapter-one__support { max-width: 88%; font-size: 13px; line-height: 1.65; }
  .chapter-one__actions { margin-top: 25px; }
  .chapter-one__planet-shell { width: 146vw; right: -72vw; bottom: -55vw; }
  .chapter-one__terrain { width: 95%; height: 20%; bottom: -3%; opacity: .88; }
  .chapter-one__signal--one { left: 15%; top: 69%; }
  .chapter-one__signal--two { right: 7%; top: 57%; }
  .chapter-transition__coordinates { right: 18px; grid-template-columns: auto 30px auto; gap: 9px; }
  .chapter-transition__nodes { width: 70vw; right: 2%; top: 20%; }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-one { height: auto; min-height: 100svh; }
  .chapter-one__stage { position: relative; }
  .chapter-one__starfield,
  .chapter-one__haze,
  .chapter-one__planet-shell,
  .chapter-one__terrain,
  .chapter-one__content,
  .chapter-one__orbit { will-change: auto; }
  .chapter-one__orbit i { animation: none; }
  .chapter-transition { display: none; }
}
