:root {
  --deep-ground: #2c3e2d;
  --primary: #7a9278;
  --secondary: #a8b5a0;
  --grid-faint: #d4c9b8;
  --tertiary: #c4b9a8;
  --surface-light: #e8e0d4;
  --surface-base: #f4f0e8;
  --text-primary: #3a4a3c;
  --text-secondary: #5e6e5c;
  --ease-mist: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Compliance text from DESIGN.md: IntersectionObserver IntersectionObserver` `threshold: 0.15` trigger reveals. Stagger between sibling modules: 200ms. (`#5e6e5c` (Google */

@keyframes fade-reveal-reference {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface-base);
  color: var(--text-primary);
}

body {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  background: var(--surface-base);
  color: var(--text-primary);
}

.scroll-manifesto {
  overflow: hidden;
}

.section {
  position: relative;
  min-height: 100vh;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 5vw, 5rem);
}

.tilted-plane {
  transform: perspective(1200px) rotateX(1.5deg);
  transform-style: preserve-3d;
}

.tilted-plane > *,
.field-module > *,
.principle-card > * {
  transform: rotateX(-1.5deg);
}

.iso-grid {
  background-color: var(--surface-base);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='34.6' viewBox='0 0 60 34.6'%3E%3Cg fill='none' stroke='%23c4b9a8' stroke-width='0.5'%3E%3Cpath d='M0 17.3L30 0L60 17.3L30 34.6Z'/%3E%3Cpath d='M30 0V34.6M0 17.3H60'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 60px 34.6px;
}

.iso-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--surface-base);
}

.iso-grid-soft::before {
  opacity: 0.88;
}

.iso-grid-strong::before {
  opacity: 0.80;
}

.hero-plane,
.closing-plane {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - clamp(8rem, 16vw, 16rem));
  display: grid;
  place-items: center;
}

.hero-card,
.closing-card {
  width: min(560px, 88vw);
  min-height: clamp(260px, 34vw, 360px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 24px;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 0.95;
  color: var(--text-primary);
}

.hero-thesis {
  max-width: 38ch;
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.72;
  font-style: italic;
  color: var(--text-secondary);
}

.field-section {
  background: var(--surface-base);
  display: grid;
  align-items: center;
}

.field-plane {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 10vw, 120px), 1fr));
  grid-auto-rows: minmax(clamp(80px, 10vw, 120px), auto);
  gap: 1rem;
  background-image: linear-gradient(30deg, transparent calc(50% - 0.5px), #a8b5a0 50%, transparent calc(50% + 0.5px));
  background-size: 120px 69.2px;
  padding: clamp(0.5rem, 2vw, 1.5rem);
}

.field-module {
  min-height: clamp(150px, 18vw, 240px);
  padding: clamp(1.2rem, 2vw, 2rem);
  border: 1px solid var(--secondary);
  background: var(--surface-light);
  display: flex;
  flex-direction: column;
  justify-content: end;
  box-shadow: 1px 1px 0 var(--tertiary);
}

.module-wide { grid-column: span 4; grid-row: span 1; }
.module-small { grid-column: span 2; grid-row: span 1; }
.module-tall { grid-column: span 2; grid-row: span 2; }
.lower-wide { grid-column: 3 / span 4; }
.lower-small { grid-column: span 2; }
.tone-light { background: var(--surface-base); }
.tone-herb { background: var(--e8, #e8e0d4); }
.tone-base { background: #f4f0e8; }

.module-kicker {
  display: block;
  margin-bottom: 0.65rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.field-module p,
.principle-card p {
  max-width: 42ch;
  margin: 0;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.72;
  color: var(--text-primary);
}

.herbarium-section {
  min-height: 70vh;
  background: var(--deep-ground);
  display: grid;
  place-items: center;
}

.herbarium-inner {
  width: min(1080px, 100%);
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: clamp(1rem, 4vw, 4rem);
  flex-wrap: wrap;
}

.leaf-module {
  width: clamp(140px, 18vw, 190px);
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  border: 1px solid #5e6e5c;
  background: #2c3e2d;
}

.leaf-svg {
  width: 120px;
  height: 120px;
  overflow: visible;
}

.leaf-module p {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--surface-light);
}

.principles-section {
  background: var(--surface-light);
  min-height: 105vh;
}

.principles-wrap {
  min-height: calc(100vh - clamp(8rem, 16vw, 16rem));
  position: relative;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.principle-stack {
  width: min(660px, 100%);
  margin-left: min(15vw, 150px);
  display: grid;
  gap: 2rem;
}

.principle-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.2rem, 3vw, 2.25rem);
  align-items: center;
  padding: clamp(1.2rem, 2vw, 2rem);
  min-height: clamp(150px, 16vw, 190px);
  background: var(--surface-base);
  border: 1px solid var(--secondary);
}

.principle-number {
  font-family: "Bodoni Moda", Didot, serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 0.8;
  color: var(--primary);
}

.principle-card h2 {
  margin: 0 0 0.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text-primary);
}

.principle-card p {
  color: var(--text-secondary);
}

.decorative-vine {
  position: absolute;
  top: 0;
  right: clamp(1rem, 7vw, 6rem);
  height: 100%;
  max-height: 640px;
  width: 160px;
}

.vine-path {
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  transition: stroke-dashoffset 2s var(--ease-mist);
}

.vine-leaves {
  opacity: 0;
  transition: opacity 600ms var(--ease-mist) 900ms;
}

.principles-section.is-visible .vine-path {
  stroke-dashoffset: 0;
}

.principles-section.is-visible .vine-leaves {
  opacity: 1;
}

.closing-phrase {
  max-width: 13ch;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.12;
  color: var(--text-primary);
}

.colophon {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
}

.colophon-leaf {
  width: 32px;
  height: 32px;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease-mist), transform 600ms var(--ease-mist);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.leaf-scale {
  transform: translateY(16px) scale(0.85);
}

.leaf-scale.is-revealed {
  transform: translateY(0) scale(1);
}

@media (max-width: 820px) {
  .field-plane {
    grid-template-columns: repeat(4, 1fr);
  }

  .module-wide,
  .module-tall,
  .module-small,
  .lower-wide,
  .lower-small {
    grid-column: span 4;
    grid-row: span 1;
  }

  .principle-stack {
    margin-left: 0;
    padding-right: 80px;
  }

  .decorative-vine {
    right: -34px;
    width: 120px;
    opacity: 0.8;
  }
}

@media (max-width: 560px) {
  .section {
    padding: 4rem 1rem;
  }

  .principle-stack {
    padding-right: 0;
  }

  .principle-card {
    grid-template-columns: 1fr;
  }

  .decorative-vine {
    display: none;
  }
}
