/* ==========================================================================
   Associação Natureza do Amor (ANA) — Animations & Motion Choreography
   Física de Molas (Springs), Scroll-Reveal & Suporte a Acessibilidade
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Scroll Reveal com Física Suave
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal="left"] {
  transform: translateX(-60px);
}

[data-reveal="right"] {
  transform: translateX(60px);
}

[data-reveal="scale"] {
  transform: scale(0.94);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Efeito Cascata (Stagger) para grelhas */
.stagger-group [data-reveal]:nth-child(1) { transition-delay: 0.05s; }
.stagger-group [data-reveal]:nth-child(2) { transition-delay: 0.15s; }
.stagger-group [data-reveal]:nth-child(3) { transition-delay: 0.25s; }
.stagger-group [data-reveal]:nth-child(4) { transition-delay: 0.35s; }
.stagger-group [data-reveal]:nth-child(5) { transition-delay: 0.45s; }
.stagger-group [data-reveal]:nth-child(6) { transition-delay: 0.55s; }

/* --------------------------------------------------------------------------
   2. Animação de Entrada do Hero (Spring Entrance)
   -------------------------------------------------------------------------- */

.hero-animate-text {
  animation: heroTextSpring 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-animate-sub {
  animation: heroTextSpring 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero-animate-actions {
  animation: heroTextSpring 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

@keyframes heroTextSpring {
  0% {
    opacity: 0;
    transform: translateY(80px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   3. Efeito Tagline Reveal (Palavras que Acendem no Scroll)
   -------------------------------------------------------------------------- */

.tagline-reveal-section {
  padding: 100px 0;
  background-color: var(--color-surface);
  text-align: center;
}

.tagline-reveal-text {
  font-family: 'Onest', sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.028em;
  max-width: 960px;
  margin: 0 auto;
  color: rgba(27, 42, 74, 0.25);
  transition: color 0.4s ease;
}

.tagline-word {
  display: inline-block;
  color: rgba(27, 42, 74, 0.22);
  transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s ease;
  margin: 0 4px;
}

.tagline-word.is-active {
  color: var(--color-ink);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   4. Destaque Visual do Cartão de IBAN ao Doar
   -------------------------------------------------------------------------- */

@keyframes highlight-bank-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0.8), 0 20px 50px rgba(0, 0, 0, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(46, 125, 50, 0.2), 0 24px 60px rgba(46, 125, 50, 0.3);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 125, 50, 0), 0 20px 50px rgba(0, 0, 0, 0.25);
    transform: scale(1);
  }
}

.bank-details-card.highlight-focus {
  animation: highlight-bank-pulse 1.4s ease-out 2;
}

/* --------------------------------------------------------------------------
   5. Contadores Numéricos
   -------------------------------------------------------------------------- */

.stat-counter-val {
  font-family: 'Onest', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--color-primary);
  line-height: 1;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   6. Respeito a Prefers-Reduced-Motion (Acessibilidade Estrita)
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  [data-reveal="left"],
  [data-reveal="right"],
  [data-reveal="scale"] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .floating-donate-btn {
    animation: none !important;
  }

  .tagline-word {
    color: var(--color-ink) !important;
    transform: none !important;
  }
}
