/* ============================================================
   The Glow Network — Scroll Animations
   css/animations.css
   ============================================================ */

/* ── Base hidden state ── */
[data-animate] {
  will-change: opacity, transform;
  opacity: 0;
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              clip-path 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Visible state — toggled by IntersectionObserver */
[data-animate].is-visible {
  opacity: 1;
  transform: none !important;
  clip-path: none !important;
}

/* ── Animation types ── */
[data-animate="fade-up"]    { transform: translateY(40px); }
[data-animate="fade-down"]  { transform: translateY(-28px); }
[data-animate="fade-left"]  { transform: translateX(48px); }
[data-animate="fade-right"] { transform: translateX(-48px); }
[data-animate="fade-in"]    { /* opacity only */ }

[data-animate="scale-up"] {
  transform: scale(0.9);
}

[data-animate="reveal-up"] {
  transform: translateY(32px);
  clip-path: inset(0 0 100% 0);
}

[data-animate="reveal-up"].is-visible {
  clip-path: inset(0 0 0% 0);
}

/* ── Delay utilities ── */
[data-delay="50"]  { transition-delay: 0.05s; }
[data-delay="100"] { transition-delay: 0.10s; }
[data-delay="150"] { transition-delay: 0.15s; }
[data-delay="200"] { transition-delay: 0.20s; }
[data-delay="250"] { transition-delay: 0.25s; }
[data-delay="300"] { transition-delay: 0.30s; }
[data-delay="350"] { transition-delay: 0.35s; }
[data-delay="400"] { transition-delay: 0.40s; }
[data-delay="500"] { transition-delay: 0.50s; }
[data-delay="600"] { transition-delay: 0.60s; }

/* ── Hero — immediate staggered entrance (not scroll) ── */
.hero-content > * {
  opacity: 0;
  transform: translateY(32px);
  animation: glowHeroUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.20s; }
.hero-content > *:nth-child(3) { animation-delay: 0.34s; }
.hero-content > *:nth-child(4) { animation-delay: 0.46s; }
.hero-content > *:nth-child(5) { animation-delay: 0.58s; }
.hero-content > *:nth-child(6) { animation-delay: 0.68s; }

@keyframes glowHeroUp {
  to { opacity: 1; transform: translateY(0); }
}

/* Nav entrance */
.navbar {
  animation: navDrop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Event card image reveal ── */
.event-card .event-image {
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.event-card[data-animate]:not(.is-visible) .event-image {
  transform: scale(1.08) translateY(12px);
}

/* ── Section divider line animation ── */
.section-header .section-subtitle {
  position: relative;
}

.section-header .section-subtitle::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold, var(--accent-gold, #C9A84C));
  margin: 6px auto 0;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.section-header[data-animate].is-visible .section-subtitle::after {
  width: 48px;
}

/* ── Tier card hover polish ── */
.tier-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}

.tier-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(201, 168, 76, 0.14);
}

.tier-card.featured:hover {
  box-shadow: 0 24px 56px rgba(45, 31, 94, 0.22);
}

/* ── Feature card hover polish ── */
.feature-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(201, 168, 76, 0.11);
}

/* ── Respect reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  [data-animate],
  .hero-content > *,
  .navbar,
  .event-card .event-image,
  .tier-card,
  .feature-card {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    animation: none !important;
    transition: none !important;
  }

  .section-header .section-subtitle::after {
    width: 48px;
    transition: none;
  }
}
