/* =============================================
   ANIMATIONS.CSS — All @keyframes & transitions
   Fabbro Metalli Roma
   ============================================= */

/* ─── 1. Line reveal (split-text) ───────────── */
@keyframes lineUp {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

/* ─── 3. Fade in ─────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── 4. Subtle pulse glow (accent elements) ─── */
@keyframes accentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 74, 30, 0); }
  50%       { box-shadow: 0 0 16px 4px rgba(201, 74, 30, 0.25); }
}

/* ─── 7. Scroll progress bar scale ──────────── */
/* (driven by JS, uses scaleX transform — no keyframe needed) */

/* ─── Split-text line containers ─────────────── */
.line-wrap {
  display: block;
  overflow: hidden;
  line-height: 1.05;
}

.line-inner {
  display: block;
  animation: lineUp 0.9s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.line-inner.d1 { animation-delay: 0.05s; }
.line-inner.d2 { animation-delay: 0.18s; }
.line-inner.d3 { animation-delay: 0.30s; }
.line-inner.d4 { animation-delay: 0.42s; }

/* ─── Wipe-reveal class (IntersectionObserver) ── */
.wipe-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.85s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.wipe-reveal.visible {
  clip-path: inset(0 0% 0 0);
}

/* ─── SVG stroke trigger ─────────────────────── */
.draw-line {
  stroke-dasharray: var(--stroke-len, 400);
  stroke-dashoffset: var(--stroke-len, 400);
  transition: stroke-dashoffset 1.2s var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.draw-line.visible {
  stroke-dashoffset: 0;
}

/* ─── Scroll progress bar ─────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--clr-accent);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1000;
  transition: transform 0.05s linear;
}

/* ─── Stat box accent glow on reveal ────────── */
.stat-box.visible .stat-box__number {
  animation: accentPulse 3s ease-in-out infinite;
}

/* ─── Staggered card delays ──────────────────── */
.stagger-1 { transition-delay: 0.05s; }
.stagger-2 { transition-delay: 0.15s; }
.stagger-3 { transition-delay: 0.25s; }
.stagger-4 { transition-delay: 0.35s; }
.stagger-5 { transition-delay: 0.45s; }
.stagger-6 { transition-delay: 0.55s; }

