/* ============================================================
   PRODUCTEX — ANIMATIONS
   ============================================================ */

/* ─── HERO FADE UP ─────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-dark,
.hero-banner {
  animation: fadeUp 1s cubic-bezier(0.12, 0.23, 0.17, 0.99) 0.2s both;
}

/* ─── SCROLL HINT FADE + BOUNCE ─────────────────────────────── */
@keyframes scrollFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

.scroll-hint {
  animation:
    scrollFadeIn 0.6s ease 0.8s both,
    scrollBounce 2.5s ease 1.5s infinite;
}

/* ─── SCROLL REVEAL (driven by JS IntersectionObserver) ───── */
/*
   Elements start invisible and slide up.
   JS adds .visible when they enter the viewport.
   Stagger delays can be added via inline style="transition-delay: Xs"
*/

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s cubic-bezier(0.12, 0.23, 0.17, 0.99),
    transform 0.8s cubic-bezier(0.12, 0.23, 0.17, 0.99);
}

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

/* Stagger helper classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ─── CARD HOVER LIFT ─────────────────────────────── */
.about-card,
.benefit-card,
.testimonial-card,
.pricing-card,
.blog-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s;
}

.about-card:hover,
.benefit-card:hover,
.testimonial-card:hover,
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--wa-0p14);
}

/* ─── BUTTON PRESS ─────────────────────────────── */
.btn-primary:active,
.btn-plan:active,
.btn-nav:active {
  transform: scale(0.97);
}

/* ─── FAQ ANSWER TRANSITION ─────────────────────────────── */
.faq-answer {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── TAB UNDERLINE SLIDE ─────────────────────────────── */
.tab-btn {
  transition: color 0.2s, border-color 0.2s;
}

/* ─── TOGGLE THUMB SLIDE ─────────────────────────────── */
.toggle-thumb {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── NAV SCROLL BLUR ─────────────────────────────── */
nav {
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

/* ─── SOCIAL BUTTON SCALE ─────────────────────────────── */
.social-btn {
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.social-btn:hover {
  transform: scale(1.1);
}

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

  .hero-dark,
  .hero-banner {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .scroll-hint {
    animation: none;
    opacity: 0.45;
    transform: translateX(-50%);
  }

  .hero-carousel-track,
  .trusted-track {
    animation: none !important;
    transform: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
