/* ══════════════════════════════════════
   ANIMATIONS — Lovejoy's Barbershop
   ══════════════════════════════════════ */

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

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

.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-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);
}

/* Staggered children */
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }

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

/* ── Hero entrance ── */
.hero-eyebrow {
  animation: heroFadeUp 0.8s var(--ease-out) 0.2s both;
}

.hero-title {
  animation: heroFadeUp 0.9s var(--ease-out) 0.4s both;
}

.hero-sub {
  animation: heroFadeUp 0.9s var(--ease-out) 0.6s both;
}

.hero-ctas {
  animation: heroFadeUp 0.9s var(--ease-out) 0.75s both;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Hero canvas (replaces static bg) ── */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ── Scanline overlay ── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Tab panel transition ── */
.tab-panel {
  animation: none;
}

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

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Gallery card ── */
.gallery-track {
  /* transition defined in layout.css */
}

/* ── Testimonial card hover pulse ── */
.testimonial-card {
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal), transform var(--duration-normal);
}

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

/* ── Stat counter pulse on load ── */
@keyframes counterPop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.stat-number.counted {
  animation: counterPop 0.5s var(--ease-out) both;
}
