/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

@keyframes hero-ken-burns {
  from { transform: scale(1.08); }
  to { transform: scale(1.14); }
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(37, 211, 102, 0); }
}

@keyframes funnel-glow {
  0%, 100% { color: #fff; text-shadow: none; }
  50% { color: var(--brand-gold-light, #e0ca96); text-shadow: 0 0 12px rgba(195, 166, 105, 0.5); }
}

@keyframes arrow-flow {
  0%, 100% { opacity: 0.35; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

/* ===== PAGE LOAD ===== */
body.page-loading {
  opacity: 0;
}

body.page-loaded {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* ===== HERO ENTRANCE ===== */
.hero-animate {
  opacity: 0;
  animation: fadeInUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-animate--d1 { animation-delay: 0.1s; }
.hero-animate--d2 { animation-delay: 0.22s; }
.hero-animate--d3 { animation-delay: 0.34s; }
.hero-animate--d4 { animation-delay: 0.46s; }
.hero-animate--d5 { animation-delay: 0.58s; }
.hero-animate--d6 { animation-delay: 0.7s; }

.channel-pill {
  opacity: 0;
  animation: fadeInUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.channel-pill:nth-child(1) { animation-delay: 0.38s; }
.channel-pill:nth-child(2) { animation-delay: 0.46s; }
.channel-pill:nth-child(3) { animation-delay: 0.54s; }
.channel-pill:nth-child(4) { animation-delay: 0.62s; }
.channel-pill:nth-child(5) { animation-delay: 0.7s; }

.hero-bg::before {
  animation: hero-ken-burns 18s ease-in-out infinite alternate;
}

.header-glow {
  animation: pulse-glow 8s ease-in-out infinite;
}

.text-gold-gradient {
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}

/* ===== FUNNEL ===== */
.funnel-arrow {
  animation: arrow-flow 2s ease-in-out infinite;
}

.funnel-arrow:nth-child(2) { animation-delay: 0.3s; }
.funnel-arrow:nth-child(4) { animation-delay: 0.6s; }
.funnel-arrow:nth-child(6) { animation-delay: 0.9s; }

.funnel-step {
  transition: color 0.4s ease, text-shadow 0.4s ease, transform 0.4s ease;
}

.funnel-step.is-active {
  animation: funnel-glow 1.8s ease-in-out;
  transform: scale(1.05);
}

/* ===== SCROLL REVEAL ===== */
/* Visible by default; hidden only once JS is ready */
.js-animations-ready .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-animations-ready .reveal--fade:not(.is-visible) {
  transform: none;
}

.js-animations-ready .reveal--left:not(.is-visible) {
  transform: translateX(-32px);
}

.js-animations-ready .reveal--right:not(.is-visible) {
  transform: translateX(32px);
}

.js-animations-ready .reveal--scale:not(.is-visible) {
  transform: scale(0.95);
}

.reveal.is-visible,
.reveal--left.is-visible,
.reveal--right.is-visible,
.reveal--scale.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--fade.is-visible {
  transform: none;
}

.reveal--left.is-visible {
  transform: translateX(0);
}

.reveal--right.is-visible {
  transform: translateX(0);
}

.reveal--scale.is-visible {
  transform: scale(1);
}

.js-animations-ready [data-stagger]:not(.is-visible) > .reveal-child {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-stagger].is-visible > .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

/* ===== CARD HOVER ENHANCEMENTS ===== */
.animate-card {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.animate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* ===== NAV ACTIVE STATE ===== */
.nav__link--active {
  color: var(--brand-gold-light, #e0ca96) !important;
}

/* ===== FLOATING CTA ===== */
.floating-cta__btn--wa {
  animation: wa-pulse 3s ease-in-out infinite;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js-animations-ready .reveal:not(.is-visible),
  .js-animations-ready .reveal--left:not(.is-visible),
  .js-animations-ready .reveal--right:not(.is-visible),
  .js-animations-ready .reveal--scale:not(.is-visible),
  .js-animations-ready [data-stagger]:not(.is-visible) > .reveal-child,
  .hero-animate,
  .channel-pill {
    opacity: 1;
    transform: none;
    animation: none;
  }

  body.page-loading {
    opacity: 1;
  }

  .hero-bg::before {
    animation: none;
  }
}
