:root {
  /* Typography map: Interface captions use Space Grotesk; masthead uses Roboto Slab** and Space Grotesk** fallbacks. */
  --night-soil: #16110B;
  --wet-compost: #3A2417;
  --chlorophyll: #39FF7A;
  --cyan: #00E7FF;
  --pollen: #FFF45C;
  --magenta: #FF3DAE;
  --seed-tray: #D8FFE7;
  --leaf-shadow: #6C8F3D;
  --shift: 0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--seed-tray);
  background:
    radial-gradient(circle at 50% calc(100% - 80px), rgba(57, 255, 122, calc(.12 + var(--shift) * .12)), transparent 31rem),
    radial-gradient(circle at 78% 18%, rgba(0, 231, 255, calc(.12 + var(--shift) * .24)), transparent 26rem),
    linear-gradient(180deg, #16110B 0%, #20140c 50%, #0b100d 100%);
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(216,255,231,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216,255,231,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
  z-index: 1;
}

.atmosphere { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.scanline {
  position: absolute;
  left: -10%; right: -10%; top: 17%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--chlorophyll), transparent);
  box-shadow: 0 0 24px var(--cyan);
  animation: scanDrift 6.5s ease-in-out infinite;
}
.greenhouse-ribs {
  position: absolute; inset: 3rem 5vw auto; height: 62vh; border-radius: 50% 50% 0 0 / 80% 80% 0 0;
  border: 1px solid rgba(0,231,255,.22); border-bottom: 0;
  box-shadow: inset 0 0 50px rgba(0,231,255,.06), 0 0 40px rgba(57,255,122,.04);
}
.greenhouse-ribs::before, .greenhouse-ribs::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 33%; border-radius: 50% 50% 0 0;
  border-top: 1px solid rgba(216,255,231,.17);
}
.greenhouse-ribs::before { left: 16%; border-left: 1px solid rgba(216,255,231,.08); transform: skewX(-11deg); }
.greenhouse-ribs::after { right: 16%; border-right: 1px solid rgba(216,255,231,.08); transform: skewX(11deg); }
.seed-row { position: absolute; width: 42rem; height: 12rem; border-top: 1px dotted rgba(255,244,92,.42); transform: rotate(-8deg); opacity: .5; }
.seed-row-one { left: -8rem; bottom: 8rem; }
.seed-row-two { right: -10rem; bottom: 16rem; transform: rotate(7deg); border-color: rgba(57,255,122,.35); }

.masthead, .section-switcher {
  position: fixed; z-index: 10;
  border: 1px solid rgba(216,255,231,.28);
  background: rgba(22,17,11,.56);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 22px rgba(216,255,231,.06), 0 0 24px rgba(0,231,255,.08);
}
.masthead {
  top: 1rem; left: 1rem; display: flex; align-items: center; gap: .55rem;
  padding: .6rem .8rem; border-radius: 999px; font-family: "Roboto Slab", Georgia, serif; font-weight: 900; letter-spacing: .04em;
}
.masthead small { font-family: "Space Grotesk", Inter, sans-serif; color: var(--leaf-shadow); font-size: .68rem; text-transform: uppercase; }
.mast-dot { width: .62rem; height: .62rem; border-radius: 50%; background: var(--chlorophyll); box-shadow: 0 0 16px var(--chlorophyll); }
.section-switcher { right: 1rem; top: 50%; transform: translateY(-50%); display: grid; gap: .35rem; padding: .55rem; border-radius: 1.3rem; }
.section-switcher a { color: rgba(216,255,231,.65); text-decoration: none; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: .55rem .7rem; border-radius: 999px; transition: .35s ease; }
.section-switcher a.active, .section-switcher a:hover { color: var(--night-soil); background: linear-gradient(90deg, var(--cyan), var(--chlorophyll)); box-shadow: 0 0 18px rgba(57,255,122,.32); }

.panel { min-height: 100vh; position: relative; z-index: 2; padding: 8rem 8vw; display: grid; place-items: center; }
.hero-panel { overflow: hidden; }
.soil-horizon { position: absolute; left: 0; right: 0; bottom: 0; height: 32vh; background: linear-gradient(180deg, transparent, var(--wet-compost) 38%, var(--night-soil)); border-top: 1px solid rgba(255,244,92,.16); }
.root-network { position: absolute; inset: 3vh 0 auto 0; width: 100%; height: 100%; opacity: .85; }
.root-path { fill: none; stroke: url(#none); stroke: var(--cyan); stroke-width: 2.1; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(0,231,255,.65)); stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: drawRoot 4s ease forwards; }
.root-main { stroke: var(--chlorophyll); stroke-width: 3; animation-delay: .3s; }
.root-fine { stroke: var(--pollen); stroke-width: 1.3; animation-delay: 1.1s; }
.stem-system { width: min(100%, 1120px); min-height: 80vh; position: relative; display: grid; place-items: center; }
.news-stem { position: absolute; top: 13%; bottom: -5%; left: 50%; width: 9px; transform: translateX(-50%); border-radius: 999px; background: rgba(108,143,61,.28); overflow: hidden; box-shadow: 0 0 35px rgba(57,255,122,.18); }
.news-stem span { display: block; width: 100%; height: 28%; background: linear-gradient(180deg, var(--cyan), var(--chlorophyll), var(--pollen)); border-radius: inherit; box-shadow: 0 0 24px var(--chlorophyll); transition: height .18s linear; }
.sprout-title {
  margin: 0; font-family: "Roboto Slab", Georgia, serif; font-size: clamp(4.6rem, 13vw, 13rem); font-weight: 900; letter-spacing: .035em; line-height: .82;
  color: transparent; -webkit-text-stroke: 1px rgba(216,255,231,.38);
  background: linear-gradient(0deg, var(--chlorophyll) 0 50%, var(--seed-tray) 70%, var(--cyan) 100%); background-size: 100% 220%; background-position: 0 100%;
  -webkit-background-clip: text; background-clip: text; animation: sproutFill 2.2s cubic-bezier(.2,.9,.1,1) forwards;
  text-shadow: 0 0 40px rgba(57,255,122,.26); z-index: 3;
}
.hero-copy { position: absolute; top: 63%; width: min(34rem, 84vw); text-align: center; color: rgba(216,255,231,.74); line-height: 1.6; }

.story-capsule, .field-note, .archive-orb, .wire-illustration {
  --mx: 50%; --my: 50%; position: absolute; border-radius: 2rem; padding: 1.35rem; color: var(--seed-tray);
  background: radial-gradient(circle at var(--mx) var(--my), rgba(57,255,122,.18), transparent 28%), rgba(22,17,11,.64);
  border: 1px solid rgba(216,255,231,.22); backdrop-filter: blur(18px); overflow: hidden;
  box-shadow: inset 0 0 28px rgba(216,255,231,.05), 0 0 28px rgba(0,231,255,.08);
}
.story-capsule::before, .field-note::before, .archive-orb::before, .wire-illustration::before {
  content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: conic-gradient(from var(--angle, 0deg), var(--cyan), var(--chlorophyll), var(--pollen), var(--magenta), var(--cyan));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; animation: membrane 5s linear infinite; opacity: .82;
}
.story-capsule { width: min(21rem, 36vw); z-index: 4; }
.story-capsule h2 { margin: .45rem 0 .5rem; font-family: "Zilla Slab", Georgia, serif; font-size: clamp(1.28rem, 2vw, 2rem); line-height: 1.02; }
.story-capsule p { margin: 0; color: rgba(216,255,231,.66); line-height: 1.45; font-size: .92rem; }
.story-time, .system-caption, .field-note span, .archive-orb span, .panel-marker { font-size: .72rem; letter-spacing: .13em; color: var(--pollen); text-transform: uppercase; font-weight: 700; }
.capsule-left { left: 1vw; }
.capsule-right { right: 1vw; }
.capsule-one { top: 18%; }
.capsule-two { top: 39%; }
.capsule-three { top: 60%; }
.capsule-left::after, .capsule-right::after { content: ""; position: absolute; top: 50%; width: 10vw; border-top: 1px solid rgba(57,255,122,.5); box-shadow: 0 0 12px rgba(57,255,122,.5); }
.capsule-left::after { left: 100%; transform: rotate(-7deg); transform-origin: left; }
.capsule-right::after { right: 100%; transform: rotate(8deg); transform-origin: right; }

.layer-panel { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.panel-marker { position: absolute; top: 7rem; left: 8vw; color: var(--cyan); }
.layer-copy h2, .archive-orb h2 { font-family: "Roboto Slab", Georgia, serif; font-size: clamp(2.6rem, 6vw, 6.6rem); line-height: .92; margin: .7rem 0 1rem; color: var(--seed-tray); }
.layer-copy p, .archive-orb p { color: rgba(216,255,231,.72); font-size: 1.15rem; line-height: 1.65; max-width: 38rem; }
.wire-illustration { position: relative; width: min(38rem, 80vw); aspect-ratio: 1.24; padding: 2rem; }
.wire-illustration svg { width: 100%; height: 100%; overflow: visible; }
.wire-illustration path, .wire-illustration circle { fill: none; stroke: var(--chlorophyll); stroke-width: 3; filter: drop-shadow(0 0 8px rgba(57,255,122,.6)); }
.draw-line { stroke-dasharray: 900; stroke-dashoffset: 900; animation: drawRoot 5s ease infinite alternate; }
.delay { animation-delay: .8s; stroke: var(--cyan) !important; }
.delay-two { animation-delay: 1.4s; stroke: var(--pollen) !important; }
.leaf-grid { display: grid; width: min(76rem, 86vw); grid-template-columns: repeat(3, 1fr); gap: 1.3rem; align-items: end; }
.field-note { position: relative; min-height: 22rem; display: flex; flex-direction: column; justify-content: flex-end; }
.field-note.tall { min-height: 31rem; }
.field-note h3 { font-family: "Zilla Slab", Georgia, serif; font-size: clamp(1.7rem, 3vw, 3.3rem); line-height: 1; margin: .8rem 0 0; }
.field-note::after { content: ""; position: absolute; inset: 2rem 20% auto; height: 10rem; border: 1px solid rgba(57,255,122,.44); border-radius: 100% 0 100% 0; transform: rotate(-28deg); box-shadow: inset 0 0 20px rgba(57,255,122,.09), 0 0 18px rgba(57,255,122,.16); }
.sky-panel { display: grid; place-items: center; }
.archive-orb { position: relative; width: min(60rem, 86vw); min-height: 31rem; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 5rem; background: radial-gradient(circle, rgba(0,231,255,.16), rgba(22,17,11,.72) 62%); }

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes membrane { to { --angle: 360deg; } }
@keyframes drawRoot { to { stroke-dashoffset: 0; } }
@keyframes sproutFill { 0% { transform: translateY(4rem) scale(.96); background-position: 0 100%; opacity: 0; } 100% { transform: translateY(0) scale(1); background-position: 0 0; opacity: 1; } }
@keyframes scanDrift { 0%,100% { transform: translateY(0); opacity: .24; } 50% { transform: translateY(58vh); opacity: .8; } }

@media (max-width: 860px) {
  .section-switcher { top: auto; bottom: 1rem; left: 1rem; right: 1rem; transform: none; grid-template-columns: repeat(4, 1fr); }
  .section-switcher a { font-size: .58rem; text-align: center; padding: .5rem .25rem; }
  .panel { padding: 7rem 1rem; }
  .story-capsule { position: relative; left: auto; right: auto; top: auto; width: 92vw; margin: .75rem auto; }
  .story-capsule::after { display: none; }
  .stem-system { align-content: start; padding-top: 12vh; }
  .hero-copy { position: relative; top: auto; margin: 1.5rem 0; }
  .layer-panel { grid-template-columns: 1fr; }
  .leaf-grid { grid-template-columns: 1fr; }
  .field-note, .field-note.tall { min-height: 18rem; }
  .archive-orb { border-radius: 2.5rem; padding: 2rem; }
}
