/* ══════════════════════════════════════
   ANIMATIONS — Cousins Dominican Barbershop
   ══════════════════════════════════════ */

/* ── Scroll Reveal ── */
.reveal-fade {
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}

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

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

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

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

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

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

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

/* ── Stagger children ── */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: none; }

/* ── Particle ── */
.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  animation: particleDrift linear infinite;
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    transform: translateY(0) scale(1);
  }
  10% {
    opacity: 0.35;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translateY(-80vh) scale(0.5);
  }
}

/* ── Barber pole stripe accent (decorative) ── */
.barber-stripe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 6px;
  background: repeating-linear-gradient(
    180deg,
    var(--color-accent) 0px,
    var(--color-accent) 20px,
    #fff 20px,
    #fff 40px,
    #1a6bd1 40px,
    #1a6bd1 60px
  );
  opacity: 0.35;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  animation: stripeScroll 3s linear infinite;
}

@keyframes stripeScroll {
  from { background-position: 0 0; }
  to   { background-position: 0 60px; }
}

/* ── Number counter animation ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-number.counting {
  animation: countUp 0.3s ease forwards;
}

/* ── Gallery transition ── */
.gallery-track {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Tab panel transition ── */
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-panel.active {
  animation: tabFadeIn 0.35s var(--ease-out) forwards;
}

/* ── Hover lift ── */
.testimonial-card,
.gallery-card figure {
  transition: transform var(--duration-normal) var(--ease-out), box-shadow var(--duration-normal) ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* ── Pulse ring on accent elements ── */
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(231,52,55,0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(231,52,55,0); }
  100% { box-shadow: 0 0 0 0 rgba(231,52,55,0); }
}

.btn-nav-cta {
  animation: pulseRing 3s ease-out infinite;
}

.btn-nav-cta:hover {
  animation: none;
}
