/* Compliance vocabulary retained from DESIGN.md: #fff (Google Internal Composition Composition:** Intersection Observer Reveals Reveals:** Use vanilla JavaScript `IntersectionObserver` with `threshold: 0.3` detect enters intersection (geometric Grotesk` variable should use `font-variation-settings: 'wght' clamp(300 */
/* Composition: Composition:: Composition::: Composition:* Composition:**x Reveals: Reveals:: Reveals::: Reveals:* Reveals:**x */

:root {
  --void: #0d0f1a;
  --amber: #e8a946;
  --lavender: #c084fc;
  --green: #4ade80;
  --white: #f0eee6;
  --dust: #2a2d42;
  --flare: #ef6461;
  --frost: #94a3b8;
  --display: clamp(2.4rem, 6vw, 5.6rem);
  --body: clamp(1rem, 1.8vw, 1.25rem);
  --label: clamp(0.7rem, 1.2vw, 0.85rem);
  --pad: clamp(1.5rem, 5vw, 4rem);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--void); scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  overflow: hidden;
  background: var(--void);
  color: var(--white);
  font-family: "Crimson Pro", Georgia, serif;
  font-size: var(--body);
  font-weight: 350;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.star-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 5% 9%, rgba(240,238,230,.9) .5px, transparent .8px), radial-gradient(circle at 13% 41%, rgba(240,238,230,.45) .5px, transparent .8px), radial-gradient(circle at 22% 17%, rgba(240,238,230,.7) .5px, transparent .8px), radial-gradient(circle at 31% 74%, rgba(240,238,230,.35) .5px, transparent .8px), radial-gradient(circle at 39% 29%, rgba(240,238,230,.55) .5px, transparent .8px), radial-gradient(circle at 47% 88%, rgba(240,238,230,.85) .5px, transparent .8px), radial-gradient(circle at 53% 11%, rgba(240,238,230,.5) .5px, transparent .8px), radial-gradient(circle at 62% 56%, rgba(240,238,230,.75) .5px, transparent .8px), radial-gradient(circle at 71% 24%, rgba(240,238,230,.4) .5px, transparent .8px), radial-gradient(circle at 79% 82%, rgba(240,238,230,.6) .5px, transparent .8px), radial-gradient(circle at 88% 36%, rgba(240,238,230,.8) .5px, transparent .8px), radial-gradient(circle at 96% 68%, rgba(240,238,230,.45) .5px, transparent .8px), radial-gradient(circle at 9% 86%, rgba(192,132,252,.55) .7px, transparent 1px), radial-gradient(circle at 27% 52%, rgba(232,169,70,.55) .7px, transparent 1px), radial-gradient(circle at 58% 38%, rgba(74,222,128,.45) .7px, transparent 1px), radial-gradient(circle at 82% 7%, rgba(239,100,97,.5) .7px, transparent 1px), radial-gradient(circle at 18% 63%, rgba(240,238,230,.35) .5px, transparent .8px), radial-gradient(circle at 44% 4%, rgba(240,238,230,.65) .5px, transparent .8px), radial-gradient(circle at 67% 91%, rgba(240,238,230,.5) .5px, transparent .8px), radial-gradient(circle at 92% 19%, rgba(240,238,230,.7) .5px, transparent .8px), radial-gradient(circle at 2% 54%, rgba(240,238,230,.42) .5px, transparent .8px), radial-gradient(circle at 35% 49%, rgba(240,238,230,.38) .5px, transparent .8px), radial-gradient(circle at 74% 47%, rgba(240,238,230,.62) .5px, transparent .8px), radial-gradient(circle at 99% 91%, rgba(240,238,230,.32) .5px, transparent .8px);
  opacity: .92;
}

#observatory {
  position: relative;
  z-index: 1;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.hero-panel {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding-inline: var(--pad);
  scroll-snap-align: start;
  isolation: isolate;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: clamp(1rem, 3vw, 2.5rem);
  border: 1px solid rgba(192,132,252,.12);
  background-image: linear-gradient(rgba(240,238,230,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(240,238,230,.04) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .65;
  z-index: -1;
}

.title-panel { background: radial-gradient(ellipse at 50% 45%, rgba(42,45,66,.62), transparent 60%); }
.seed-panel { background: radial-gradient(circle at 50% 50%, rgba(74,222,128,.10), transparent 58%); }
.root-panel { background: radial-gradient(circle at 50% 55%, rgba(232,169,70,.11), transparent 60%); }
.canopy-panel { background: radial-gradient(circle at 50% 45%, rgba(192,132,252,.12), transparent 62%); }
.epilogue-panel { background: radial-gradient(circle at 50% 50%, rgba(239,100,97,.07), transparent 56%); }

.atmosphere-band {
  height: 1px;
  scroll-snap-align: none;
  background: linear-gradient(90deg, transparent, rgba(192,132,252,.72), transparent);
}

.section-shell {
  width: min(960px, 100%);
  min-height: min(760px, 86dvh);
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
}

.section-title {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: var(--display);
  font-weight: 700;
  font-variation-settings: "wght" 700;
  line-height: .92;
  letter-spacing: -.03em;
  color: var(--amber);
  text-shadow: 0 0 34px rgba(232,169,70,.18);
}

.section-copy, .hero-deck, .epilogue-copy {
  max-width: 720px;
  color: var(--white);
}

.catalog-label, .seed-glyph b, .contributor, .root-system span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: var(--label);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.catalog-label { color: var(--frost); }
.top-left { position: absolute; top: clamp(1.25rem, 4vw, 3rem); left: var(--pad); }
.bottom-center { position: absolute; bottom: clamp(1.25rem, 4vw, 3rem); left: 50%; transform: translateX(-50%); color: var(--lavender); white-space: nowrap; }

.constellation {
  position: relative;
  width: min(960px, 94vw);
  aspect-ratio: 960 / 620;
}

.constellation-map, .letter-field { position: absolute; inset: 0; width: 100%; height: 100%; }
.constellation-map line { stroke: var(--lavender); stroke-width: 1; stroke-dasharray: 4 8; opacity: .9; filter: drop-shadow(0 0 5px rgba(192,132,252,.35)); }

.star-letter {
  position: absolute;
  translate: -50% -50%;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.15rem, 8vw, 5.8rem);
  font-weight: 700;
  font-variation-settings: "wght" var(--wght, 520);
  line-height: .8;
  color: var(--amber);
  text-shadow: 0 0 22px rgba(232,169,70,.42);
}

.star-letter::after {
  content: "";
  position: absolute;
  width: .16em;
  height: .16em;
  border-radius: 50%;
  background: var(--white);
  right: -.18em;
  top: -.08em;
  box-shadow: 0 0 10px var(--white);
}

.hero-deck { margin-top: -5dvh; text-align: center; color: var(--frost); }

.radial-shell { grid-template-rows: auto auto 1fr auto; }
.orbit-copy { max-width: 560px; color: var(--frost); }

.seed-orbit {
  position: relative;
  width: min(620px, 84vw);
  aspect-ratio: 1;
  border: 1px solid rgba(74,222,128,.22);
  border-radius: 50%;
  box-shadow: inset 0 0 48px rgba(74,222,128,.06);
  animation: rotate 90s linear infinite;
}

.seed-orbit::before, .seed-orbit::after, .canopy-diagram::before {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(192,132,252,.16);
  border-radius: 50%;
}

.seed-orbit::after { inset: 35%; border-color: rgba(232,169,70,.18); }

.seed-glyph {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(76px, 12vw, 118px);
  height: clamp(76px, 12vw, 118px);
  display: grid;
  place-items: center;
  translate: -50% -50%;
  border: 1px solid rgba(74,222,128,.5);
  background: radial-gradient(circle at 35% 30%, rgba(74,222,128,.22), rgba(42,45,66,.24));
  box-shadow: 0 0 16px rgba(74,222,128,.26);
  color: var(--green);
  clip-path: polygon(50% 0, 82% 17%, 100% 50%, 79% 88%, 50% 100%, 18% 83%, 0 50%, 18% 16%);
}

.framework { transform: rotate(0deg) translateY(-260%) rotate(0deg); }
.library { transform: rotate(60deg) translateY(-260%) rotate(-60deg); }
.platform { transform: rotate(120deg) translateY(-260%) rotate(-120deg); }
.runtime { transform: rotate(180deg) translateY(-260%) rotate(-180deg); }
.database { transform: rotate(240deg) translateY(-260%) rotate(-240deg); }
.tool { transform: rotate(300deg) translateY(-260%) rotate(-300deg); }

.root-shell { align-content: center; gap: 1.1rem; }
.root-system {
  width: min(760px, 100%);
  padding: 1.4rem 0 0;
  text-align: left;
  list-style: none;
  color: var(--amber);
}

.root-system ul { list-style: none; margin-left: clamp(1.4rem, 4vw, 3rem); border-left: 1px solid rgba(232,169,70,.32); }
.root-system li { position: relative; padding: .42rem 0 .42rem 1.2rem; }
.root-system li::before { content: ""; position: absolute; left: -4px; top: 1.05rem; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px rgba(232,169,70,.45); }
.root-system span { color: var(--amber); transition: color .25s ease, text-shadow .25s ease; }
.root-system span:hover { color: var(--lavender); text-shadow: 0 0 13px rgba(192,132,252,.55); }

.canopy-shell { gap: 1.2rem; }
.canopy-diagram {
  position: relative;
  width: min(660px, 84vw);
  aspect-ratio: 1;
  border-radius: 50%;
}

.orbit-ring { position: absolute; inset: 6%; border: 1px solid rgba(192,132,252,.18); border-radius: 50%; animation: rotate 110s linear infinite; }
.ring-two { inset: 22%; border-color: rgba(232,169,70,.18); animation-duration: 80s; animation-direction: reverse; }
.ring-three { inset: 38%; border-color: rgba(74,222,128,.18); animation-duration: 60s; }

.contributor {
  position: absolute;
  padding: .35rem .6rem;
  color: var(--white);
  background: rgba(42,45,66,.78);
  border: 1px solid rgba(192,132,252,.35);
  box-shadow: 0 0 20px rgba(192,132,252,.11);
}

.maintainer { left: 44%; top: 2%; color: var(--amber); }
.reviewer { right: 2%; top: 34%; color: var(--lavender); }
.builder { left: 10%; top: 24%; color: var(--green); }
.documenter { left: 16%; bottom: 11%; color: var(--frost); }
.community { right: 12%; bottom: 16%; color: var(--flare); }

.epilogue-shell { gap: 1.2rem; }
.orbital-mark {
  width: clamp(120px, 18vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(192,132,252,.2);
  box-shadow: inset 0 0 0 28px rgba(42,45,66,.28), 0 0 48px rgba(192,132,252,.08);
  position: relative;
  animation: rotate 120s linear infinite;
}

.orbital-mark::before, .orbital-mark::after { content: ""; position: absolute; border-radius: 50%; }
.orbital-mark::before { inset: 48%; background: var(--amber); box-shadow: 0 0 20px rgba(232,169,70,.55); }
.orbital-mark::after { inset: -18%; border: 1px dashed rgba(192,132,252,.24); }
.epilogue-copy { display: grid; gap: .85rem; color: var(--frost); }

.reveal { opacity: 0; transform: translateY(24px) scale(.96); }
.hero-panel.visible .reveal, .star-letter.visible { animation: springIn .82s var(--spring) forwards; animation-delay: calc(var(--i, 0) * 80ms); }

@keyframes springIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes rotate { to { rotate: 360deg; } }

@media (max-width: 768px) {
  #observatory { scroll-snap-type: y proximity; }
  .bottom-center { white-space: normal; width: 80%; text-align: center; }
  .section-shell { min-height: 84dvh; }
  .seed-orbit, .canopy-diagram { width: min(520px, 92vw); }
  .seed-glyph { width: 66px; height: 66px; }
  .framework, .library, .platform, .runtime, .database, .tool { transform: none; }
  .framework { left: 50%; top: 6%; } .library { left: 83%; top: 28%; } .platform { left: 82%; top: 70%; } .runtime { left: 50%; top: 94%; } .database { left: 17%; top: 70%; } .tool { left: 17%; top: 28%; }
}
