/* ═══════════════════════════════════════════
   ANIMATIONS — Danny Mak's Trophy Winning BBQ and Fixins
   ═══════════════════════════════════════════ */

/* ── Reveal states (pre-IntersectionObserver) ── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-fade {
  opacity: 0;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

/* ── Reveal trigger class (added by IntersectionObserver in main.js) ── */
.is-visible {
  opacity: 1 !important;
  transform: translateY(0) translateX(0) !important;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-up.is-visible {
  transition-delay: 0.1s;
}

.reveal-left.is-visible,
.reveal-right.is-visible {
  transition-delay: 0.15s;
}

/* ── Hero title overflow container ── */
.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; }
}

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

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

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

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

/* ── Stat counter flash ── */
@keyframes statFlash {
  0%   { color: var(--color-accent); transform: scale(1.1); }
  50%  { color: var(--color-accent-light); transform: scale(1.05); }
  100% { color: var(--color-accent); transform: scale(1); }
}

.stat-number.counted {
  animation: statFlash 0.4s ease forwards;
}

/* ── Smooth underline for nav links ── */
.nav-links a::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ── Gallery card image zoom ── */
.gallery-card {
  overflow: hidden;
}

.gallery-card img {
  transition: transform 0.8s var(--ease-out);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

/* ── Hero content initial entrance ── */
.hero-eyebrow,
.hero-title,
.hero-sub,
.hero-ctas {
  opacity: 0;
  animation: heroEntrance 1s var(--ease-out) forwards;
}

.hero-eyebrow { animation-delay: 0.2s; }
.hero-title   { animation-delay: 0.4s; }
.hero-sub     { animation-delay: 0.6s; }
.hero-ctas    { animation-delay: 0.8s; }

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

/* ── Button pulse on focus ── */
.btn:focus-visible {
  animation: btnPulse 1.2s ease;
  outline: none;
}

@keyframes btnPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ── Side card stagger entrance ── */
.side-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.side-card:nth-child(1) { transition-delay: 0.05s; }
.side-card:nth-child(2) { transition-delay: 0.1s; }
.side-card:nth-child(3) { transition-delay: 0.15s; }
.side-card:nth-child(4) { transition-delay: 0.2s; }
.side-card:nth-child(5) { transition-delay: 0.25s; }
.side-card:nth-child(6) { transition-delay: 0.3s; }

.is-visible .side-card,
.sides-grid.is-visible .side-card {
  opacity: 1;
  transform: translateY(0);
}