/* jeongchi.boo - Fairycore Political Forest */
/* Colors: #d4956a #1a0e2e #c7613a #e8a832 #e8ddd0 #2d1810 #3a2218 #6b4a7d */
/* Fonts: Cinzel Decorative (display), Inter (body) */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #e8ddd0;
  background: #1a0e2e;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========== Particle Canvas ========== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ========== Fairy Trail Sidebar ========== */
.fairy-trail {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(26, 14, 46, 0.95) 0%, rgba(45, 24, 16, 0.92) 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  overflow: hidden;
}

.trail-vines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.4;
  z-index: -1;
}

.vine-svg {
  width: 100%;
  height: 100%;
}

.trail-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(199, 97, 58, 0.3);
}

.trail-sigil {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
}

.mushroom-sigil {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 8px rgba(232, 168, 50, 0.4));
}

.trail-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #c7613a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.trail-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: #d4956a;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.trail-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.trail-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  color: #e8ddd0;
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  border-radius: 8px;
  transition: all 0.4s ease;
  position: relative;
}

.trail-link:hover {
  background: rgba(199, 97, 58, 0.15);
  color: #e8a832;
}

.trail-link.active {
  background: rgba(199, 97, 58, 0.2);
  color: #e8a832;
}

.vine-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a2218;
  border: 1px solid #c7613a;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.trail-link:hover .vine-dot,
.trail-link.active .vine-dot {
  background: #e8a832;
  border-color: #e8a832;
  box-shadow: 0 0 8px rgba(232, 168, 50, 0.6);
}

.link-text {
  white-space: nowrap;
}

/* ========== Main Content ========== */
.forest-scroll {
  margin-left: 240px;
  position: relative;
  z-index: 1;
}

/* ========== Clearings ========== */
.clearing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}

.clearing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(26, 14, 46, 0.3) 0%, rgba(26, 14, 46, 0.8) 70%);
  z-index: 0;
}

.clearing-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.clearing-decoration {
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

.clearing.visible .clearing-decoration {
  opacity: 1;
  transform: translateY(0);
}

.mushroom-cluster {
  width: 200px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.canopy-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.fern-svg {
  width: 300px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.bloom-svg {
  width: 160px;
  height: 160px;
  margin: 0 auto;
  display: block;
  animation: bloom-rotate 30s linear infinite;
}

@keyframes bloom-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.clearing-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  color: #c7613a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease 0.2s;
}

.clearing.visible .clearing-title {
  opacity: 1;
  transform: translateY(0);
}

.clearing-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: #d4956a;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.4s;
}

.clearing.visible .clearing-subtitle {
  opacity: 1;
  transform: translateY(0);
}

.clearing-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.8;
  color: #e8ddd0;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.5s;
}

.clearing.visible .clearing-text {
  opacity: 1;
  transform: translateY(0);
}

.clearing-text--centered {
  text-align: center;
}

/* ========== Scroll Indicator ========== */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fade-in-up 1s ease 1.5s forwards;
}

.scroll-text {
  font-size: 0.75rem;
  font-weight: 300;
  color: #e8a832;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-arrow {
  animation: bounce-down 2s ease infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Clearing Variants ========== */
.clearing--dark {
  background: linear-gradient(180deg, #1a0e2e 0%, #2d1810 50%, #1a0e2e 100%);
}

.clearing--dark .clearing-title {
  color: #e8a832;
}

.clearing--warm {
  background: linear-gradient(180deg, #2d1810 0%, #3a2218 50%, #2d1810 100%);
}

.clearing--deep {
  background: linear-gradient(180deg, #1a0e2e 0%, #0d0718 50%, #1a0e2e 100%);
}

.clearing--deep .clearing-title {
  color: #d4956a;
}

.clearing--bloom {
  background: linear-gradient(180deg, #2d1810 0%, #3a2218 30%, #1a0e2e 100%);
}

.clearing--bloom .clearing-title {
  color: #e8a832;
}

/* ========== Columns Layout ========== */
.clearing-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  text-align: left;
  margin-top: 2rem;
}

.column-heading {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #d4956a;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.6s;
}

.clearing.visible .column-heading {
  opacity: 1;
  transform: translateY(0);
}

.clearing-column .clearing-text {
  text-align: left;
  font-size: 0.95rem;
}

/* ========== Undergrowth Cards ========== */
.undergrowth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.undergrowth-card {
  background: rgba(26, 14, 46, 0.5);
  border: 1px solid rgba(199, 97, 58, 0.2);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.5s ease;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.clearing.visible .undergrowth-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.clearing.visible .undergrowth-card:nth-child(1) { transition-delay: 0.3s; }
.clearing.visible .undergrowth-card:nth-child(2) { transition-delay: 0.5s; }
.clearing.visible .undergrowth-card:nth-child(3) { transition-delay: 0.7s; }

.undergrowth-card:hover {
  border-color: rgba(232, 168, 50, 0.4);
  background: rgba(26, 14, 46, 0.7);
  transform: translateY(-4px) scale(1);
  box-shadow: 0 8px 32px rgba(232, 168, 50, 0.1);
}

.card-icon {
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #c7613a;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.7;
  color: #e8ddd0;
  opacity: 0.85;
}

/* ========== Mycelium Network ========== */
.mycelium-network {
  width: 100%;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0;
  transform: scale(0.9);
  transition: all 1.2s ease;
}

.clearing.visible .mycelium-network {
  opacity: 1;
  transform: scale(1);
}

.mycelium-svg {
  width: 100%;
  height: auto;
}

.network-node {
  transition: all 0.5s ease;
}

.network-node:hover {
  filter: drop-shadow(0 0 12px rgba(232, 168, 50, 0.6));
}

.network-line {
  transition: opacity 0.5s ease;
}

@keyframes pulse-node {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* ========== Firefly SVG Animation ========== */
.firefly-svg {
  animation: firefly-pulse 3s ease-in-out infinite;
}

.firefly-svg:nth-child(2) { animation-delay: 0.8s; }
.firefly-svg:nth-child(3) { animation-delay: 1.6s; }

@keyframes firefly-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ========== Bloom CTA ========== */
.bloom-cta {
  margin-top: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.8s;
}

.clearing.visible .bloom-cta {
  opacity: 1;
  transform: translateY(0);
}

.cta-button {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1a0e2e;
  background: linear-gradient(135deg, #e8a832, #c7613a);
  padding: 0.85rem 2.25rem;
  border-radius: 40px;
  transition: all 0.4s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 168, 50, 0.4);
  background: linear-gradient(135deg, #c7613a, #e8a832);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .undergrowth-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .clearing-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .fairy-trail {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1.5rem 1rem;
  }
  .trail-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }
  .trail-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }
  .trail-vines {
    display: none;
  }
  .forest-scroll {
    margin-left: 0;
  }
  .clearing {
    padding: 3rem 1.5rem;
  }
  .clearing-title {
    font-size: clamp(28px, 8vw, 48px);
  }
}
