:root {
  --warm-rice: #F6EEDC;
  --raw-honey: #D9A441;
  --soft-oat: #E7D3A2;
  --toasted-clay: #A86B3F;
  --young-leaf: #6F8F4E;
  --deep-olive: #27351F;
  --pollen-cream: #FFF8E8;
  --quiet-charcoal: #24211A;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Manrope", "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* Typography compliance notes: Space Grotesk** primary geometric sans: clean; Space Grotesk Medium SemiBold with tight tracking and slight horizontal crop at the viewport edge. Pair it with **Manrope** from Google Fonts for body copy. IBM Plex Mono** only for tiny identity fragments. */

@keyframes paper-breath {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--warm-rice);
  color: var(--quiet-charcoal);
  font-family: var(--font-body);
  overflow-x: hidden;
}

button {
  font: inherit;
}

.narrative {
  background: linear-gradient(180deg, var(--warm-rice), var(--pollen-cream) 42%, var(--soft-oat));
}

.plane {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(34px, 6vw, 92px);
}

.plane::before {
  content: attr(data-plane);
  position: absolute;
  top: clamp(22px, 4vw, 64px);
  right: clamp(22px, 5vw, 82px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(39, 53, 31, .45);
}

.paper-slab,
.ledger,
.return-field {
  position: absolute;
  border-radius: 28px;
  transition: transform 1200ms cubic-bezier(.2, .8, .18, 1), opacity 1200ms ease;
  z-index: -2;
}

.slab-honey {
  width: 58vw;
  height: 54vh;
  right: -7vw;
  top: 10vh;
  background: var(--raw-honey);
  transform: translate3d(24px, -12px, 0) rotate(-2deg);
}

.slab-oat {
  width: 48vw;
  height: 43vh;
  left: 33vw;
  bottom: 6vh;
  background: var(--soft-oat);
  transform: translate3d(-18px, 20px, 0) rotate(1.4deg);
}

.active .slab-honey,
.in-view .slab-honey {
  transform: translate3d(0, 0, 0) rotate(-2deg);
}

.active .slab-oat,
.in-view .slab-oat {
  transform: translate3d(0, 0, 0) rotate(1.4deg);
}

.hero-copy {
  position: absolute;
  left: clamp(22px, 7vw, 105px);
  bottom: clamp(78px, 14vh, 150px);
  width: min(740px, 84vw);
}

.layer-kicker {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .24em;
  color: var(--toasted-clay);
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.07em;
  line-height: .86;
  color: var(--deep-olive);
}

h1 {
  font-size: clamp(76px, 15vw, 218px);
  transform: translateX(-1.4vw);
  white-space: nowrap;
}

h2 {
  font-size: clamp(54px, 8vw, 118px);
  max-width: 820px;
}

p {
  font-size: clamp(17px, 1.6vw, 23px);
  line-height: 1.55;
}

.reveal-line {
  margin: 20px 0 0 clamp(6px, 8vw, 110px);
  color: var(--deep-olive);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 900ms ease 360ms, transform 900ms ease 360ms;
}

.in-view .reveal-line,
.active .reveal-line {
  opacity: 1;
  transform: translateY(0);
}

.mono-cluster {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(36, 33, 26, .66);
  text-transform: lowercase;
}

.mono-cluster span {
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 248, 232, .72);
}

.cluster-ground {
  top: 24vh;
  left: 12vw;
}

.registration-mark {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(39, 53, 31, .22);
  border-radius: 50%;
}

.registration-mark::before,
.registration-mark::after {
  content: "";
  position: absolute;
  background: rgba(39, 53, 31, .22);
}

.registration-mark::before {
  width: 72px;
  height: 2px;
  left: -8px;
  top: 27px;
}

.registration-mark::after {
  width: 2px;
  height: 72px;
  left: 27px;
  top: -8px;
}

.mark-a {
  right: 19vw;
  bottom: 18vh;
}

.leaf-rubbing {
  position: absolute;
  fill: none;
  stroke: var(--deep-olive);
}

.ground-leaf {
  right: 12vw;
  bottom: 18vh;
  width: min(260px, 28vw);
  opacity: .72;
}

.leaf-fill {
  fill: rgba(111, 143, 78, .2);
  stroke: none;
}

.vein,
.draw-line {
  fill: none;
  stroke: var(--deep-olive);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  transition: stroke-dashoffset 1800ms cubic-bezier(.22, .75, .2, 1) 260ms;
}

.branch {
  stroke-width: 2;
}

.id-dot {
  fill: var(--raw-honey);
  stroke: var(--deep-olive);
  stroke-width: 2;
  opacity: 0;
  transform-origin: center;
  transform: scale(.3);
  transition: opacity 700ms ease 950ms, transform 700ms ease 950ms;
}

.in-view .draw-line,
.active .draw-line {
  stroke-dashoffset: 0;
}

.in-view .id-dot,
.active .id-dot {
  opacity: 1;
  transform: scale(1);
}

.stem-nav {
  position: fixed;
  right: clamp(16px, 2.4vw, 34px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 20;
}

.stem-nav::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 50%;
  width: 2px;
  background: rgba(39, 53, 31, .22);
  transform: translateX(-50%);
}

.nav-dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-dot span {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--deep-olive);
  transition: border-radius 360ms ease, transform 360ms ease, background 360ms ease;
}

.nav-dot.active span {
  border-radius: 80% 0 80% 45%;
  background: var(--young-leaf);
  transform: rotate(-38deg) scale(1.35);
}

.slab-cream {
  width: 70vw;
  height: 70vh;
  left: -14vw;
  top: 12vh;
  background: var(--pollen-cream);
  transform: translate3d(-20px, 18px, 0) rotate(2deg);
}

.slab-leaf {
  width: 34vw;
  height: 54vh;
  right: 12vw;
  bottom: 8vh;
  background: rgba(111, 143, 78, .55);
  transform: translate3d(18px, 22px, 0) rotate(-4deg);
}

.in-view .slab-cream,
.in-view .slab-leaf {
  transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
}

.slab-cream { --rot: 2deg; }
.slab-leaf { --rot: -4deg; }

.section-copy {
  position: absolute;
  width: min(760px, 78vw);
}

.alias-copy {
  top: 16vh;
  right: 10vw;
}

.section-copy p:not(.layer-kicker),
.final-copy p:not(.layer-kicker) {
  max-width: 560px;
  color: rgba(36, 33, 26, .78);
}

.alias-route {
  position: absolute;
  left: 8vw;
  bottom: 8vh;
  width: min(760px, 78vw);
  height: 420px;
}

.alias-chip {
  position: absolute;
  z-index: 2;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--soft-oat);
  color: var(--deep-olive);
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: 0 0 0 2px rgba(39, 53, 31, .08) inset;
  opacity: 0;
  transform: translate3d(-18px, 18px, 0);
  transition: opacity 780ms ease, transform 1000ms cubic-bezier(.21, .78, .2, 1);
}

.in-view .alias-chip {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.chip-one { left: 2%; bottom: 7%; transition-delay: 120ms; }
.chip-two { left: 15%; bottom: 27%; transition-delay: 260ms; background: var(--pollen-cream); }
.chip-three { left: 34%; bottom: 41%; transition-delay: 420ms; background: var(--raw-honey); }
.chip-four { left: 48%; bottom: 62%; transition-delay: 560ms; }
.chip-five { left: 67%; bottom: 73%; transition-delay: 700ms; background: var(--pollen-cream); }
.chip-six { right: 1%; top: 0; transition-delay: 840ms; background: var(--young-leaf); color: var(--pollen-cream); }

.route-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: rgba(39, 53, 31, .52);
}

.seed-dots {
  position: absolute;
  right: 18vw;
  top: 22vh;
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 28px 40px;
}

.seed-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--toasted-clay);
}

.settlement-layer {
  background: var(--pollen-cream);
}

.ledger-back {
  width: 62vw;
  height: 44vh;
  left: 6vw;
  top: 16vh;
  background: var(--soft-oat);
  transform: translate3d(-22px, 14px, 0) rotate(-1deg);
}

.ledger-front {
  width: 58vw;
  height: 42vh;
  right: -4vw;
  bottom: 13vh;
  background: rgba(217, 164, 65, .78);
  transform: translate3d(22px, -14px, 0) rotate(1.8deg);
}

.in-view .ledger-back {
  transform: translate3d(0, 0, 0) rotate(-1deg);
}

.in-view .ledger-front {
  transform: translate3d(0, 0, 0) rotate(1.8deg);
}

.settlement-copy {
  left: 10vw;
  top: 12vh;
}

.bridge-leaf {
  position: absolute;
  width: min(760px, 70vw);
  right: 5vw;
  bottom: 14vh;
  overflow: visible;
}

.leaf-shadow {
  fill: rgba(111, 143, 78, .19);
  stroke: none;
}

.leaf-outline,
.main-vein,
.branch-vein {
  stroke: var(--deep-olive);
}

.leaf-outline { stroke-width: 3; }
.main-vein { stroke-width: 4; }
.branch-vein { stroke-width: 2.4; }

.bridge-dot.second {
  fill: var(--young-leaf);
}

.cluster-settlement {
  right: 12vw;
  top: 18vh;
}

.return-layer {
  background: var(--soft-oat);
}

.return-field {
  width: 84vw;
  height: 74vh;
  left: 8vw;
  top: 13vh;
  background: var(--warm-rice);
  border-radius: 42px;
  transform: translateY(24px);
}

.in-view .return-field {
  transform: translateY(0);
}

.final-emblem {
  position: absolute;
  left: 16vw;
  top: 24vh;
  width: clamp(112px, 15vw, 190px);
  opacity: 0;
  transform: translateY(18px) rotate(-4deg);
  transition: opacity 900ms ease 240ms, transform 1000ms ease 240ms;
}

.in-view .final-emblem {
  opacity: 1;
  transform: translateY(0) rotate(-4deg);
}

.final-emblem path {
  fill: var(--young-leaf);
}

.final-emblem text {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  fill: var(--warm-rice);
  letter-spacing: -.08em;
}

.final-emblem circle {
  fill: var(--raw-honey);
  stroke: var(--deep-olive);
  stroke-width: 3;
}

.final-copy {
  position: absolute;
  right: 13vw;
  bottom: 20vh;
  width: min(650px, 76vw);
}

.seal-button {
  position: absolute;
  left: 18vw;
  bottom: 18vh;
  border: 1px solid rgba(39, 53, 31, .28);
  border-radius: 999px;
  background: var(--pollen-cream);
  color: var(--deep-olive);
  padding: 14px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 360ms ease, background 360ms ease;
}

.seal-button.pressed,
.seal-button:hover {
  transform: translateY(-3px) rotate(-1deg);
  background: var(--raw-honey);
}

.cluster-return {
  right: 8vw;
  top: 14vh;
}

.plane .section-copy,
.plane .hero-copy,
.plane .mono-cluster {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms ease 160ms, transform 900ms ease 160ms;
}

.plane.in-view .section-copy,
.plane.in-view .hero-copy,
.plane.in-view .mono-cluster,
.plane.active .hero-copy,
.plane.active .mono-cluster {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .plane {
    padding: 28px;
  }

  .stem-nav {
    right: 10px;
  }

  h1 {
    font-size: clamp(62px, 18vw, 98px);
  }

  h2 {
    font-size: clamp(42px, 12vw, 70px);
  }

  .hero-copy,
  .section-copy,
  .final-copy {
    left: 28px;
    right: auto;
    width: calc(100vw - 70px);
  }

  .alias-copy,
  .settlement-copy {
    top: 12vh;
  }

  .alias-route {
    left: 2vw;
    width: 92vw;
    bottom: 6vh;
    transform: scale(.78);
    transform-origin: left bottom;
  }

  .bridge-leaf {
    width: 105vw;
    right: -22vw;
    bottom: 16vh;
  }

  .final-emblem {
    left: 28px;
    top: 20vh;
  }

  .seal-button {
    left: 28px;
    bottom: 10vh;
  }

  .cluster-ground,
  .cluster-settlement,
  .cluster-return {
    display: none;
  }
}
