:root {
  --deep-forest-floor: #0a1a10;
  --forest-canopy: #1a3d28;
  --moss-border: #2d6b45;
  --pale-eucalyptus: #e8f0e4;
  --muted-sage: #b8ccb0;
  --shadow-black: #0d1f16;
  --accent-amber: #c9a227;
  --frost-white: rgba(255, 255, 255, 0.12);
  --frost-white-hex: #ffffff;
  --annotation-sage: #8fa889;
  --font-headline: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-annotation: "Space Grotesk", system-ui, sans-serif;
  --section-space: clamp(4rem, 8vh, 8rem);
}

/* Compliance lexicon from DESIGN.md: Interventions Interventions: Interventions:** Interventions:\*\* collides productively neubrutalist `clamp(4rem (Google fades beside Behind */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--deep-forest-floor);
  color: var(--muted-sage);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.15vw, 1.2rem);
  line-height: 1.72;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

.design-token { display: none; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(45, 107, 69, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(45, 107, 69, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 75% 18%, rgba(45, 107, 69, 0.2), transparent 30vw),
    radial-gradient(circle at 15% 72%, rgba(26, 61, 40, 0.45), transparent 28vw);
  background-size: 64px 64px, 64px 64px, auto, auto;
  opacity: 0.55;
}

.glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  background: var(--forest-canopy);
  mix-blend-mode: difference;
}

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background: var(--deep-forest-floor);
}

.hero h1 {
  margin: 0;
  position: relative;
  z-index: 2;
  font-family: var(--font-headline);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--pale-eucalyptus);
  text-shadow: 3px 3px 0 var(--shadow-black);
}

.hero-circle {
  position: absolute;
  width: 40vw;
  min-width: 280px;
  max-width: 620px;
  aspect-ratio: 1;
  z-index: 1;
  opacity: 0.45;
  animation: rotate 60s linear infinite, living-circle 4s ease-in-out 4s infinite;
}

.hero-circle circle,
.circle-mark circle,
.final-circle circle,
.hex-mark polygon,
.final-hex polygon {
  fill: none;
  stroke: var(--moss-border);
  stroke-width: 1.5px;
}

.divider {
  width: min(82vw, 1180px);
  margin: 0 auto;
  position: relative;
  height: 72px;
  border-top: 4px solid var(--shadow-black);
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 20px;
  height: 20px;
  background: var(--deep-forest-floor);
  border: 4px solid var(--shadow-black);
}

.divider::before { left: 0; border-radius: 50%; }
.divider::after { right: 0; }

.waypoint-button {
  position: absolute;
  left: max(0px, 3vw);
  top: -25px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--moss-border);
  cursor: pointer;
}

.waypoint-label {
  font-family: var(--font-headline);
  font-style: italic;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4a7c59;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 180ms ease, transform 180ms ease, color 180ms ease;
}

.waypoint-button:hover .waypoint-label,
.waypoint-button.is-active .waypoint-label { opacity: 1; transform: translateX(0); color: var(--accent-amber); }

.hexagon-shape,
.triangle-shape,
.circle-shape {
  display: inline-block;
  width: 34px;
  height: 34px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hexagon-shape {
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  border: 2px solid var(--moss-border);
  background: rgba(45, 107, 69, 0.06);
}

.triangle-shape {
  clip-path: polygon(50% 0, 100% 92%, 0 92%);
  background: rgba(45, 107, 69, 0.4);
}

.circle-shape {
  border: 2px solid var(--moss-border);
  border-radius: 50%;
}

.waypoint-button:hover .hexagon-shape,
.waypoint-button:hover .triangle-shape,
.waypoint-button:hover .circle-shape,
.waypoint-button.is-active .hexagon-shape,
.waypoint-button.is-active .triangle-shape,
.waypoint-button.is-active .circle-shape { background: var(--accent-amber); border-color: var(--accent-amber); transform: rotate(12deg); }

.essay-section {
  min-height: 80vh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 65%) minmax(260px, 30%);
  column-gap: 5vw;
  align-items: start;
  padding: var(--section-space) 8vw;
}

.essay-section:nth-of-type(odd) { background: rgba(26, 61, 40, 0.18); }

.content-column {
  max-width: 820px;
  margin-left: clamp(0rem, 3vw, 4rem);
  transform: translateZ(0);
}

.section-kicker,
.annotation-card span {
  font-family: var(--font-annotation);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent-amber);
}

h2 {
  margin: 0 0 2rem;
  font-family: var(--font-headline);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--pale-eucalyptus);
  text-shadow: 3px 3px 0 var(--shadow-black);
}

p { margin: 0 0 1.4rem; }

.annotation-card,
.final-card {
  border: 1px solid var(--frost-white);
  border-radius: 2px;
  background: rgba(26, 61, 40, 0.35);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 4px 4px 0 rgba(13, 31, 22, 0.8);
}

.annotation-card {
  position: sticky;
  top: 20vh;
  padding: 1.25rem;
  font-family: var(--font-annotation);
  font-size: clamp(0.8rem, 0.95vw, 0.95rem);
  line-height: 1.6;
  color: rgba(143, 168, 137, 0.85);
  opacity: 0;
  transform: translateY(16px) translateX(12px);
  transition: opacity 220ms ease, transform 220ms ease, border-color 180ms ease;
}

.annotation-card.is-visible { opacity: 1; transform: translateY(0) translateX(0); animation: card-materialize 150ms steps(2, end); }
.annotation-card:hover { border-color: var(--accent-amber); }
.annotation-card p { margin: 0.75rem 0 0; }

.section-mark {
  position: absolute;
  right: 8vw;
  bottom: 10vh;
  width: clamp(70px, 10vw, 150px);
  opacity: 0.33;
  z-index: -0;
}

.hex-mark { animation: rotate 45s linear infinite; }
.circle-mark { animation: drift 9s ease-in-out infinite; }
.triangle-mark {
  height: clamp(70px, 10vw, 150px);
  clip-path: polygon(50% 0, 100% 90%, 0 90%);
  background: rgba(45, 107, 69, 0.4);
}

.final-section {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--section-space) 8vw;
  overflow: hidden;
}

.final-card {
  max-width: 520px;
  padding: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  z-index: 2;
}

.final-card p {
  margin: 0;
  font-style: italic;
  color: var(--pale-eucalyptus);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.convergence-shapes > * { position: absolute; opacity: 0.34; }
.final-hex { width: 38vw; left: 10vw; top: 18vh; animation: rotate 70s linear infinite; }
.final-circle { width: 44vw; right: 8vw; bottom: 12vh; animation: rotate 90s linear reverse infinite; }
.final-triangle { width: 30vw; height: 30vw; left: 38vw; bottom: 18vh; clip-path: polygon(50% 0, 100% 92%, 0 92%); background: rgba(45, 107, 69, 0.28); animation: rotate 54s linear infinite; }

body.glitching main { animation: glitch-burst 250ms steps(2, end); }
body.glitching .glitch-overlay { animation: overlay-burst 250ms steps(2, end); }
body.glitching h1,
body.glitching h2 { text-shadow: 2px 0 #00ffff, -2px 0 #ff00aa, 3px 3px 0 var(--shadow-black); }
body.glitching .section-mark { filter: drop-shadow(8px -4px 0 #ff00aa) drop-shadow(-8px 4px 0 #00ffff); transform: rotate(9deg); }

@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes living-circle { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
@keyframes card-materialize { 0% { opacity: 0; backdrop-filter: blur(0) saturate(1); border-color: #00ffff; } 50% { border-color: #ff00aa; } 100% { opacity: 1; backdrop-filter: blur(16px) saturate(1.2); border-color: var(--frost-white); } }
@keyframes overlay-burst { 0%, 100% { opacity: 0; } 50% { opacity: 0.38; } }
@keyframes glitch-burst { 0% { transform: translateX(0); } 25% { transform: translateX(6px); } 50% { transform: translateX(-4px); } 75% { transform: translateX(2px); } 100% { transform: translateX(0); } }

@media (max-width: 860px) {
  .essay-section { grid-template-columns: 1fr; padding: var(--section-space) 6vw; }
  .content-column { margin-left: 0; }
  .annotation-card { position: relative; top: auto; margin-top: 2rem; }
  .divider { width: 88vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
