/* gur.al — Computational Pastoral */
/* Palette: #FFB3C6 Petal Pink, #B8F0D8 Mint Cream, #FFF0B3 Butter Cream,
   #FF3399 Electric Fuchsia, #2D1F14 Deep Loam, #FFF8F0 Cream White,
   #1A1210 Night Soil, #33CC77 Chlorophyll, #2d2d2d Dark Gray */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Libre Baskerville', Georgia, serif;
  color: #2D1F14;
  background: #1A1210;
  overflow-x: hidden;
}

/* Fixed canvases */
#pollen-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

#cursor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 101;
}

/* Section Architecture */
.act {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.section-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.act-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  width: 90%;
  padding: 2rem 0;
}

/* Scroll reveal */
.act-content > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.act-content.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.act-content.revealed > *:nth-child(1) { transition-delay: 0s; }
.act-content.revealed > *:nth-child(2) { transition-delay: 0.15s; }
.act-content.revealed > *:nth-child(3) { transition-delay: 0.3s; }

/* ===== ACT I — SEED (#1A1210) ===== */
#act-seed {
  background-color: #1A1210;
}

/* Override scroll reveal for seed - uses custom animations */
#act-seed .act-content > * {
  opacity: 0;
  transform: none;
  transition: none;
}

.site-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 10vw, 120px);
  line-height: 1.0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFF8F0;
  text-align: center;
  opacity: 0;
  animation: fadeUp 2s ease-out 0.3s forwards;
}

.site-subtitle {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(14px, 2.5vw, 22px);
  color: #B8F0D8;
  text-align: center;
  margin-top: 0.5rem;
  opacity: 0;
  animation: fadeUp 1.5s ease-out 1s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Underline-draw pattern */
.underline-draw {
  background-image: linear-gradient(#FF3399, #FF3399);
  background-position: 0 100%;
  background-size: 0% 2px;
  background-repeat: no-repeat;
  text-decoration: none;
  padding-bottom: 2px;
}

.underline-draw.active {
  background-size: 100% 2px;
  transition: background-size 1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Algo annotations */
.algo-annotations {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1.5s ease-out 2.5s forwards;
}

.algo-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: #33CC77;
  letter-spacing: 0.06em;
  opacity: 0.6;
}

/* ===== ACT II — GERMINATE (#FFB3C6) ===== */
#act-germinate {
  background-color: #FFB3C6;
}

#act-germinate .act-text {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: #2D1F14;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ===== ACT III — BLOOM (Canvas bg) ===== */
#act-bloom {
  background-color: #2D1F14;
}

.bloom-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFF8F0;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ===== ACT IV — SWAY (#B8F0D8) ===== */
#act-sway {
  background-color: #B8F0D8;
}

#act-sway .act-text {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: #2D1F14;
  margin-bottom: 1.5rem;
}

.grass-band {
  width: 100%;
  height: 200px;
  position: relative;
  z-index: 1;
  will-change: transform;
}

.sway-lower {
  padding-top: 0;
}

/* ===== ACT V — SCATTER (#FFF0B3) ===== */
#act-scatter {
  background-color: #FFF0B3;
}

.scatter-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 8vw, 96px);
  line-height: 1.0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2D1F14;
  text-align: center;
  margin-bottom: 1.5rem;
}

.scatter-seed {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #2D1F14;
  opacity: 0.6;
  text-align: center;
}

/* ===== SEED NAV ===== */
.seed-nav {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  width: 32px;
  height: 32px;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.seed-nav:hover,
.seed-nav.open {
  width: 200px;
  height: auto;
  bottom: 24px;
  right: 24px;
}

.seed-icon {
  width: 32px;
  height: 32px;
  background: #2d2d2d;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: absolute;
  bottom: 0;
  right: 0;
  transition: opacity 0.3s;
}

.seed-nav:hover .seed-icon,
.seed-nav.open .seed-icon {
  opacity: 0;
}

.seed-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: rgba(26, 18, 16, 0.9);
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.seed-nav:hover .seed-menu,
.seed-nav.open .seed-menu {
  opacity: 1;
  pointer-events: auto;
}

.seed-link {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: #FFF8F0;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.seed-link:hover {
  color: #FF3399;
}

/* Grid overlay on canvas hover */
.section-canvas:hover + .grid-overlay,
.act:hover > .grid-overlay {
  opacity: 1;
}

/* Responsive */
@media (max-width: 600px) {
  .algo-annotations {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}
