/**
 * TAVOLA DEI SANTI — Animations
 * Minimal, editorial. Only what's needed.
 */

/* ─── Fade In (scroll reveal) ───────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ─── Animate-in class (JS adds this) ───────────────────── */
.animate-in {
  animation: fadeInUp 0.65s ease forwards;
}

.animate-in-fast {
  animation: fadeInUp 0.4s ease forwards;
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* ─── Stagger delays ────────────────────────────────────── */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.12s; }
.stagger-3 { animation-delay: 0.19s; }
.stagger-4 { animation-delay: 0.26s; }

/* ─── Image crossfade (handled via CSS hover, not keyframes) */
/* See .product-card-images in components.css               */

/* ─── Scroll reveal setup ───────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="left"] {
  transform: translateX(-20px);
}
[data-reveal="left"].in-view {
  transform: translateX(0);
}

[data-reveal="fade"] {
  transform: none;
}

/* ─── Delay variants for staggered reveals ──────────────── */
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }

/* ─── Page entrance ─────────────────────────────────────── */
.page-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* ─── Hero text reveal ──────────────────────────────────── */
.hero-eyebrow,
.hero-title,
.hero-cta {
  opacity: 0;
  animation: fadeInUp 0.7s ease forwards;
}
.hero-eyebrow { animation-delay: 0.2s; }
.hero-title   { animation-delay: 0.4s; }
.hero-cta     { animation-delay: 0.65s; }

/* ─── Underline hover animation ─────────────────────────── */
.hover-underline {
  position: relative;
}
.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}
.hover-underline:hover::after {
  width: 100%;
}

/* ─── Smooth scroll reveal init ─────────────────────────── */
/* Initialized by JS: IntersectionObserver adds .in-view   */
