/* Progressive disclosure animations */

/* Base state: hidden, shifted down */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Staggered children: each child delays slightly */
.reveal-stagger > .reveal {
  transition-delay: 0s;
}

.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.25s; }

/* Pain statements: stagger reveal as they scroll in */
.pain-stack > .pain-statement.reveal:nth-child(1) { transition-delay: 0s; }
.pain-stack > .pain-statement.reveal:nth-child(2) { transition-delay: 0.15s; }
.pain-stack > .pain-statement.reveal:nth-child(3) { transition-delay: 0.3s; }

/* Slide from left (for feature text) */
.reveal--left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Slide from right (for feature images) */
.reveal--right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Hero specific: fade up faster, no delay */
.hero__left .reveal {
  transition-duration: 0.5s;
}

.hero__left .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero__left .reveal:nth-child(2) { transition-delay: 0.25s; }
.hero__left .reveal:nth-child(3) { transition-delay: 0.4s; }

/* Stats bar: count-up feel with stagger */
.stats-bar .reveal:nth-child(1) { transition-delay: 0s; }
.stats-bar .reveal:nth-child(2) { transition-delay: 0.1s; }
.stats-bar .reveal:nth-child(3) { transition-delay: 0.2s; }
.stats-bar .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Feature image: subtle scale on reveal */
.feature-row__image-wrap {
  position: relative;
}

.feature-row__image-wrap .feature-row__image {
  position: relative;
  z-index: 1;
  transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

/* Gradient glow behind images */
.glow {
  position: relative;
}

.glow::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: var(--radius-xl);
  background: radial-gradient(
    ellipse at center,
    rgba(240, 165, 0, 0.12) 0%,
    rgba(240, 165, 0, 0.04) 50%,
    transparent 80%
  );
  z-index: 0;
  filter: blur(24px);
  transition: opacity 0.8s ease-out;
  opacity: 0;
}

.glow.is-visible::before {
  opacity: 1;
}

/* Hero image glow: slightly warmer and larger */
.hero__right.glow::before {
  inset: -24px;
  background: radial-gradient(
    ellipse at 60% 40%,
    rgba(240, 165, 0, 0.15) 0%,
    rgba(185, 149, 120, 0.08) 40%,
    transparent 75%
  );
  filter: blur(32px);
}

/* Feature image glow variants */
.glow--warm::before {
  background: radial-gradient(
    ellipse at center,
    rgba(240, 165, 0, 0.1) 0%,
    rgba(247, 240, 230, 0.3) 50%,
    transparent 80%
  );
}

.glow--cool::before {
  background: radial-gradient(
    ellipse at center,
    rgba(74, 124, 63, 0.08) 0%,
    rgba(247, 240, 230, 0.2) 50%,
    transparent 80%
  );
}

/* Shimmer button animations */
@keyframes text-shimmer {
  0%, 10% { background-position: 0% center; }
  70%, 100% { background-position: 100% center; }
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(232, 162, 48, 0.2); }
  50% { box-shadow: 0 5px 28px rgba(232, 162, 48, 0.35), 0 0 40px rgba(232, 162, 48, 0.08); }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--left,
  .reveal--right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .glow::before {
    opacity: 1;
    transition: none;
  }

  .btn--shimmer {
    animation: none;
  }

  .btn--shimmer span {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--brand-espresso);
  }
}
