/* ============================================================
   animations.css — The C.A.R.E. Project
   Animation utility classes (CSS-only; GSAP handles JS animations)
   ============================================================ */

/* ============================================================
   Reduced Motion — disable all non-essential animation
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Initial hidden states for GSAP scroll-reveal elements
   (GSAP will set these via its own from() calls, but having
   CSS defaults prevents flash of unstyled content if GSAP is
   slow to load)
   ============================================================ */
.gsap-hidden {
  opacity: 0;
}

/* ============================================================
   Fade utilities (pure CSS for non-JS environments)
   ============================================================ */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-up {
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }
.fade-in-delay-5 { animation-delay: 0.5s; }

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

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

/* ============================================================
   Slide utilities
   ============================================================ */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left  { animation: slideInLeft  0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.slide-in-right { animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ============================================================
   Scale pulse (used on stat numbers after count-up)
   ============================================================ */
@keyframes scalePulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.scale-pulse {
  animation: scalePulse 0.4s ease;
}

/* ============================================================
   Gold shimmer — decorative highlight on eyebrow text
   ============================================================ */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.eyebrow-shimmer {
  background: linear-gradient(
    90deg,
    var(--gold) 0%,
    var(--gold-hover) 40%,
    #e8c88e 60%,
    var(--gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 3s linear infinite;
}

/* ============================================================
   Step connector pulse (CSS only, decorative)
   ============================================================ */
@keyframes connectorPulse {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.65; }
}

.step-connector {
  animation: connectorPulse 2.5s ease-in-out infinite;
}

/* ============================================================
   Card hover state (supplements JS hover effects)
   ============================================================ */
.modality-card {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Skeleton loader (for image lazy loading states)
   ============================================================ */
@keyframes skeletonPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

.skeleton {
  background: #e8e0d5;
  border-radius: var(--radius-sm);
  animation: skeletonPulse 1.5s ease-in-out infinite;
}

/* ============================================================
   Scroll indicator arrow (hero, decorative)
   ============================================================ */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.65;
}

.scroll-indicator span {
  display: block;
  width: 20px;
  height: 20px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: scrollBounce 1.6s ease-in-out infinite;
}

.scroll-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes scrollBounce {
  0%, 80%, 100% { opacity: 0; }
  40%           { opacity: 1; }
}

/* ============================================================
   Nav underline hover effect
   ============================================================ */
.nav-item::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

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

/* ============================================================
   Trust ribbon dividers
   ============================================================ */
.trust-stat + .trust-stat {
  border-left: 1px solid rgba(255,255,255,0.15);
}

@media (max-width: 480px) {
  .trust-stat + .trust-stat {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
  }
}
