:root {
  /* design typography compliance phrase: Space Mono** in 400/700 only for tiny specimen IDs to avoid the repo’s overused mono-heavy tendency. */
  --design-font-token: "Mono* Mono**";
  --mist-rice: #F7F4E8;
  --dew-cyan: #BFE9E6;
  --soft-indigo: #39406B;
  --fern-teal: #2F8F72;
  --pollen-lime: #D6E86B;
  --xanadu-mint: #74C9A7;
  --lagoon-blue: #4DA9C7;
  --travel: 0;
  --scene-progress: 0;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--mist-rice); }

body {
  margin: 0;
  min-height: 500vh;
  overflow-x: hidden;
  color: var(--soft-indigo);
  font-family: "Nunito Sans", Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 20%, rgba(191, 233, 230, .72), transparent 28vw),
    radial-gradient(circle at 82% 12%, rgba(214, 232, 107, .2), transparent 20vw),
    linear-gradient(135deg, var(--mist-rice), #eef8ef 42%, var(--dew-cyan));
}

.mist-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .72;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(255,255,255,.75) 0 2px, transparent 3px),
    radial-gradient(circle at 44% 70%, rgba(77,169,199,.18) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 35%, rgba(47,143,114,.16) 0 1px, transparent 2px),
    linear-gradient(90deg, rgba(255,255,255,.2), rgba(191,233,230,.25), rgba(255,255,255,.18));
  background-size: 140px 140px, 90px 90px, 120px 120px, 100% 100%;
  transform: translate3d(calc(var(--travel) * -18vw), 0, 0);
}

.pollen-swarm {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.pollen {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pollen-lime);
  box-shadow: 0 0 18px rgba(214,232,107,.85);
  opacity: .68;
  transform: translate3d(var(--x), var(--y), 0) scale(var(--s));
  animation: pollenBob var(--d) ease-in-out infinite alternate;
}

.scroll-stage { position: relative; z-index: 2; height: 500vh; }

.horizontal-pin {
  position: sticky;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.journey-track {
  display: flex;
  width: 500vw;
  height: 100vh;
  transform: translate3d(calc(var(--travel) * -400vw), 0, 0);
  will-change: transform;
}

.scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  flex: 0 0 100vw;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 80px);
  isolation: isolate;
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  filter: blur(.2px);
}

.scene::before {
  width: 58vw;
  height: 34vw;
  min-height: 340px;
  border-radius: 48% 52% 43% 57% / 58% 36% 64% 42%;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.8), transparent 25%), linear-gradient(135deg, rgba(191,233,230,.7), rgba(116,201,167,.42), rgba(77,169,199,.3));
  opacity: .72;
  transform: rotate(-5deg) scale(calc(.94 + var(--scene-progress) * .08));
  box-shadow: inset 0 0 60px rgba(255,255,255,.35), 0 30px 80px rgba(57,64,107,.08);
}

.scene::after {
  inset: 10vh 6vw;
  border: 1px solid rgba(47,143,114,.12);
  border-radius: 45% 55% 50% 50% / 58% 45% 55% 42%;
  transform: rotate(calc(-3deg + var(--scene-progress) * 7deg));
}

.watercolor {
  position: absolute;
  z-index: -2;
  width: 75vw;
  height: 72vh;
  border-radius: 40% 60% 68% 32% / 45% 44% 56% 55%;
  opacity: .54;
  filter: blur(16px) saturate(112%);
  transform: translate3d(calc(var(--scene-progress) * 4vw), calc(var(--scene-progress) * -2vh), 0) rotate(8deg);
}

.wash-a { background: radial-gradient(circle, rgba(191,233,230,.7), rgba(247,244,232,.2) 58%, transparent 72%); }
.wash-b { background: radial-gradient(circle, rgba(116,201,167,.62), rgba(191,233,230,.42) 54%, transparent 72%); }
.wash-c { background: radial-gradient(circle, rgba(214,232,107,.36), rgba(116,201,167,.5), transparent 74%); }
.wash-d { background: radial-gradient(circle, rgba(77,169,199,.5), rgba(191,233,230,.44), transparent 73%); }
.wash-e { background: linear-gradient(135deg, rgba(191,233,230,.45), rgba(116,201,167,.5), rgba(77,169,199,.58)); }

.scene-copy {
  position: relative;
  z-index: 3;
  width: min(760px, 72vw);
  transform: translateY(calc((1 - var(--scene-progress)) * 22px));
  opacity: calc(.5 + var(--scene-progress) * .5);
  text-align: left;
}

.hero-copy { width: min(980px, 82vw); text-align: center; }

h1, h2 {
  margin: 0;
  font-family: "Fraunces", Lora, Georgia, serif;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -.06em;
  color: var(--fern-teal);
  text-shadow: 0 12px 36px rgba(77,169,199,.14);
  animation: titleBreath 5.8s ease-in-out infinite;
}

h1 { font-size: clamp(4.8rem, 15vw, 14.5rem); }
h2 { font-size: clamp(3.4rem, 9vw, 9rem); max-width: 850px; }

.specimen-id {
  margin: 0 0 18px;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: clamp(.67rem, 1.1vw, .88rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lagoon-blue);
}

.note {
  margin: 26px 0 0;
  max-width: 680px;
  font-size: clamp(1.08rem, 1.65vw, 1.55rem);
  line-height: 1.58;
  color: var(--soft-indigo);
}

.hero-copy .note { margin-left: auto; margin-right: auto; }

.living-border {
  position: absolute;
  inset: 9vh 8vw;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.living-border path {
  fill: none;
  stroke: var(--xanadu-mint);
  stroke-width: .65;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 320;
  stroke-dashoffset: calc(320 - (var(--scene-progress) * 320));
  filter: drop-shadow(0 0 12px rgba(116,201,167,.55));
}

.living-border .vein {
  stroke: var(--fern-teal);
  stroke-width: .28;
  opacity: .62;
}

.is-current .living-border path { animation: borderWobble 4.4s ease-in-out infinite; }

.greenhouse-lines {
  position: absolute;
  inset: 13vh 12vw;
  opacity: .16;
  background:
    linear-gradient(68deg, transparent 48%, var(--soft-indigo) 49% 50%, transparent 51%),
    linear-gradient(-68deg, transparent 48%, var(--soft-indigo) 49% 50%, transparent 51%),
    linear-gradient(90deg, transparent 49%, var(--soft-indigo) 50%, transparent 51%);
  clip-path: polygon(50% 0, 100% 38%, 86% 100%, 14% 100%, 0 38%);
}

.pollen-invite {
  position: absolute;
  left: 50%;
  bottom: 10vh;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--fern-teal);
  font-weight: 700;
  letter-spacing: .06em;
}

.pollen-invite span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pollen-lime);
  box-shadow: 0 0 0 9px rgba(214,232,107,.22), 0 0 28px rgba(214,232,107,.9);
  animation: dotTravel 1.6s ease-in-out infinite;
}

.specimen, .annotation, .formula-vine, .domain-leaf {
  position: absolute;
  z-index: 4;
  padding: 14px 18px;
  border: 1px solid rgba(47,143,114,.22);
  border-radius: 18px 26px 18px 26px;
  background: rgba(247,244,232,.62);
  backdrop-filter: blur(6px);
  color: var(--soft-indigo);
  box-shadow: 0 18px 48px rgba(57,64,107,.08);
  transition: transform .45s ease, border-radius .45s ease, background .45s ease;
}

.specimen:hover, .annotation:hover, .formula-vine:hover, .domain-leaf:hover {
  transform: translateY(-8px) rotate(-3deg) scale(1.04);
  border-radius: 30px 18px 30px 18px;
  background: rgba(191,233,230,.76);
}

.specimen b { color: var(--fern-teal); }
.seed-planet { right: 11vw; top: 18vh; transform: rotate(8deg); }
.formula-vine { left: 10vw; bottom: 21vh; font-family: "Space Mono", ui-monospace, monospace; }
.slide-leaf { right: 13vw; bottom: 16vh; transform: rotate(-6deg); }
.pinned-a { left: 12vw; top: 18vh; transform: rotate(-8deg); }
.pinned-b { right: 10vw; top: 21vh; transform: rotate(5deg); }

.diagram.petri-ring {
  position: absolute;
  right: 18vw;
  top: 16vh;
  width: min(28vw, 270px);
  aspect-ratio: 1;
  border: 2px solid rgba(77,169,199,.6);
  border-radius: 50%;
  background: radial-gradient(circle at 44% 45%, rgba(214,232,107,.38) 0 6%, transparent 7%), radial-gradient(circle, rgba(191,233,230,.35), transparent 62%);
  animation: petriRotate 14s linear infinite;
}

.diagram.petri-ring span,
.diagram.petri-ring::before,
.diagram.petri-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(47,143,114,.42);
}
.diagram.petri-ring span { inset: 20%; }
.diagram.petri-ring::before { inset: 36% 12% 16% 42%; }
.diagram.petri-ring::after { inset: 12% 48% 48% 14%; }

.flask-glyph {
  position: absolute;
  left: 13vw;
  bottom: 14vh;
  width: 150px;
  height: 190px;
  border: 3px solid var(--lagoon-blue);
  border-top: 0;
  border-radius: 12px 12px 62px 62px;
  background: linear-gradient(to top, rgba(116,201,167,.42) 0 45%, transparent 46%);
  transform: rotate(6deg);
}

.flask-glyph::before {
  content: "";
  position: absolute;
  width: 52px;
  height: 68px;
  left: 48px;
  top: -68px;
  border: 3px solid var(--lagoon-blue);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.flask-glyph div {
  position: absolute;
  left: 54px;
  top: 34px;
  width: 38px;
  height: 70px;
  border-radius: 100% 0 100% 0;
  background: var(--pollen-lime);
  transform-origin: bottom center;
  animation: sprout 3s ease-in-out infinite;
}

.molecule-flower {
  position: absolute;
  right: 19vw;
  bottom: 18vh;
  width: 220px;
  height: 220px;
  animation: petriRotate 18s linear infinite reverse;
}

.molecule-flower i {
  position: absolute;
  left: 50%; top: 50%;
  width: 54px; height: 54px;
  margin: -27px;
  border-radius: 50% 50% 50% 8px;
  background: rgba(214,232,107,.72);
  border: 1px solid rgba(47,143,114,.32);
  transform-origin: 28px 96px;
}
.molecule-flower i:nth-child(1) { transform: rotate(0deg); }
.molecule-flower i:nth-child(2) { transform: rotate(72deg); }
.molecule-flower i:nth-child(3) { transform: rotate(144deg); }
.molecule-flower i:nth-child(4) { transform: rotate(216deg); }
.molecule-flower i:nth-child(5) { transform: rotate(288deg); }

.vellum-stack {
  position: absolute;
  right: 12vw;
  top: 18vh;
  width: 280px;
}
.vellum-stack span {
  display: block;
  margin: 18px 0;
  padding: 18px 22px;
  background: rgba(247,244,232,.7);
  border: 1px solid rgba(47,143,114,.2);
  border-radius: 18px 8px 22px 10px;
  box-shadow: 0 18px 46px rgba(57,64,107,.08);
  transform: rotate(var(--r, -4deg));
  transition: transform .35s ease;
}
.vellum-stack span:nth-child(2) { --r: 5deg; }
.vellum-stack span:nth-child(3) { --r: -2deg; }
.vellum-stack span:hover { transform: rotate(0deg) translateX(-12px); }

.algae-constellation {
  position: absolute;
  left: 11vw;
  bottom: 14vh;
  width: 260px;
  height: 210px;
  border: 1px dashed rgba(77,169,199,.44);
  border-radius: 48% 52% 38% 62%;
}
.algae-constellation b {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--xanadu-mint);
  box-shadow: 0 0 18px rgba(116,201,167,.8);
  animation: algaePulse 2.8s ease-in-out infinite alternate;
}
.algae-constellation b:nth-child(1) { left: 22%; top: 24%; }
.algae-constellation b:nth-child(2) { left: 58%; top: 18%; animation-delay: .3s; }
.algae-constellation b:nth-child(3) { left: 76%; top: 54%; animation-delay: .8s; }
.algae-constellation b:nth-child(4) { left: 38%; top: 72%; animation-delay: 1.1s; }
.algae-constellation b:nth-child(5) { left: 16%; top: 62%; animation-delay: 1.4s; }

.living-map {
  position: absolute;
  right: 11vw;
  bottom: 12vh;
  width: 38vw;
  max-width: 520px;
  min-width: 300px;
  height: 280px;
  border-radius: 48% 52% 44% 56%;
  background: radial-gradient(circle at 20% 70%, rgba(214,232,107,.44), transparent 18%), radial-gradient(circle at 55% 35%, rgba(191,233,230,.86), transparent 28%), linear-gradient(135deg, rgba(116,201,167,.35), rgba(77,169,199,.42));
  box-shadow: inset 0 0 80px rgba(247,244,232,.45), 0 28px 90px rgba(57,64,107,.12);
}
.living-map span {
  position: absolute;
  border: 1px solid rgba(47,143,114,.38);
  border-radius: 50%;
  animation: mapDrift 5s ease-in-out infinite alternate;
}
.living-map span:nth-child(1) { inset: 16% 62% 48% 12%; }
.living-map span:nth-child(2) { inset: 48% 20% 18% 54%; animation-delay: .5s; }
.living-map span:nth-child(3) { inset: 20% 34% 36% 40%; animation-delay: 1s; }
.living-map span:nth-child(4) { inset: 62% 58% 12% 22%; animation-delay: 1.5s; }
.domain-leaf { left: 12vw; top: 18vh; color: var(--fern-teal); font-family: "Fraunces", Georgia, serif; font-size: 1.55rem; }

.botanical-compass {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(47,143,114,.18);
  border-radius: 999px;
  background: rgba(247,244,232,.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 54px rgba(57,64,107,.09);
}

.progress-line {
  width: min(32vw, 320px);
  height: 6px;
  border-radius: 999px;
  background: rgba(191,233,230,.78);
  overflow: hidden;
}
.progress-line span {
  display: block;
  width: calc(var(--travel) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--dew-cyan), var(--xanadu-mint), var(--lagoon-blue));
}

.botanical-compass button {
  border: 0;
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--soft-indigo);
  background: transparent;
  font: 700 .78rem "Nunito Sans", sans-serif;
  cursor: pointer;
  transition: background .3s ease, color .3s ease, transform .3s ease;
}
.botanical-compass button.is-active,
.botanical-compass button:hover {
  background: var(--pollen-lime);
  color: var(--fern-teal);
  transform: translateY(-2px);
}

@keyframes titleBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.018); } }
@keyframes borderWobble { 0%,100% { stroke-width: .62; } 50% { stroke-width: .9; } }
@keyframes dotTravel { 0%,100% { transform: translateX(0); } 50% { transform: translateX(18px); } }
@keyframes pollenBob { from { margin-top: -8px; } to { margin-top: 14px; } }
@keyframes petriRotate { to { transform: rotate(360deg); } }
@keyframes sprout { 0%,100% { transform: rotate(-8deg) scaleY(.9); } 50% { transform: rotate(10deg) scaleY(1.08); } }
@keyframes algaePulse { from { transform: scale(.8); opacity: .55; } to { transform: scale(1.25); opacity: 1; } }
@keyframes mapDrift { from { transform: translate(-4px, 6px); } to { transform: translate(8px, -8px); } }

@media (max-width: 760px) {
  h1 { font-size: clamp(4rem, 22vw, 7rem); }
  h2 { font-size: clamp(3.1rem, 16vw, 5rem); }
  .scene-copy, .hero-copy { width: 86vw; }
  .note { font-size: 1rem; }
  .botanical-compass { width: calc(100vw - 24px); gap: 4px; padding: 10px; }
  .progress-line { width: 24vw; }
  .botanical-compass button { padding: 7px 8px; }
  .specimen, .annotation, .formula-vine { display: none; }
  .diagram.petri-ring, .molecule-flower, .living-map { opacity: .45; right: 2vw; }
  .flask-glyph, .algae-constellation { opacity: .45; left: 2vw; }
}
