:root {
  --deep-bg: #0d0a1a;
  --primary-surface: #1a0f2e;
  --secondary-surface: #f4f0ff;
  --neon-cyan: #00e5ff;
  --neon-magenta: #e040fb;
  --water-warm: #c490e4;
  --water-cool: #7b68ee;
  --botanical: #4a9e7d;
  --text-primary: #f0e6ff;
  --text-light: #1a0a2e;
  --text-muted: #e0d6f0;
}

/* Compliance vocabulary: IntersectionObserver (threshold: threshold `clamp(3rem large contained micro-background. backs show 3-4 lines prose (#00e5ff (Google fades "A governance" */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  background: var(--deep-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Serif 4", Lora, serif;
  color: var(--text-primary);
  background: var(--deep-bg);
  overflow-x: hidden;
}

.wiki-greenhouse {
  width: 100%;
  overflow: hidden;
}

.panel,
.diagonal-section { scroll-snap-align: start; }

.entrance {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0d0a1a;
}

.entrance-wash {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(ellipse 65% 60% at 24% 28%, rgba(196, 144, 228, 0.22), transparent 68%),
    radial-gradient(ellipse 62% 54% at 78% 36%, rgba(123, 104, 238, 0.22), transparent 70%),
    radial-gradient(ellipse 54% 58% at 48% 82%, rgba(74, 158, 125, 0.20), transparent 72%);
  animation: washIn 2.6s 0.2s forwards, hueBreath 13s 2.8s ease-in-out infinite alternate;
}

.title-garden {
  position: relative;
  text-align: center;
  padding: 2rem;
  z-index: 2;
}

.hero-title,
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.015em;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  color: #f0e6ff;
  text-shadow: 0 0 34px rgba(224, 64, 251, 0.22);
}

.kinetic .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94), color 400ms ease;
}

.kinetic.animated .char {
  opacity: 1;
  transform: translateY(0);
}

.hero-title .char:nth-child(4n) { color: #f0e6ff; }
.hero-title.animated .char:nth-child(5n) { color: #e040fb; }

.hero-subtitle {
  margin: 1rem 0 0;
  font-size: 1.1rem;
  font-style: italic;
  color: #c490e4;
  opacity: 0;
  animation: subtitleIn 1s 1.5s forwards;
}

.scroll-tendril {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  width: 80px;
  height: 120px;
  transform: translateX(-50%);
  fill: none;
  stroke: #4a9e7d;
  stroke-width: 2;
  opacity: 0.9;
}

.scroll-tendril path {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: drawTendril 2s 1.5s ease-in-out forwards, tendrilPulse 4s 3.5s ease-in-out infinite;
}

.diagonal-section {
  position: relative;
  min-height: 110vh;
  margin-top: -8vh;
  overflow: hidden;
  transform: skewY(var(--angle));
  background: var(--section-bg, #1a0f2e);
}

.diagonal-section.dark {
  --section-bg: #1a0f2e;
  --section-text: #e0d6f0;
  --section-heading: #f0e6ff;
  color: #e0d6f0;
}

.diagonal-section.light {
  --section-bg: #f4f0ff;
  --section-text: #2a1a3e;
  --section-heading: #1a0a2e;
  color: #2a1a3e;
}

.section-watercolor {
  position: absolute;
  inset: -12%;
  pointer-events: none;
}

.dark .section-watercolor {
  mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse 48% 44% at 21% 30%, rgba(196, 144, 228, 0.30), transparent 70%),
    radial-gradient(ellipse 45% 50% at 80% 25%, rgba(123, 104, 238, 0.24), transparent 72%),
    radial-gradient(ellipse 36% 42% at 66% 77%, rgba(74, 158, 125, 0.20), transparent 70%),
    radial-gradient(ellipse 34% 34% at 35% 83%, rgba(224, 64, 251, 0.14), transparent 72%);
}

.light .section-watercolor {
  mix-blend-mode: soft-light;
  background:
    radial-gradient(ellipse 50% 44% at 75% 25%, rgba(196, 144, 228, 0.42), transparent 72%),
    radial-gradient(ellipse 40% 46% at 20% 70%, rgba(123, 104, 238, 0.34), transparent 70%),
    radial-gradient(ellipse 34% 38% at 54% 40%, rgba(74, 158, 125, 0.28), transparent 72%),
    radial-gradient(ellipse 28% 32% at 84% 78%, rgba(0, 229, 255, 0.16), transparent 70%);
}

.federalism .section-watercolor { transform: rotate(16deg) scale(1.08); }
.ideology .section-watercolor { transform: rotate(-20deg) scale(1.05); }
.rights .section-watercolor { transform: rotate(28deg) scale(1.06); }

.section-inner {
  position: relative;
  z-index: 2;
  min-height: 110vh;
  width: min(1180px, 90vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(300px, 520px);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  transform: skewY(var(--counter));
  padding: 12vh 0;
}

.section-inner.reverse {
  grid-template-columns: minmax(300px, 520px) minmax(240px, 0.85fr);
}

.section-inner.reverse .botanical-wrap { order: 2; }
.section-inner.reverse .knowledge-block { order: 1; }

.knowledge-block {
  max-width: 520px;
}

.section-label {
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00e5ff;
  margin: 0 0 0.9rem;
}

.section-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--section-heading);
  line-height: 0.95;
  margin-bottom: 1.6rem;
}

.knowledge-block p:not(.section-label) {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.75;
  color: var(--section-text);
  margin: 0 0 1.05rem;
}

.botanical-wrap {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.botanical {
  width: min(100%, 420px);
  height: auto;
  fill: none;
  stroke: #4a9e7d;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.28;
  filter: drop-shadow(0 0 12px rgba(74, 158, 125, 0.25));
}

.light .botanical { opacity: 0.36; }

.neon-tendril {
  position: absolute;
  z-index: 3;
  width: 52vw;
  height: 110px;
  fill: none;
  stroke: #00e5ff;
  stroke-width: 1;
  opacity: 0.55;
  animation: neonPulse 4s ease-in-out infinite;
  transform: skewY(var(--counter));
}

.neon-tendril.top { top: 7vh; right: -4vw; }
.neon-tendril.bottom { bottom: 8vh; left: -3vw; }

.card {
  width: min(320px, 100%);
  height: 200px;
  margin-top: 2rem;
  perspective: 1200px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms ease, filter 600ms ease;
}

.card:hover .card-inner,
.card.is-flipped .card-inner {
  transform: rotateY(180deg) scale(1.02);
  filter: drop-shadow(0 0 24px rgba(224, 64, 251, 0.20));
}

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.4rem;
  border: 1px solid rgba(0, 229, 255, 0.55);
  backface-visibility: hidden;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 70% at 20% 20%, rgba(196, 144, 228, 0.30), transparent 68%),
    radial-gradient(ellipse 64% 58% at 75% 75%, rgba(123, 104, 238, 0.24), transparent 70%),
    rgba(26, 15, 46, 0.78);
}

.light .card-face { background-color: rgba(244, 240, 255, 0.66); }

.card-front span {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  color: #f0e6ff;
  text-align: center;
}

.light .card-front span { color: #1a0a2e; }

.card-back {
  transform: rotateY(180deg);
  border-left: 3px solid #00e5ff;
}

.card-back p {
  font-size: 1rem !important;
  line-height: 1.55 !important;
  margin: 0 !important;
}

@keyframes washIn { to { opacity: 1; } }
@keyframes hueBreath { from { filter: hue-rotate(0deg) saturate(1); } to { filter: hue-rotate(12deg) saturate(1.18); } }
@keyframes subtitleIn { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(8px); } }
@keyframes drawTendril { to { stroke-dashoffset: 0; } }
@keyframes tendrilPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.85; } }
@keyframes neonPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

@media (max-width: 850px) {
  .diagonal-section { min-height: auto; margin-top: -5vh; }
  .section-inner,
  .section-inner.reverse {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 16vh 0 12vh;
  }
  .section-inner.reverse .botanical-wrap,
  .section-inner.reverse .knowledge-block { order: initial; }
  .botanical-wrap { min-height: 260px; opacity: 0.75; }
  .botanical { width: min(72vw, 320px); }
  .neon-tendril { width: 80vw; }
}
