/* ============================================================
   MedEat — Animations & Keyframes
   ============================================================ */

/* === HERO ENTRY SEQUENCE === */
@keyframes hero-word-in {
  0%   { opacity: 0; transform: translateY(28px) skewY(2deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes hero-fade-up {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: none; }
}

@keyframes phone-scale-in {
  0%   { opacity: 0; transform: scale(0.82) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes stat-pop {
  0%   { opacity: 0; transform: scale(0.8) translateY(10px); }
  70%  { transform: scale(1.04) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero entry states */
.hero-anim-ready .hero__title    { opacity: 0; }
.hero-anim-ready .hero__subtitle { opacity: 0; }
.hero-anim-ready .hero__cta      { opacity: 0; }
.hero-anim-ready .hero__stat     { opacity: 0; }
.hero-anim-ready .hero__phone    { opacity: 0; }
.hero-anim-ready .hero__eyebrow  { opacity: 0; }

.hero-anim-play .hero__eyebrow {
  animation: hero-fade-up 0.6s var(--ease-out) 0ms both;
}

.hero-anim-play .hero__title {
  animation: hero-fade-up 0.8s var(--ease-out) 150ms both;
}

.hero-anim-play .hero__subtitle {
  animation: hero-fade-up 0.7s var(--ease-out) 400ms both;
}

.hero-anim-play .hero__cta {
  animation: hero-fade-up 0.7s var(--ease-out) 600ms both;
}

.hero-anim-play .hero__stat:nth-child(1) { animation: stat-pop 0.6s var(--ease-spring) 800ms both; }
.hero-anim-play .hero__stat:nth-child(2) { animation: stat-pop 0.6s var(--ease-spring) 880ms both; }
.hero-anim-play .hero__stat:nth-child(3) { animation: stat-pop 0.6s var(--ease-spring) 960ms both; }
.hero-anim-play .hero__stat:nth-child(4) { animation: stat-pop 0.6s var(--ease-spring) 1040ms both; }

.hero-anim-play .hero__phone {
  animation: phone-scale-in 1s var(--ease-spring) 1100ms both;
}

/* === SCROLL REVEAL (base) === */
/* .reveal classes: set in main.css, driven by IntersectionObserver in main.js */

/* === GLOW PULSE === */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
  50%       { box-shadow: 0 0 0 12px rgba(45, 212, 191, 0); }
}

.btn-primary {
  animation: glow-pulse 3s ease-in-out infinite;
}

/* === PHONE DOTS CAROUSEL === */
@keyframes dot-active {
  0%   { width: 6px; }
  100% { width: 20px; }
}

/* === PIPELINE STEP ACTIVE === */
@keyframes step-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.4); }
  50%       { box-shadow: 0 0 0 16px rgba(45, 212, 191, 0); }
}

.pipeline__step-num {
  animation: step-glow 2.5s ease-in-out infinite;
  animation-play-state: paused;
}

.pipeline__step.active .pipeline__step-num {
  animation-play-state: running;
}

/* === BADGE FLOAT === */
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.section-eyebrow {
  animation: badge-float 4s ease-in-out infinite;
}

/* === BACKGROUND PARTICLE === */
@keyframes particle-drift {
  0%        { transform: translate(0, 0) scale(1); opacity: 0.3; }
  33%       { transform: translate(30px, -40px) scale(1.1); opacity: 0.5; }
  66%       { transform: translate(-20px, 20px) scale(0.9); opacity: 0.2; }
  100%      { transform: translate(0, 0) scale(1); opacity: 0.3; }
}

/* === INTERACTION CARD HOVER === */
.interaction-card {
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s, border-color 0.35s;
}

/* === FEATURE TAB ACTIVE INDICATOR === */
.feature-tab.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--color-primary);
  border-radius: 0 2px 2px 0;
  animation: hero-fade-up 0.3s var(--ease-out) both;
}

.feature-tab { position: relative; }

/* === FAQ OPEN INDICATOR === */
.faq-item.open .faq-item__question {
  background: rgba(45, 212, 191, 0.03);
}

/* === SHIMMER LOADING === */
@keyframes shimmer-bg {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer-bg 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* === CTA SECTION SPOTLIGHT === */
@keyframes spotlight {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%       { transform: scale(1.1); opacity: 0.8; }
}

.download::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(45, 212, 191, 0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: spotlight 6s ease-in-out infinite;
}

/* === SCROLL INDICATOR (hero bottom) === */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(6px); opacity: 1; }
}

/* === TESTIMONIAL CARD HOVER TILT === */
.testimonial-card {
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

/* === CHECK ICON POP === */
@keyframes check-pop {
  0%   { transform: scale(0) rotate(-45deg); }
  70%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.bilan__check.visible .bilan__check-icon {
  animation: check-pop 0.4s var(--ease-spring) both;
}

/* === GRADIENT TEXT ANIMATION === */
/* Handled by .text-gradient class + shimmer keyframe in main.css */

/* === REDUCED MOTION OVERRIDES === */
@media (prefers-reduced-motion: reduce) {
  .hero-anim-ready .hero__title,
  .hero-anim-ready .hero__subtitle,
  .hero-anim-ready .hero__cta,
  .hero-anim-ready .hero__stat,
  .hero-anim-ready .hero__phone,
  .hero-anim-ready .hero__eyebrow {
    opacity: 1;
  }

  .hero-anim-play .hero__eyebrow,
  .hero-anim-play .hero__title,
  .hero-anim-play .hero__subtitle,
  .hero-anim-play .hero__cta,
  .hero-anim-play .hero__stat,
  .hero-anim-play .hero__phone {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn-primary { animation: none; }
  .section-eyebrow { animation: none; }
  .pipeline__step-num { animation: none; }
  .bilan__check.visible .bilan__check-icon { animation: none; }
  .download::before { animation: none; }
}
