/* ============================================================
   JIG — Animations CSS
   All @keyframes and motion utilities
   ============================================================ */

/* ─── Keyframes ─── */

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes reviews-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes blur-in {
  from { opacity: 0; filter: blur(12px); }
  to   { opacity: 1; filter: blur(0); }
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes slide-right {
  from { transform: translateX(-24px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

@keyframes counter-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes progress-bar {
  from { width: 0; }
}

@keyframes draw-line {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.4; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(27, 107, 74, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(27, 107, 74, 0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes hero-particles {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0.3; }
  50%  { opacity: 0.6; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

@keyframes timeline-progress {
  from { height: 0; }
  to   { height: 100%; }
}

/* ─── Hero Animation ─── */
.hero__heading { animation: fade-up 0.9s var(--ease-out) 0.1s both; }
.hero__eyebrow { animation: fade-up 0.7s var(--ease-out) 0s both; }
.hero__sub     { animation: fade-up 0.9s var(--ease-out) 0.25s both; }
.hero__ctas    { animation: fade-up 0.9s var(--ease-out) 0.4s both; }
.hero__trust-badges { animation: fade-up 0.9s var(--ease-out) 0.55s both; }

/* ─── Floating particles in hero bg ─── */
.hero-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  animation: hero-particles linear infinite;
  pointer-events: none;
}

/* ─── Shimmer skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, var(--c-border) 25%, var(--c-surface-raised) 50%, var(--c-border) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ─── Ripple button effect ─── */
.btn .ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  pointer-events: none;
  animation: ripple 600ms linear;
}

/* ─── Floating badge ─── */
.floating-badge {
  animation: float 4s ease-in-out infinite;
}

/* ─── Counter animation ─── */
.counter.counted {
  animation: counter-pop 0.4s var(--ease-spring);
}

/* ─── Timeline progress line animation ─── */
.timeline.in-view::before {
  animation: timeline-progress 1.5s var(--ease-out) 0.3s both;
}

/* ─── Underline reveal on hover ─── */
.underline-reveal {
  position: relative;
}
.underline-reveal::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out);
}
.underline-reveal:hover::after { transform: scaleX(1); }

/* ─── Stagger children ─── */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.stagger.in-view > *:nth-child(1) { transition-delay: 0ms; }
.stagger.in-view > *:nth-child(2) { transition-delay: 80ms; }
.stagger.in-view > *:nth-child(3) { transition-delay: 160ms; }
.stagger.in-view > *:nth-child(4) { transition-delay: 240ms; }
.stagger.in-view > *:nth-child(5) { transition-delay: 320ms; }
.stagger.in-view > *:nth-child(6) { transition-delay: 400ms; }
.stagger.in-view > *:nth-child(7) { transition-delay: 480ms; }
.stagger.in-view > *:nth-child(8) { transition-delay: 560ms; }
.stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Image reveal on scroll ─── */
.img-reveal {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.9s var(--ease-out);
}
.img-reveal.revealed {
  clip-path: inset(0% 0 0 0);
}

/* ─── Scale-in on scroll ─── */
.scale-reveal {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.scale-reveal.revealed { opacity: 1; transform: scale(1); }

/* ─── Background gradient animation for hero ─── */
.hero-grad-animate {
  background: linear-gradient(-45deg, #0F4D34, #1B6B4A, #111110, #1C1C1E);
  background-size: 400% 400%;
  animation: gradient-shift 12s ease infinite;
}

/* ─── Active nav indicator ─── */
.nav__link.active {
  color: var(--c-emerald);
  background: var(--c-emerald-light);
}

/* ─── Scroll progress bar ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--c-emerald), var(--c-copper));
  z-index: calc(var(--z-header) + 1);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s linear;
}

/* ─── Hotspot animation ─── */
.hotspot-tooltip {
  position: absolute;
  background: var(--c-white);
  color: var(--c-charcoal);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  max-width: 260px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.92);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal);
}
.hotspot-tooltip.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.hotspot-tooltip__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--c-charcoal);
  margin-bottom: var(--space-1);
}
.hotspot-tooltip__mat {
  font-size: var(--fs-xs);
  color: var(--c-emerald);
  font-weight: var(--fw-semi);
  margin-bottom: var(--space-2);
}
.hotspot-tooltip__desc {
  font-size: var(--fs-xs);
  color: var(--c-charcoal-60);
  line-height: var(--lh-normal);
}
