/* ============================================================
   animations.css — Smootix Landing
   Scroll-reveal, keyframes, hover transitions
   ============================================================ */

/* ─── Scroll-reveal base ─────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Staggered groups ───────────────────────────────────── */
[data-animate-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate-group].is-visible > *:nth-child(1) { transition-delay: 0.00s; }
[data-animate-group].is-visible > *:nth-child(2) { transition-delay: 0.10s; }
[data-animate-group].is-visible > *:nth-child(3) { transition-delay: 0.20s; }
[data-animate-group].is-visible > *:nth-child(4) { transition-delay: 0.30s; }

[data-animate-group].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Fade-in from left (for two-col left column) ────────── */
[data-animate-left] {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate-left].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Fade-in from right (for two-col right column) ─────── */
[data-animate-right] {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate-right].is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Floating hero mockup ───────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px);  }
  50%       { transform: translateY(-10px); }
}

.hero-mockup {
  animation: float 4.5s ease-in-out infinite;
}

/* ─── Hero tag subtle pulse ──────────────────────────────── */
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0   rgba(254, 200, 118, 0.5); }
  60%       { box-shadow: 0 0 0 10px rgba(254, 200, 118, 0);   }
}

.hero-tag { animation: badge-pulse 2.8s ease-in-out infinite; }

/* ─── Step number pop-in (triggered by is-visible) ───────── */
@keyframes pop {
  0%   { transform: scale(0.6); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}

[data-animate-group].is-visible .step-num {
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

[data-animate-group].is-visible > *:nth-child(1) .step-num { animation-delay: 0.05s; }
[data-animate-group].is-visible > *:nth-child(2) .step-num { animation-delay: 0.15s; }
[data-animate-group].is-visible > *:nth-child(3) .step-num { animation-delay: 0.25s; }

/* ─── Stat value scale-in ────────────────────────────────── */
@keyframes scale-in {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.stat-item.is-visible .stat-item__value {
  animation: scale-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.stats-bar__inner > .stat-item:nth-child(1).is-visible .stat-item__value { animation-delay: 0.0s; }
.stats-bar__inner > .stat-item:nth-child(2).is-visible .stat-item__value { animation-delay: 0.1s; }
.stats-bar__inner > .stat-item:nth-child(3).is-visible .stat-item__value { animation-delay: 0.2s; }
.stats-bar__inner > .stat-item:nth-child(4).is-visible .stat-item__value { animation-delay: 0.3s; }

/* ─── Featured price card subtle glow ───────────────────── */
@keyframes glow-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(171, 194, 112, 0.0); }
  50%       { box-shadow: 0 0 0 6px rgba(171, 194, 112, 0.15); }
}

.price-card--featured {
  animation: glow-border 3s ease-in-out infinite;
}
