/* ============================================================
   SONOMA CONSULTING — ANIMATIONS
   ============================================================ */

/* ── Fade In ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Scale ────────────────────────────────────────────────── */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Counter ──────────────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Pulse ────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.04); }
}

/* ── Slide ────────────────────────────────────────────────── */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutLeft {
  from { transform: translateX(0);     opacity: 1; }
  to   { transform: translateX(-100%); opacity: 0; }
}

/* ── Skeleton loader ──────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position:  1000px 0; }
}

/* ── Utility Classes ──────────────────────────────────────── */
.animate-fade-in     { animation: fadeIn     0.6s ease forwards; }
.animate-fade-in-up  { animation: fadeInUp   0.6s ease forwards; }
.animate-fade-in-down{ animation: fadeInDown 0.6s ease forwards; }
.animate-fade-in-left{ animation: fadeInLeft 0.6s ease forwards; }
.animate-scale-in    { animation: scaleIn    0.5s ease forwards; }
.animate-pulse       { animation: pulse      2.5s ease-in-out infinite; }

/* Delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Initial hidden state for scroll animations */
.reveal-hidden { opacity: 0; }

/* ── Hero animated elements ───────────────────────────────── */
.hero-eyebrow  { animation: fadeInUp 0.6s ease 0.1s both; }
.hero h1       { animation: fadeInUp 0.7s ease 0.25s both; }
.hero-subtitle { animation: fadeInUp 0.7s ease 0.4s both; }
.hero-actions  { animation: fadeInUp 0.6s ease 0.55s both; }
.hero-trust    { animation: fadeInUp 0.6s ease 0.7s both; }
.hero-visual   { animation: fadeInRight 0.8s ease 0.3s both; }

/* ── Skeleton Loader ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.6s infinite;
  border-radius: 4px;
}

/* ── Page transition ──────────────────────────────────────── */
.page-enter {
  animation: fadeIn 0.35s ease;
}

/* ── Stagger children ─────────────────────────────────────── */
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.12s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.19s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.26s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.33s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.40s; }

/* ── Scroll progress bar ──────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ── Hover effects ────────────────────────────────────────── */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
