:root {
  --oat: #F6EEDC;
  --clay: #DFA6A0;
  --pistachio: #C9DDBB;
  --lavender: #C8B9E8;
  --moss: #24352A;
  --loam: #7B5B45;
  --cream: #FFF8EA;
  --progress: 0;
  --mouse-x: 0;
  --mouse-y: 0;
  --active-scale: 1;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--moss);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 248, 234, 0.96), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(200, 185, 232, 0.38), transparent 34%),
    radial-gradient(circle at 68% 77%, rgba(201, 221, 187, 0.58), transparent 32%),
    linear-gradient(180deg, var(--oat), #efe2c9 52%, #e7d7bc);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: 0.18;
  background-image:
    radial-gradient(circle, rgba(36, 53, 42, 0.11) 0 0.7px, transparent 0.8px),
    radial-gradient(circle, rgba(123, 91, 69, 0.09) 0 0.6px, transparent 0.8px);
  background-size: 18px 18px, 29px 29px;
  mix-blend-mode: multiply;
}

.progress-root {
  position: fixed;
  right: 1.1rem;
  top: 7vh;
  width: 0.58rem;
  height: 86vh;
  border: 1px solid rgba(123, 91, 69, 0.28);
  border-radius: 999px;
  z-index: 50;
  background: rgba(255, 248, 234, 0.45);
  overflow: hidden;
}

.progress-clay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--progress) * 100%);
  border-radius: inherit;
  background: linear-gradient(180deg, var(--lavender), var(--clay), var(--loam));
}

.aurora-field {
  position: fixed;
  inset: -20vh -12vw;
  z-index: 0;
  pointer-events: none;
  filter: blur(22px);
  opacity: 0.86;
}

.aurora {
  position: absolute;
  width: 120vw;
  height: 28vh;
  border-radius: 50%;
  background-size: 240% 100%;
  animation: auroraDrift 22s ease-in-out infinite alternate;
  mix-blend-mode: multiply;
}

.aurora-one {
  top: 12vh;
  left: -14vw;
  transform: rotate(-8deg);
  background-image: linear-gradient(90deg, transparent, rgba(200, 185, 232, 0.42), rgba(201, 221, 187, 0.48), transparent);
}

.aurora-two {
  top: 48vh;
  left: -7vw;
  transform: rotate(7deg);
  background-image: linear-gradient(90deg, transparent, rgba(223, 166, 160, 0.38), rgba(255, 248, 234, 0.78), rgba(200, 185, 232, 0.33), transparent);
  animation-duration: 31s;
}

.aurora-three {
  top: 74vh;
  left: -18vw;
  transform: rotate(-4deg);
  background-image: linear-gradient(90deg, transparent, rgba(201, 221, 187, 0.44), rgba(223, 166, 160, 0.28), transparent);
  animation-duration: 27s;
}

.descent {
  position: relative;
  z-index: 2;
}

.chamber {
  min-height: 120vh;
  position: relative;
  isolation: isolate;
  --local: 0;
}

.chamber.opening {
  min-height: 130vh;
}

.scene {
  position: sticky;
  top: 0;
  min-height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 3rem);
}

.scene::after {
  content: "";
  position: absolute;
  inset: 4vh 5vw;
  border: 1px solid rgba(123, 91, 69, 0.16);
  border-radius: 42% 58% 51% 49% / 53% 37% 63% 47%;
  transform: scale(calc(1.06 - var(--local) * 0.12));
  pointer-events: none;
}

.aperture {
  position: absolute;
  transform-origin: center;
  transition: filter 500ms ease, border-radius 700ms ease;
  will-change: transform, filter;
}

.hero-cell {
  width: min(82vw, 980px);
  height: min(70vh, 690px);
  left: 11vw;
  top: 13vh;
  border-radius: 42% 58% 62% 38% / 54% 34% 66% 46%;
  background:
    radial-gradient(circle at 31% 25%, rgba(255, 248, 234, 0.82), transparent 19%),
    radial-gradient(circle at 74% 72%, rgba(200, 185, 232, 0.46), transparent 28%),
    linear-gradient(135deg, var(--clay), #e8bfb5 46%, var(--pistachio));
  box-shadow: inset 0 0 70px rgba(255, 248, 234, 0.45), 0 48px 110px rgba(123, 91, 69, 0.23);
  animation: blobMorph 14s ease-in-out infinite alternate;
  transform: translate3d(calc(var(--mouse-x) * 10px), calc(var(--mouse-y) * 8px), 0) scale(calc(1.2 - var(--local) * 0.42));
}

.condition-cloud {
  width: min(78vw, 900px);
  height: min(68vh, 640px);
  right: 2vw;
  top: 15vh;
  border-radius: 59% 41% 44% 56% / 39% 56% 44% 61%;
  background:
    radial-gradient(circle at 65% 22%, rgba(255, 248, 234, 0.9), transparent 21%),
    radial-gradient(circle at 28% 76%, rgba(223, 166, 160, 0.45), transparent 28%),
    linear-gradient(145deg, rgba(201, 221, 187, 0.96), rgba(246, 238, 220, 0.85), rgba(200, 185, 232, 0.5));
  box-shadow: inset 0 -46px 78px rgba(123, 91, 69, 0.12), 0 54px 120px rgba(36, 53, 42, 0.14);
  animation: blobMorph 16s ease-in-out infinite alternate-reverse;
  transform: translate3d(calc(var(--mouse-x) * -7px), calc(var(--mouse-y) * 10px), 0) scale(calc(0.82 + var(--local) * 0.52));
}

.agent-habitat {
  width: min(86vw, 1040px);
  height: min(69vh, 640px);
  left: 3vw;
  top: 16vh;
  border-radius: 31% 69% 49% 51% / 57% 44% 56% 43%;
  background:
    radial-gradient(circle at 55% 55%, rgba(255, 248, 234, 0.62), transparent 30%),
    radial-gradient(circle at 18% 35%, rgba(223, 166, 160, 0.46), transparent 24%),
    linear-gradient(120deg, rgba(246, 238, 220, 0.9), rgba(201, 221, 187, 0.82) 52%, rgba(123, 91, 69, 0.27));
  box-shadow: inset 28px 10px 90px rgba(255, 248, 234, 0.5), 0 50px 100px rgba(123, 91, 69, 0.16);
  animation: blobMorph 18s ease-in-out infinite alternate;
  transform: scale(calc(1.18 - var(--local) * 0.38));
}

.feedback-world {
  width: min(76vw, 850px);
  height: min(76vh, 760px);
  right: 8vw;
  top: 10vh;
  border-radius: 48% 52% 66% 34% / 48% 61% 39% 52%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 248, 234, 0.88), transparent 22%),
    radial-gradient(circle at 26% 68%, rgba(200, 185, 232, 0.52), transparent 33%),
    linear-gradient(150deg, rgba(223, 166, 160, 0.78), rgba(246, 238, 220, 0.9), rgba(201, 221, 187, 0.74));
  box-shadow: 0 60px 130px rgba(36, 53, 42, 0.16), inset 0 0 90px rgba(255, 248, 234, 0.62);
  filter: blur(calc((1 - var(--local)) * 4px));
  animation: blobMorph 15s ease-in-out infinite alternate-reverse;
  transform: scale(calc(0.76 + var(--local) * 0.56));
}

.capsule-field {
  width: min(84vw, 980px);
  height: min(65vh, 620px);
  left: 8vw;
  top: 18vh;
  border-radius: 64% 36% 38% 62% / 44% 57% 43% 56%;
  background:
    radial-gradient(circle at 50% 95%, rgba(200, 185, 232, 0.42), transparent 29%),
    linear-gradient(180deg, rgba(36, 53, 42, 0.1), rgba(201, 221, 187, 0.72), rgba(246, 238, 220, 0.8));
  box-shadow: inset 0 -80px 120px rgba(36, 53, 42, 0.13), 0 48px 100px rgba(123, 91, 69, 0.16);
  transform: scale(calc(1.06 - var(--local) * 0.22));
}

.terrace {
  position: relative;
  z-index: 4;
  width: min(88vw, 1020px);
  transform: translateY(calc((1 - var(--local)) * 40px));
  filter: blur(calc((1 - var(--local)) * 3px));
  opacity: calc(0.45 + var(--local) * 0.55);
}

.opening-copy {
  justify-self: start;
  align-self: end;
  margin: 0 0 8vh 5vw;
  opacity: 1;
  filter: none;
}

.copy-left {
  justify-self: start;
  margin-left: 7vw;
  max-width: 650px;
}

.copy-right {
  justify-self: end;
  margin-right: 8vw;
  max-width: 670px;
}

.final-copy {
  justify-self: center;
  align-self: center;
  text-align: center;
  max-width: 850px;
}

.kicker,
.edge-note,
.weather-label,
.focus-meter,
.glyph-strip {
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--loam);
}

.kicker {
  margin: 0 0 1rem;
  font-size: clamp(0.72rem, 1.1vw, 0.95rem);
}

h1,
h2 {
  font-family: "Fraunces", serif;
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.82;
  margin: 0;
  color: var(--moss);
  text-wrap: balance;
}

h1 {
  font-size: clamp(4rem, 18vw, 15rem);
  max-width: 1200px;
  text-shadow: 0 2px 0 rgba(255, 248, 234, 0.55);
}

h2 {
  font-size: clamp(3.6rem, 9vw, 9.8rem);
  max-width: 980px;
}

.lead,
.chamber-copy p:not(.kicker),
.final-copy p:not(.kicker) {
  font-size: clamp(1.06rem, 1.8vw, 1.55rem);
  line-height: 1.55;
  max-width: 720px;
  margin: 1.4rem 0 0;
  color: rgba(36, 53, 42, 0.82);
}

.final-copy p:not(.kicker) {
  margin-left: auto;
  margin-right: auto;
}

.contours,
.agent-map,
.echo-lines {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  fill: none;
  stroke: rgba(36, 53, 42, 0.38);
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-contours {
  stroke: rgba(123, 91, 69, 0.28);
}

.agent-path {
  stroke: rgba(36, 53, 42, 0.42);
  stroke-width: 2;
  stroke-dasharray: 7 13;
}

.echo-lines {
  stroke: rgba(123, 91, 69, 0.34);
  animation: echoPulse 5s ease-in-out infinite;
}

.weather-label {
  position: absolute;
  z-index: 3;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(123, 91, 69, 0.22);
  border-radius: 999px;
  background: rgba(255, 248, 234, 0.54);
  font-size: clamp(0.62rem, 0.9vw, 0.84rem);
}

.label-one { left: 18%; top: 22%; }
.label-two { right: 16%; top: 43%; }
.label-three { left: 34%; bottom: 20%; }

.edge-note {
  position: absolute;
  z-index: 5;
  font-size: 0.74rem;
  padding: 0.7rem 0.85rem;
  border-left: 1px solid rgba(123, 91, 69, 0.35);
}

.note-north { top: 9vh; left: 9vw; }
.note-east { right: 8vw; bottom: 13vh; }
.note-west { left: 6vw; bottom: 10vh; }

.seed-orbit {
  position: absolute;
  width: 1.1rem;
  height: 2.2rem;
  border-radius: 60% 40% 55% 45% / 44% 56% 44% 56%;
  background: var(--cream);
  border: 1px solid rgba(123, 91, 69, 0.24);
  box-shadow: 0 0 18px rgba(255, 248, 234, 0.75);
}

.seed-a { left: 24%; top: 27%; animation: seedFloat 7s ease-in-out infinite; }
.seed-b { right: 28%; bottom: 19%; animation: seedFloat 8.5s ease-in-out infinite reverse; }

.glyph-strip {
  position: absolute;
  left: 8vw;
  bottom: 9vh;
  display: flex;
  gap: 1.1rem;
}

.glyph {
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(123, 91, 69, 0.3);
  border-radius: 50%;
  background: rgba(255, 248, 234, 0.35);
  position: relative;
}

.seed-glyph::before,
.cloud-glyph::before,
.ring-glyph::before {
  content: "";
  position: absolute;
  inset: 25%;
  border: 2px solid var(--loam);
}

.seed-glyph::before { border-radius: 65% 35% 55% 45%; }
.cloud-glyph::before { border-radius: 45% 55% 48% 52%; border-bottom-color: transparent; }
.ring-glyph::before { border-radius: 50%; transform: rotate(18deg) scaleX(1.3); }

.agent-dot {
  position: absolute;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--loam);
  box-shadow: 0 0 0 0.35rem rgba(223, 166, 160, 0.17), 0 0 20px rgba(123, 91, 69, 0.28);
  offset-rotate: 0deg;
}

.dot-one { offset-path: path("M75 333C180 176 315 139 452 190c131 49 171 172 281 206"); animation: pathDrift 10s linear infinite; }
.dot-two { offset-path: path("M105 242c111 82 230 92 356 33 95-45 178-42 265 11"); animation: pathDrift 13s linear infinite reverse; background: var(--clay); }
.dot-three { offset-path: path("M165 430c70-93 159-132 269-112 117 20 187-36 249-151"); animation: pathDrift 12s linear infinite; }
.dot-four { offset-path: path("M75 333C180 176 315 139 452 190c131 49 171 172 281 206"); animation: pathDrift 16s linear infinite reverse; background: var(--moss); }
.dot-five { offset-path: path("M105 242c111 82 230 92 356 33 95-45 178-42 265 11"); animation: pathDrift 18s linear infinite; background: var(--clay); }

.nested {
  position: absolute;
  border: 1px solid rgba(36, 53, 42, 0.18);
  background: rgba(255, 248, 234, 0.32);
  box-shadow: inset 0 0 35px rgba(255, 248, 234, 0.42);
}

.nested-one {
  width: 52%;
  height: 42%;
  left: 24%;
  top: 30%;
  border-radius: 48% 52% 62% 38% / 55% 42% 58% 45%;
  transform: scale(calc(0.7 + var(--local) * 0.28));
}

.nested-two {
  width: 28%;
  height: 23%;
  left: 38%;
  top: 40%;
  border-radius: 62% 38% 43% 57% / 47% 62% 38% 53%;
  background: rgba(201, 221, 187, 0.36);
}

.nested-three {
  width: 10%;
  height: 9%;
  left: 48%;
  top: 47%;
  border-radius: 50%;
  background: rgba(223, 166, 160, 0.42);
}

.focus-meter {
  position: absolute;
  right: 8vw;
  bottom: 9vh;
  display: grid;
  grid-template-columns: auto 120px auto;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.7rem;
}

.focus-meter i {
  height: 2px;
  background: linear-gradient(90deg, var(--loam), var(--clay), var(--moss));
  position: relative;
}

.focus-meter i::after {
  content: "";
  position: absolute;
  top: -5px;
  left: calc(var(--local, 0) * 100%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--moss);
}

.vault-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42vh;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(200, 185, 232, 0.52), transparent 53%),
    linear-gradient(180deg, transparent, rgba(36, 53, 42, 0.16));
}

.capsule {
  position: absolute;
  width: clamp(4.5rem, 10vw, 8rem);
  height: clamp(8rem, 18vw, 14rem);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 248, 234, 0.74), rgba(223, 166, 160, 0.35), rgba(123, 91, 69, 0.18));
  border: 1px solid rgba(123, 91, 69, 0.24);
  box-shadow: inset 0 20px 45px rgba(255, 248, 234, 0.5), 0 30px 55px rgba(36, 53, 42, 0.13);
  animation: seedFloat 9s ease-in-out infinite;
}

.capsule span {
  position: absolute;
  left: 50%;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: rgba(123, 91, 69, 0.34);
}

.cap-one { left: 18%; top: 25%; transform: rotate(-10deg); }
.cap-two { left: 39%; top: 12%; transform: rotate(8deg); animation-delay: -2s; }
.cap-three { right: 27%; top: 31%; transform: rotate(14deg); animation-delay: -4s; }
.cap-four { right: 12%; top: 17%; transform: rotate(-7deg); animation-delay: -6s; }

.final-mark {
  position: absolute;
  right: 9vw;
  bottom: 8vh;
  width: 7rem;
  height: 7rem;
  color: var(--loam);
}

.final-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes auroraDrift {
  from { background-position: 0% 50%; filter: blur(18px); }
  to { background-position: 100% 50%; filter: blur(29px); }
}

@keyframes blobMorph {
  0% { border-radius: 42% 58% 62% 38% / 54% 34% 66% 46%; }
  50% { border-radius: 56% 44% 44% 56% / 38% 59% 41% 62%; }
  100% { border-radius: 36% 64% 53% 47% / 58% 42% 58% 42%; }
}

@keyframes seedFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -18px; }
}

@keyframes pathDrift {
  from { offset-distance: 0%; }
  to { offset-distance: 100%; }
}

@keyframes echoPulse {
  0%, 100% { opacity: 0.42; transform: scale(0.98); }
  50% { opacity: 0.78; transform: scale(1.02); }
}

@media (max-width: 760px) {
  .progress-root {
    right: 0.45rem;
  }

  .scene {
    padding: 1rem;
  }

  .hero-cell,
  .condition-cloud,
  .agent-habitat,
  .feedback-world,
  .capsule-field {
    width: 105vw;
    left: -10vw;
    right: auto;
  }

  .opening-copy,
  .copy-left,
  .copy-right,
  .final-copy {
    margin-left: 1rem;
    margin-right: 1rem;
    justify-self: start;
    align-self: end;
    margin-bottom: 12vh;
  }

  h1 {
    font-size: clamp(4rem, 23vw, 7rem);
  }

  h2 {
    font-size: clamp(3.2rem, 16vw, 6rem);
  }

  .edge-note,
  .glyph-strip,
  .focus-meter,
  .final-mark {
    display: none;
  }

  .weather-label {
    font-size: 0.58rem;
  }
}
