/* ══════════════════════════════════════════
   ANIMATIONS — PAT'S Automotive LLC
   ══════════════════════════════════════════ */

/* ── Reveal states (IntersectionObserver) ── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal-fade {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}

.reveal-fade.is-visible {
  opacity: 1;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* ── Hero title overflow containers ── */
.hero-title-line1,
.hero-title-line2 {
  overflow: hidden;
  display: block;
}

/* ── Scroll line animation ── */
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Particle animation ── */
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%       { opacity: 0.9; transform: scale(1.3); }
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: twinkle var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.particle.star {
  background: var(--color-text-primary);
  opacity: 0.4;
}

/* ── Stat counter pulse ── */
@keyframes statPulse {
  0%, 100% { text-shadow: 0 0 0px transparent; }
  50%       { text-shadow: 0 0 20px var(--glow-accent); }
}

.stat-number.counting {
  animation: statPulse 1.6s ease-in-out;
}

/* ── Glow pulse on hero CTA ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(220, 38, 38, 0.3); }
  50%       { box-shadow: 0 4px 40px rgba(220, 38, 38, 0.6); }
}

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

.btn-primary:hover {
  animation: none;
}

/* ── Transition stagger helpers ── */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ── Mobile overlay link stagger (set via inline style) ── */
.mobile-overlay a:nth-child(1) { transition: opacity 0.5s 0.1s var(--ease-out), transform 0.5s 0.1s var(--ease-out); }
.mobile-overlay a:nth-child(2) { transition: opacity 0.5s 0.2s var(--ease-out), transform 0.5s 0.2s var(--ease-out); }
.mobile-overlay a:nth-child(3) { transition: opacity 0.5s 0.3s var(--ease-out), transform 0.5s 0.3s var(--ease-out); }
.mobile-overlay a:nth-child(4) { transition: opacity 0.5s 0.4s var(--ease-out), transform 0.5s 0.4s var(--ease-out); }