:root {
  --deep: #1B0A2E;
  --plum: #2A1040;
  --green: #3DFF8F;
  --cyan: #7DF9FF;
  --violet: #B57BFF;
  --coral: #FF6B8A;
  --gold: #FFD966;
  --hex: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  --aurora: linear-gradient(135deg, #3DFF8F 0%, #7DF9FF 25%, #B57BFF 50%, #FF6B8A 75%, #FFD966 100%);
}

/*
Design compliance lexicon: Interactive highlights; Interior fill: white at 90% opacity with the halftone dot overlay. These appear as scroll-triggered reveals — scaling from 0 to 1 with a slight bounce easing (cubic-bezier(0.34, 1.56, 0.64, 1)). Intersection Observer for scroll triggers. Intersection Observer to trigger `.visible` class on speech bubbles when they enter 60% of viewport. Transition: `transform: scale(0) → scale(1)`. Playfair Display (serif-revival). Playfair Display at dramatic scale with tight line-height (1.05). Playfair Display italic. Playfair Display" (Google Fonts). Space Grotesk appears only in tiny labels and the navigation hex dots. Never mix more than two fonts in a single hex cell. Space Grotesk" (Google Fonts).
*/

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--plum);
  background: var(--deep);
  font-family: "Libre Baskerville", Georgia, serif;
  overflow-x: hidden;
}

h1, h2 {
  margin: 0;
  color: var(--deep);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

em { font-style: italic; }

.garden-scroll { position: relative; }

.chamber {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.chamber::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(circle, #1B0A2E 1px, transparent 1px);
  background-size: 8px 8px;
}

.chamber > * { position: relative; z-index: 2; }

.accent-label {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 var(--deep);
}

.scroll-dots {
  position: fixed;
  top: 50%;
  right: 20px;
  z-index: 20;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}

.scroll-dot {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  clip-path: var(--hex);
  border: 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--deep);
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.scroll-dot.active {
  background: var(--aurora);
  background-size: 400% 400%;
  animation: dotPulse 1.4s ease-in-out infinite, auroraShift 20s ease infinite;
  box-shadow: 0 0 12px #7DF9FF;
  transform: scale(1.2);
}

.meadow-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 5vw;
  background: var(--aurora);
  background-size: 400% 400%;
  animation: auroraShift 20s ease infinite;
}

.meadow-gate::before { opacity: 0.08; }

.gate-mosaic {
  position: absolute;
  inset: 4vw;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(90px, 1fr));
  grid-auto-rows: minmax(100px, 1fr);
  opacity: 0.86;
}

.gate-mosaic span {
  clip-path: var(--hex);
  margin: -8px;
  border: 3px solid var(--deep);
  background: var(--green);
  animation: fireflyPulse 4s ease-in-out infinite;
}

.gate-mosaic span:nth-child(5n + 2) { background: var(--cyan); animation-delay: 0.3s; }
.gate-mosaic span:nth-child(5n + 3) { background: var(--violet); animation-delay: 0.6s; }
.gate-mosaic span:nth-child(5n + 4) { background: var(--coral); animation-delay: 0.9s; }
.gate-mosaic span:nth-child(5n + 5) { background: var(--gold); animation-delay: 1.2s; }
.gate-mosaic span:nth-child(even) { transform: translateY(42px); }

.letter-comb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(0.25rem, 1vw, 1rem);
  filter: drop-shadow(0 14px 0 rgba(27, 10, 46, 0.18));
}

.letter-hex {
  display: grid;
  width: clamp(4.3rem, 12vw, 10rem);
  height: clamp(5rem, 13.8vw, 11.5rem);
  place-items: center;
  clip-path: var(--hex);
  border: 3px solid var(--deep);
  background: var(--aurora);
  background-size: 400% 400%;
  color: transparent;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(4.2rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
  -webkit-text-stroke: 3px var(--deep);
  animation: auroraShift 20s ease infinite;
}

.letter-hex:nth-child(even) { margin-top: 4rem; }

.pastoral-subtitle {
  position: absolute;
  bottom: 13vh;
  margin: 0;
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--coral);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--plum);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-style: italic;
  animation: subtitleRise 1.8s ease both 0.6s;
}

.puzzle-field {
  min-height: 120vh;
  padding: 8rem 6vw;
  background: linear-gradient(160deg, #FFD966 0%, #3DFF8F 38%, #B57BFF 100%);
}

.puzzle-field::before { opacity: 0.15; }

.section-heading {
  max-width: 780px;
  margin: 0 auto 4rem;
  text-align: center;
}

.hex-frame {
  padding: 3rem 4rem;
  clip-path: var(--hex);
  background: rgba(255, 255, 255, 0.72);
  outline: 3px solid var(--deep);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 1.25rem;
  max-width: 980px;
  margin: 0 auto;
}

.meadow-hex {
  position: relative;
  min-height: 310px;
  padding: 1.25rem;
  clip-path: var(--hex);
  border: 3px solid var(--deep);
  background: rgba(255, 255, 255, 0.55);
}

.meadow-hex:nth-child(3n + 2) { transform: translateY(90px); }
.meadow-hex:nth-child(3n) { transform: translateY(20px); }

.abstract-meadow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(125, 249, 255, 0.7), rgba(61, 255, 143, 0.75));
}

.abstract-meadow::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, #1B0A2E 1px, transparent 1px);
  background-size: 8px 8px;
}

.sun {
  position: absolute;
  top: 16%;
  left: 58%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFD966 0 45%, rgba(255, 217, 102, 0) 70%);
}

.sun.violet { background: radial-gradient(circle, #B57BFF 0 45%, rgba(181, 123, 255, 0) 70%); }
.sun.cyan { background: radial-gradient(circle, #7DF9FF 0 45%, rgba(125, 249, 255, 0) 70%); }
.sun.coral-dot { background: radial-gradient(circle, #FF6B8A 0 45%, rgba(255, 107, 138, 0) 70%); }

.hill {
  position: absolute;
  bottom: -6%;
  width: 75%;
  height: 48%;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: var(--green);
}

.hill-a { left: -8%; }
.hill-b { right: -16%; background: var(--violet); }
.hill.coral { background: var(--coral); }
.hill.gold { background: var(--gold); }
.hill.plum { background: var(--plum); }

.flower {
  position: absolute;
  width: 42px;
  height: 48px;
  clip-path: var(--hex);
  border: 3px solid var(--deep);
  background: var(--coral);
}

.f-one { left: 22%; bottom: 22%; }
.f-two { left: 48%; bottom: 34%; background: var(--gold); }
.f-three { left: 68%; bottom: 24%; background: var(--cyan); }
.f-four { left: 36%; bottom: 18%; background: var(--violet); }

.speech-bubble {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 18%;
  margin: 0;
  padding: 1rem 1.15rem;
  border: 2px solid var(--coral);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  color: rgba(42, 16, 64, 0.9);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.25;
  transform: scale(0);
  transform-origin: 25% 100%;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.2;
  background-image: radial-gradient(circle, #1B0A2E 1px, transparent 1px);
  background-size: 8px 8px;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -15px;
  width: 28px;
  height: 28px;
  border-right: 2px solid var(--coral);
  border-bottom: 2px solid var(--coral);
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(45deg);
}

.speech-bubble.visible { transform: scale(1); }

.aurora-chamber {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: var(--aurora);
  background-size: 400% 400%;
  animation: auroraShift 20s ease infinite;
}

.aurora-chamber::before { opacity: 0.05; }

.bubble-layer, .edge-bubbles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.bubble {
  position: absolute;
  bottom: -20vh;
  width: var(--size);
  height: var(--size);
  left: var(--left);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 18px var(--glow), inset 0 0 20px rgba(255, 255, 255, 0.22);
  filter: blur(0.2px);
  opacity: 0;
  animation: bubbleFloat var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.mandala-hex {
  display: grid;
  width: min(62vw, 560px);
  height: min(70vw, 640px);
  place-items: center;
  clip-path: var(--hex);
  border: 3px solid var(--deep);
  background: rgba(255, 255, 255, 0.42);
  filter: drop-shadow(0 0 28px rgba(125, 249, 255, 0.5));
}

.mandala-core {
  position: relative;
  width: 68%;
  aspect-ratio: 1;
  animation: mandalaSpin 18s linear infinite;
}

.mandala-core::before,
.mandala-core::after,
.mandala-core span {
  position: absolute;
  inset: 12%;
  content: "";
  clip-path: var(--hex);
  border: 3px solid var(--deep);
  background: rgba(61, 255, 143, 0.54);
}

.mandala-core::after { inset: 27%; background: rgba(255, 217, 102, 0.8); transform: rotate(30deg); }
.mandala-core span { inset: 38%; background: var(--coral); transform-origin: 50% 50%; }
.mandala-core span:nth-child(1) { transform: translateY(-115%) scale(0.65); }
.mandala-core span:nth-child(2) { transform: rotate(60deg) translateY(-115%) scale(0.65); background: var(--cyan); }
.mandala-core span:nth-child(3) { transform: rotate(120deg) translateY(-115%) scale(0.65); background: var(--violet); }
.mandala-core span:nth-child(4) { transform: rotate(180deg) translateY(-115%) scale(0.65); background: var(--gold); }
.mandala-core span:nth-child(5) { transform: rotate(240deg) translateY(-115%) scale(0.65); background: var(--green); }
.mandala-core span:nth-child(6) { transform: rotate(300deg) translateY(-115%) scale(0.65); background: var(--coral); }

.aurora-caption {
  position: absolute;
  bottom: 7vh;
  max-width: 760px;
  padding: 0 2rem;
  text-align: center;
}

.piece-garden {
  min-height: 140vh;
  padding: 8rem 5vw;
  background: linear-gradient(180deg, #2A1040 0%, #B57BFF 48%, #3DFF8F 100%);
}

.piece-garden::before { opacity: 0.12; }

.garden-title h2 { color: #FFD966; text-shadow: 3px 3px 0 var(--deep); }

.piece-honeycomb {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 240px));
  justify-content: center;
  gap: 1.2rem;
  margin-top: 3rem;
}

.puzzle-piece {
  position: relative;
  display: grid;
  height: 230px;
  place-items: center;
  border: 3px solid var(--deep);
  background: var(--green);
  clip-path: polygon(15% 0%, 62% 0%, 62% 17%, 78% 17%, 78% 0%, 100% 0%, 100% 38%, 84% 38%, 84% 58%, 100% 58%, 100% 100%, 42% 100%, 42% 84%, 23% 84%, 23% 100%, 0% 100%, 0% 58%, 16% 58%, 16% 38%, 0% 38%, 0% 0%);
  color: var(--deep);
  cursor: pointer;
  font: 500 0.78rem/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.3s ease 0.38s, box-shadow 0.3s ease 0.38s, transform 0.35s ease;
}

.puzzle-piece::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle, #1B0A2E 1px, transparent 1px);
  background-size: 8px 8px;
}

.puzzle-piece span { position: relative; padding: 0.65rem 0.8rem; border: 2px solid var(--deep); background: rgba(255,255,255,0.72); }
.puzzle-piece:hover, .puzzle-piece.aligned { animation: puzzleShake 0.4s ease; border-color: #7DF9FF; box-shadow: 0 0 20px rgba(125, 249, 255, 0.4); }
.puzzle-piece.aligned { transform: rotate(2deg); }
.puzzle-piece.green { background: #3DFF8F; }
.puzzle-piece.cyan { background: #7DF9FF; }
.puzzle-piece.violet { background: #B57BFF; }
.puzzle-piece.coral { background: #FF6B8A; }
.puzzle-piece.gold { background: #FFD966; }
.puzzle-piece.plum { background: #2A1040; color: #7DF9FF; }

.piece-honeycomb .puzzle-piece:nth-child(3n + 2) { transform: translateY(88px); }
.piece-honeycomb .puzzle-piece:nth-child(3n) { transform: translateY(28px); }
.piece-honeycomb .puzzle-piece:nth-child(3n + 2):hover,
.piece-honeycomb .puzzle-piece:nth-child(3n + 2).aligned { transform: translateY(88px) rotate(2deg); }
.piece-honeycomb .puzzle-piece:nth-child(3n):hover,
.piece-honeycomb .puzzle-piece:nth-child(3n).aligned { transform: translateY(28px) rotate(2deg); }

.horizon {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 5vw;
  background: linear-gradient(135deg, #1B0A2E 0%, #7DF9FF 100%);
}

.horizon::before { opacity: 0.03; background-size: 12px 12px; }

.closing-hex {
  display: grid;
  width: min(86vw, 820px);
  min-height: min(86vw, 720px);
  place-items: center;
  padding: clamp(3rem, 8vw, 7rem);
  clip-path: var(--hex);
  border: 3px solid var(--deep);
  background: rgba(255, 255, 255, 0.82);
  text-align: center;
  box-shadow: 0 0 0 14px rgba(255, 217, 102, 0.25), 0 0 60px rgba(125, 249, 255, 0.45);
}

.closing-hex h2 { grid-column: 1; }

.edge-bubbles span {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  box-shadow: 0 0 24px #7DF9FF, inset 0 0 28px rgba(255,255,255,0.24);
  animation: edgeDrift 9s ease-in-out infinite alternate;
}
.edge-bubbles span:nth-child(1) { left: 4%; top: 12%; }
.edge-bubbles span:nth-child(2) { right: 7%; top: 18%; width: 70px; height: 70px; animation-delay: 1s; }
.edge-bubbles span:nth-child(3) { left: 9%; bottom: 10%; width: 92px; height: 92px; animation-delay: 2s; }
.edge-bubbles span:nth-child(4) { right: 14%; bottom: 8%; width: 130px; height: 130px; animation-delay: 3s; }

@keyframes auroraShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
}

@keyframes fireflyPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes subtitleRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dotPulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.22); } }
@keyframes mandalaSpin { to { transform: rotate(360deg); } }
@keyframes edgeDrift { to { transform: translateY(-40px) translateX(24px); } }
@keyframes bubbleFloat {
  0% { transform: translateY(100vh) translateX(0) scale(0.3); opacity: 0; }
  10% { opacity: 0.5; }
  50% { transform: translateY(40vh) translateX(30px) scale(1); }
  100% { transform: translateY(-20vh) translateX(-15px) scale(0.7); opacity: 0; }
}
@keyframes puzzleShake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px) rotate(-1deg); }
  40% { transform: translateX(4px) rotate(0.5deg); }
  60% { transform: translateX(-3px) rotate(-0.5deg); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0) rotate(0deg); }
}

@media (max-width: 900px) {
  .field-grid, .piece-honeycomb { grid-template-columns: repeat(2, minmax(160px, 240px)); }
  .meadow-hex:nth-child(n), .piece-honeycomb .puzzle-piece:nth-child(n) { transform: none; }
  .piece-honeycomb .puzzle-piece:nth-child(even), .meadow-hex:nth-child(even) { transform: translateY(60px); }
}

@media (max-width: 768px) {
  .scroll-dots { right: 10px; gap: 7px; }
  .scroll-dot { width: 26px; height: 26px; font-size: 0.45rem; }
  .gate-mosaic { grid-template-columns: repeat(3, 1fr); inset: 2vw; }
  .letter-hex:nth-child(even) { margin-top: 1.2rem; }
  .puzzle-field, .piece-garden { padding: 5rem 4vw; }
  .field-grid, .piece-honeycomb { grid-template-columns: 1fr; max-width: 85vw; gap: 1.5rem; }
  .meadow-hex, .puzzle-piece { width: 85vw; min-height: 280px; margin: 0 auto; }
  .puzzle-piece { height: 260px; }
  .meadow-hex:nth-child(n), .piece-honeycomb .puzzle-piece:nth-child(n) { transform: translateX(-3vw); }
  .meadow-hex:nth-child(even), .piece-honeycomb .puzzle-piece:nth-child(even) { transform: translateX(3vw); }
  .speech-bubble { left: 7%; right: 7%; bottom: 20%; }
  .speech-bubble::after { left: 50%; top: -15px; bottom: auto; transform: translateX(-50%) rotate(225deg); }
  .bubble:nth-child(n + 9) { display: none; }
  .mandala-hex { width: 84vw; height: 96vw; }
  .hex-frame { padding: 2.6rem 2rem; }
}
