:root {
  --canvas-base: #F4EDE4;
  --canvas-warm: #E8D5C0;
  --earth-core: #D4A574;
  --kiln-copper: #C4956A;
  --text-primary: #2A1F17;
  --text-secondary: #6B5744;
  --accent-warm: #B86F3E;
  --accent-gloss: #C89465;
  --accent-cool: #8A9E7C;
  --depth-shadow: #4A3628;
  --glow: #FFF8F0;
  --scroll-progress: 0;
  --scroll-weight: 300;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 350;
  font-variation-settings: "opsz" 18;
  line-height: 1.85;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% calc(20% + (var(--scroll-progress) * 55%)), rgba(255, 248, 240, .62), transparent 28vw),
    linear-gradient(175deg, #F4EDE4 0%, #E8D5C0 35%, #D4A574 70%, #C4956A 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .03;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="140" height="140"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.5" numOctaves="3"/></filter><rect width="140" height="140" filter="url(%23n)" opacity="1"/></svg>');
  mix-blend-mode: multiply;
}

.grain-source { position: fixed; pointer-events: none; }

main { position: relative; z-index: 2; }

.design-token { position: fixed; left: -100vw; top: -100vh; opacity: 0; }

.zone {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  overflow: hidden;
}

.zone::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(200px, 36vw);
  height: 1px;
  transform: translateX(-50%);
  background: #D4A574;
  opacity: .3;
}

.root-zone { background: linear-gradient(175deg, rgba(244,237,228,.96), rgba(232,213,192,.8), rgba(200,148,101,.08)); }
.stem-zone { background: linear-gradient(175deg, rgba(232,213,192,.82), rgba(212,165,116,.45)); }
.leaf-zone { min-height: 120vh; background: linear-gradient(175deg, rgba(232,213,192,.42), rgba(212,165,116,.72)); }
.bloom-zone { min-height: 120vh; background: radial-gradient(circle at 50% 50%, rgba(255,248,240,.45), transparent 36vw), linear-gradient(175deg, #D4A574 0%, #C4956A 100%); }
.seed-zone { min-height: 80vh; padding-bottom: 40vh; background: linear-gradient(175deg, rgba(232,213,192,.7), #F4EDE4 86%); }
.seed-zone::after { display: none; }

.pillar {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  box-shadow: 0 0 80px 40px rgba(244,237,228,.5);
}

.narrow { max-width: 720px; }
.root-pillar, .seed-pillar { text-align: center; }
.bloom-pillar { max-width: 860px; text-align: center; }

h1, h2 {
  margin: 0;
  font-family: "DM Sans", Inter, sans-serif;
  font-size: clamp(1.8rem, 5vw, 4.2rem);
  font-weight: var(--scroll-weight);
  font-variation-settings: "wght" var(--scroll-weight);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(3.3rem, 13vw, 10rem);
  letter-spacing: -.055em;
  animation: title-weight 3s ease forwards;
  text-shadow: 0 1px 0 rgba(255,248,240,.7), 0 18px 55px rgba(74,54,40,.16);
}

h2 { margin: 0 0 3rem; }

.bloom-zone h2 { font-size: clamp(2rem, 4vw, 3.5rem); }

p { margin: 0 0 3rem; }

.eyebrow, .descriptor, .closing {
  font-family: "Recursive", Inter, sans-serif;
  font-size: clamp(.7rem, .9vw, .85rem);
  font-weight: 450;
  font-variation-settings: "CASL" .5, "MONO" 0, "wght" 450;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.eyebrow { margin-bottom: 2rem; opacity: .68; }
.descriptor { margin-top: 2rem; opacity: 0; animation: descriptor-in .9s ease 1.5s forwards; }
.closing { margin-top: 7rem; margin-bottom: 0; color: var(--accent-warm); }

.reveal-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .85s ease, transform .85s ease;
  transition-delay: calc(var(--order, 0) * 120ms);
}

.reveal-group.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-group > *:nth-child(1) { --order: 0; }
.reveal-group > *:nth-child(2) { --order: 1; }
.reveal-group > *:nth-child(3) { --order: 2; }
.reveal-group > *:nth-child(4) { --order: 3; }
.reveal-group > *:nth-child(5) { --order: 4; }
.reveal-group > *:nth-child(6) { --order: 5; }

.float-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  perspective: 1000px;
}

.float, .inline-object {
  width: 72px;
  height: 72px;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.float {
  position: fixed;
  left: var(--x);
  top: var(--y);
  opacity: 0;
  filter: blur(2px);
  transform: translate3d(0, 28px, 0) scale(var(--s)) rotateX(55deg) rotateZ(-45deg);
  transition: opacity .8s ease, filter .8s ease, transform .8s ease;
  animation: float-drift var(--dur) ease-in-out infinite alternate;
}

.float.active {
  opacity: .86;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(var(--s)) rotateX(55deg) rotateZ(-45deg);
}

.float.far { filter: blur(2px); }
.float.small { width: 56px; height: 56px; }
.float.tall { height: 96px; }

.inline-object {
  margin: 4rem auto;
  transform: scale(1.05) rotateX(55deg) rotateZ(-45deg);
  animation: inline-float 8s ease-in-out infinite;
}

.inline-row { display: flex; justify-content: center; gap: clamp(2rem, 8vw, 6rem); margin: 4rem 0 5rem; }

.iso i, .iso b, .iso em, .inline-object i, .inline-object b, .inline-object em {
  position: absolute;
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 15px 35px rgba(74,54,40,.18);
}

.iso i, .inline-object i { background: linear-gradient(145deg, #FFF8F0 0%, #D4A574 48%, #C4956A 100%); transform: translateZ(29px); }
.iso b, .inline-object b { background: linear-gradient(180deg, #C89465, #C4956A, #B86F3E); transform: rotateX(90deg) translateZ(-29px) translateY(29px); transform-origin: bottom; }
.iso em, .inline-object em { background: linear-gradient(180deg, #D4A574, #A65E30); transform: rotateY(90deg) translateZ(29px) translateX(-29px); transform-origin: left; }

.prism i, .prism b, .prism em { height: 92px; border-radius: 16px 16px 10px 10px; background: linear-gradient(180deg, #E8D5C0, #D4A574); }
.gem i, .gem b, .gem em { clip-path: polygon(50% 0, 100% 24%, 88% 78%, 50% 100%, 12% 78%, 0 24%); background: linear-gradient(145deg, #FFF8F0, #B86F3E); }
.pyramid i, .pyramid b, .pyramid em { clip-path: polygon(50% 0, 100% 100%, 0 100%); background: linear-gradient(145deg, #D4A574, #B86F3E); }
.disc i, .disc b, .disc em { border-radius: 50%; background: radial-gradient(circle at 32% 28%, #FFF8F0 0%, #E8D5C0 32%, #D4A574 72%, #B86F3E 100%); }
.cube::after { content: ""; position: absolute; width: 30px; height: 30px; left: 46px; top: -20px; border-radius: 8px; background: linear-gradient(145deg, #8A9E7C, #D4A574); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 12px 24px rgba(74,54,40,.13); }

.ripple {
  position: fixed;
  border-radius: 50%;
  border: 2px solid #B86F3E;
  pointer-events: none;
  z-index: 100;
  animation: ripple-expand 600ms ease-out forwards;
}

@keyframes title-weight { from { opacity: 0; font-variation-settings: "wght" 200; } to { opacity: 1; font-variation-settings: "wght" 500; } }
@keyframes descriptor-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float-drift { from { margin-top: -8px; } to { margin-top: 8px; } }
@keyframes inline-float { 0%,100% { translate: 0 -8px; rotate: 0deg; } 50% { translate: 0 8px; rotate: 3deg; } }
@keyframes ripple-expand { from { width: 0; height: 0; opacity: .5; } to { width: 400px; height: 400px; opacity: 0; margin: -200px 0 0 -200px; } }

@media (max-width: 720px) {
  .float { opacity: .18; }
  .inline-row { gap: 1rem; transform: scale(.82); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .float { display: none; }
  .ripple { display: none; }
}
