/* ========================================
   ANIMATIONS.CSS
   Comprehensive animation system for 100xGood
   ======================================== */

/* ========================================
   1. PAGE LOAD ANIMATION
   ======================================== */
.page-loading {
  opacity: 0;
}

.page-loaded {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* Top progress bar */
.page-load-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--amethyst, #A477B2);
  z-index: 10000;
  transition: width 0.2s ease, opacity 0.3s ease;
}

.page-load-progress.complete {
  width: 100%;
  opacity: 0;
}

/* ========================================
   2. SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3,
  .reveal-delay-4,
  .reveal-delay-5,
  .reveal-delay-6 {
    transition-delay: 0s;
  }
}

/* ========================================
   3. PARALLAX HERO
   ======================================== */
.parallax-hero {
  position: relative;
  overflow: hidden;
}

.parallax-bg {
  position: absolute;
  inset: 0;
  will-change: transform;
  z-index: 0;
}

.parallax-content {
  position: relative;
  z-index: 1;
}

/* Disable parallax on mobile */
@media (max-width: 768px) {
  .parallax-bg {
    transform: none !important;
  }
}

/* ========================================
   4. CARD HOVER INTERACTIONS
   ======================================== */
.card-hover,
.feature-card,
.capability-card,
.gem-card,
.industry-card,
.vertical-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover,
.feature-card:hover,
.capability-card:hover,
.gem-card:hover,
.industry-card:hover,
.vertical-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Accent color borders on hover */
.capability-card.jade:hover { border-color: var(--jade, #5CB198); }
.capability-card.rose:hover { border-color: var(--rose-quartz-deep, #D4A0A0); }
.capability-card.citrine:hover { border-color: var(--citrine, #CDA849); }
.capability-card.amethyst:hover { border-color: var(--amethyst, #A477B2); }

/* Default hover border for cards without color class */
.feature-card:hover,
.gem-card:hover {
  border-color: var(--amethyst, #A477B2);
}

/* ========================================
   5. PILLAR SECTION HOVER (Methodology page)
   ======================================== */
.pillar-section {
  position: relative;
  transition: all 0.25s ease;
}

.pillar-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  transition: width 0.25s ease;
}

.pillar-section:hover::before {
  width: 3px;
}

/* Pillar colors */
.pillar-section.pillar-model::before { background: var(--violet-topaz, #5F509D); }
.pillar-section.pillar-define::before { background: var(--jade, #5CB198); }
.pillar-section.pillar-captivate::before { background: var(--citrine, #CDA849); }
.pillar-section.pillar-convert::before { background: var(--amethyst, #A477B2); }
.pillar-section.pillar-compound::before { background: #1d6c3d; }

/* ========================================
   6. SMOOTH ANCHOR SCROLLING
   ======================================== */
html {
  scroll-behavior: smooth;
}

/* Account for sticky nav height */
[id] {
  scroll-margin-top: 100px;
}

/* Anchor highlight animation */
@keyframes anchorHighlight {
  0% { background-color: rgba(164, 119, 178, 0.08); }
  100% { background-color: transparent; }
}

.anchor-highlight {
  animation: anchorHighlight 1s ease forwards;
}

/* ========================================
   7. GRADIENT TEXT
   ======================================== */
.text-gradient,
h2 .text-gradient,
.display-mixed strong.text-gradient {
  background: linear-gradient(135deg, #31263B 0%, #A477B2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Apply to Barlow headings only */
.serif-sans-split strong,
.headline-gradient {
  background: linear-gradient(135deg, #31263B 0%, #A477B2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   8. ANIMATED STATS COUNTER
   ======================================== */
.stat-counter {
  display: inline-block;
}

.stat-counter.counting {
  /* Applied during count animation */
}

/* Stats number base styling */
.stat-number {
  font-family: var(--font-display-sans, 'Barlow Semi Condensed', sans-serif);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ========================================
   9. BUTTON MICRO-INTERACTIONS
   ======================================== */
.btn,
.btn-primary,
.btn-outline {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* Primary button hover */
.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(95, 80, 157, 0.15);
  filter: brightness(1.05);
}

/* Outline button hover */
.btn-outline:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(95, 80, 157, 0.1);
}

/* Click/active state */
.btn:active,
.btn-primary:active,
.btn-outline:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Button focus glow */
.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(164, 119, 178, 0.3);
}

/* ========================================
   10. ADDITIONAL UTILITY ANIMATIONS
   ======================================== */

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

.animate-fadeIn {
  animation: fadeIn 0.4s ease forwards;
}

/* Slide up */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slideUp {
  animation: slideUp 0.5s ease forwards;
}

/* Pulse (subtle) */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.animate-pulse {
  animation: pulse 2s ease infinite;
}

/* Shimmer effect for loading states */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
