:root {
  /* (Google IntersectionObserver` with `threshold: 0.15` (Google */
  --warm: #F5EDE0;
  --cool: #EDE6DD;
  --linen: #EDE4D3;
  --aged: #E5D9C4;
  --ink: #3D3229;
  --sage: #8A7E6B;
  --marigold: #C4943A;
  --teal: #6B9B8A;
  --haze: #D4A0B0;
  --loam: #2E2519;
  --mount: #D4C5A9;
  --border: rgba(212, 197, 169, 0.4);
  --scroll-temp: 0%;
  --scroll-y: 0px;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --shadow-x: 0px;
  --shadow-y: 0px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Lora", serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(61, 50, 41, 0.02) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(61, 50, 41, 0.018) 0 1px, transparent 1px 80px),
    linear-gradient(180deg, color-mix(in oklch, var(--warm) calc(100% - var(--scroll-temp)), var(--cool) var(--scroll-temp)) 0%, #EDE4D3 42%, #E5D9C4 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  background: repeating-linear-gradient(transparent, transparent 2px, rgba(0,0,0,0.015) 2px, rgba(0,0,0,0.015) 4px);
  mix-blend-mode: multiply;
}

.paper-filter { position: absolute; }

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

.background-plane { transform: translateY(calc(var(--scroll-y) * 0.3)); }
.content-plane { transform: translateY(calc(var(--scroll-y) * 0)); }
.foreground-plane { transform: translateY(calc(var(--scroll-y) * 0.013)); }

.leaf-home {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(196, 148, 58, 0.28);
  background: rgba(245, 237, 224, 0.35);
  opacity: 0.3;
  z-index: 30;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.leaf-home:hover { opacity: 0.65; transform: rotate(-8deg); }
.leaf-home span, .footer-leaf, .tiny-leaf {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: auto;
  background: var(--marigold);
  clip-path: polygon(50% 0, 62% 31%, 96% 23%, 72% 51%, 88% 88%, 50% 68%, 12% 88%, 28% 51%, 4% 23%, 38% 31%);
}

.vitrine {
  position: relative;
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2rem);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-paper {
  position: absolute;
  inset: -8vh -8vw;
  background:
    radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(212, 160, 176, 0.16), transparent 24rem),
    radial-gradient(circle at 10% 20%, rgba(196, 148, 58, 0.12), transparent 18rem),
    repeating-linear-gradient(45deg, rgba(46, 37, 25, 0.014) 0 1px, transparent 1px 9px);
  filter: url(#paper-noise);
}

.hero-grid {
  width: min(1200px, 100%);
  min-height: calc(100vh - clamp(2rem, 6vw, 4rem));
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(8px, 1.5vw, 20px);
}

.specimen-card,
.hero-leaf-case,
.bento-cell,
.archive-cell {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 2px;
  background-color: rgba(237, 228, 211, 0.76);
  background-image:
    radial-gradient(ellipse at center, transparent 48%, rgba(61, 50, 41, 0.035) 100%),
    repeating-linear-gradient(0deg, rgba(61, 50, 41, 0.005) 0 1px, transparent 1px 5px);
  filter: url(#paper-noise);
  box-shadow: 0 22px 60px rgba(61, 50, 41, 0.07);
  overflow: hidden;
}

.specimen-card::before,
.hero-leaf-case::before,
.wash::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #D4A0B0 0%, #C4943A 50%, #6B9B8A 100%);
  opacity: 0.08;
}

.hero-copy {
  grid-column: span 7;
  align-self: stretch;
  padding: clamp(2rem, 7vw, 5.5rem);
  display: grid;
  align-content: center;
}

.hero-leaf-case {
  grid-column: span 5;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 4rem);
}

.label {
  margin: 0 0 1.25rem;
  color: var(--sage);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.95;
  transition: font-variation-settings 0.8s ease, font-weight 0.8s ease;
}

h1:hover, h2:hover { font-weight: 600; font-variation-settings: "wght" 600, "wdth" 92; }

.breathing-title {
  max-width: 9ch;
  font-size: clamp(3.4rem, 10vw, 9rem);
  font-variation-settings: "wght" 300, "wdth" 88;
  animation: breathe 4s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

@keyframes breathe {
  0%, 100% { font-variation-settings: "wght" 300, "wdth" 88; }
  50% { font-variation-settings: "wght" 400, "wdth" 96; }
}

.hero-text {
  max-width: 34rem;
  margin: 2rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--sage);
}

.large-leaf {
  position: relative;
  width: min(56vw, 25rem);
  aspect-ratio: 0.68;
  background: linear-gradient(145deg, rgba(107, 155, 138, 0.45), rgba(196, 148, 58, 0.18));
  clip-path: polygon(50% 0%, 75% 16%, 92% 43%, 78% 75%, 50% 100%, 22% 75%, 8% 43%, 25% 16%);
  filter: drop-shadow(var(--shadow-x) var(--shadow-y) 28px rgba(46, 37, 25, 0.2));
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.large-leaf::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 75%;
  background: rgba(61, 50, 41, 0.12);
}

@keyframes heroDrift {
  from { transform: translate3d(-1vw, 1vh, 0) rotate(-8deg); }
  to { transform: translate3d(1.2vw, -1vh, 0) rotate(6deg); }
}

.caption {
  align-self: end;
  margin: 1.5rem 0 0;
  color: var(--sage);
  font-size: 0.9rem;
  font-style: italic;
}

.specimen-grid {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: clamp(8px, 1.5vw, 20px);
}

.bento-cell {
  min-height: 14rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.square { aspect-ratio: 1 / 1; }
.tall { grid-row: span 2; }
.wide { aspect-ratio: 3 / 1; }

.text-cell h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.1rem, 4vw, 4.25rem);
  font-variation-settings: "wght" 300, "wdth" 92;
}

.text-cell p:last-child, .quote-cell p:last-child {
  max-width: 38rem;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
}

.quote-cell {
  display: grid;
  align-content: end;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.botanical-cell { display: grid; place-items: center; min-height: 18rem; }

.color-cell { display: grid; align-content: end; }
.color-cell.marigold { background-color: rgba(196, 148, 58, 0.26); }
.color-cell.teal { background-color: rgba(107, 155, 138, 0.24); }

.fern-stem {
  position: absolute;
  width: 2px;
  height: 76%;
  background: rgba(107, 155, 138, 0.38);
  transform: rotate(18deg);
}

.leaf-composition i,
.pressed-flower i {
  position: absolute;
  width: 3rem;
  height: 6rem;
  background: rgba(107, 155, 138, 0.15);
  border-radius: 50% 0 50% 0;
  clip-path: polygon(50% 0%, 86% 16%, 100% 52%, 64% 100%, 24% 78%, 0 43%, 20% 13%);
}

.cluster-one i:nth-child(1) { transform: translate(-5rem, -3rem) rotate(-36deg); }
.cluster-one i:nth-child(2) { transform: translate(0, -4rem) rotate(8deg); background: rgba(212, 160, 176, 0.16); }
.cluster-one i:nth-child(3) { transform: translate(4rem, -1rem) rotate(44deg); background: rgba(196, 148, 58, 0.14); }
.cluster-one i:nth-child(4) { transform: translate(-3rem, 3rem) rotate(92deg); }
.cluster-one i:nth-child(5) { transform: translate(2rem, 3rem) rotate(-82deg); background: rgba(61, 50, 41, 0.07); }
.cluster-one i:nth-child(6) { transform: translate(5rem, 4rem) rotate(20deg); }

.ginkgo-fan {
  width: min(80%, 26rem);
  aspect-ratio: 1.5;
  background: radial-gradient(circle at 50% 100%, rgba(245, 237, 224, 0) 0 14%, rgba(196, 148, 58, 0.22) 15% 100%);
  clip-path: polygon(0 100%, 5% 47%, 18% 14%, 39% 0, 50% 20%, 61% 0, 82% 14%, 95% 47%, 100% 100%);
}

.reed-line {
  position: absolute;
  left: 20%;
  height: 80%;
  width: 1rem;
  background: rgba(107, 155, 138, 0.25);
  clip-path: polygon(40% 0, 68% 0, 58% 100%, 30% 100%);
}

.floating-label { position: absolute; left: 1.5rem; bottom: 1rem; margin: 0; }

.pressed-flower i { left: 50%; top: 50%; transform-origin: 0 0; background: rgba(212, 160, 176, 0.16); }
.pressed-flower i:nth-child(1) { transform: rotate(0deg) translate(0, -4rem); }
.pressed-flower i:nth-child(2) { transform: rotate(72deg) translate(0, -4rem); }
.pressed-flower i:nth-child(3) { transform: rotate(144deg) translate(0, -4rem); }
.pressed-flower i:nth-child(4) { transform: rotate(216deg) translate(0, -4rem); }
.pressed-flower i:nth-child(5) { transform: rotate(288deg) translate(0, -4rem); }

.oval-divider {
  width: 7rem;
  height: 12rem;
  background: rgba(196, 148, 58, 0.18);
  clip-path: polygon(50% 0%, 82% 20%, 100% 56%, 52% 100%, 8% 57%, 18% 18%);
  transform: rotate(-18deg);
}

.archive {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3rem 0 7rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(8px, 1.5vw, 20px);
}

.archive-cell {
  min-height: 8rem;
  padding: 1.25rem;
  opacity: 0.62;
}
.archive-cell:nth-child(1) { grid-column: span 3; opacity: 0.5; }
.archive-cell:nth-child(2) { grid-column: span 4; opacity: 0.34; display: grid; place-items: center; }
.archive-cell:nth-child(3) { grid-column: span 5; opacity: 0.24; }

footer {
  display: grid;
  place-items: center;
  margin-top: 5rem;
  color: var(--sage);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.4;
}

.footer-leaf { width: 0.9rem; height: 0.9rem; margin-bottom: 1rem; }

.drift-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-leaf {
  position: absolute;
  display: block;
  opacity: 0.06;
  background: var(--loam);
  will-change: transform;
}

.leaf-oval {
  left: 10vw;
  width: 7rem;
  height: 12rem;
  clip-path: polygon(50% 0%, 86% 18%, 100% 56%, 50% 100%, 0 56%, 14% 18%);
  animation: leafFallA 30s linear infinite, leafSway 20s ease-in-out infinite alternate;
}

.leaf-ginkgo {
  left: 62vw;
  width: 9rem;
  height: 6rem;
  background: var(--haze);
  clip-path: polygon(0 100%, 8% 42%, 28% 8%, 50% 24%, 72% 8%, 92% 42%, 100% 100%);
  animation: leafFallB 36s linear infinite -9s, leafSway 24s ease-in-out infinite alternate;
}

.leaf-reed {
  left: 84vw;
  width: 2rem;
  height: 14rem;
  background: var(--teal);
  clip-path: polygon(38% 0, 62% 0, 80% 100%, 20% 100%);
  animation: leafFallC 33s linear infinite -17s, leafSway 18s ease-in-out infinite alternate;
}

@keyframes leafFallA { from { top: -20vh; transform: translateX(-5vw) rotate(-15deg); } to { top: 112vh; transform: translateX(5vw) rotate(15deg); } }
@keyframes leafFallB { from { top: -18vh; transform: translateX(4vw) rotate(12deg); } to { top: 114vh; transform: translateX(-5vw) rotate(-15deg); } }
@keyframes leafFallC { from { top: -25vh; transform: translateX(-3vw) rotate(8deg); } to { top: 116vh; transform: translateX(5vw) rotate(-12deg); } }
@keyframes leafSway { from { margin-left: -5vw; } to { margin-left: 5vw; } }

.reveal-cell {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out var(--delay, 0s), transform 0.6s ease-out var(--delay, 0s);
}
.reveal-cell.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 820px) {
  .hero-grid, .specimen-grid, .archive-grid { grid-template-columns: repeat(6, 1fr); }
  .hero-copy, .hero-leaf-case, .span-2, .span-3, .span-4, .span-5, .span-6, .archive-cell:nth-child(n) { grid-column: span 6; }
  .wide, .square { aspect-ratio: auto; }
  .breathing-title { font-size: clamp(3.2rem, 18vw, 6rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .breathing-title, .large-leaf, .floating-leaf { animation: none; }
  .background-plane, .content-plane, .foreground-plane { transform: none; }
  .reveal-cell { transition-duration: 0.01ms; }
}
