/* ═══════════════════════════════════════════════════════════════
   GIO Platform - Animations
   Keyframes and animation utilities
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--duration-slower) ease,
              transform var(--duration-slower) ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-26px);
  transition: opacity var(--duration-slower) ease,
              transform var(--duration-slower) ease;
}

.reveal-left.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-right {
  opacity: 0;
  transform: translateX(26px);
  transition: opacity var(--duration-slower) ease,
              transform var(--duration-slower) ease;
}

.reveal-right.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════════════════════════
   CURSOR STYLES
   ═══════════════════════════════════════════════════════════════ */
.cursor {
  width: 12px;
  height: 12px;
  background: var(--azure);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: multiply;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(37,99,235,0.4);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: var(--z-cursor-ring);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, width 0.4s, height 0.4s, opacity 0.3s;
}

body:hover .cursor-ring {
  opacity: 1;
}

.cursor--expanded {
  width: 20px !important;
  height: 20px !important;
}

.cursor-ring--expanded {
  width: 60px !important;
  height: 60px !important;
}

/* ═══════════════════════════════════════════════════════════════
   BAR CHART ANIMATION
   ═══════════════════════════════════════════════════════════════ */
.bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: rgba(37,99,235,0.12);
  transition: background var(--duration-fast);
  animation: barGrow 1s ease forwards;
  transform-origin: bottom;
}

.bar:hover {
  background: var(--azure);
}

.bar--active {
  background: var(--azure);
}

@keyframes barGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ═══════════════════════════════════════════════════════════════
   SPARKLINE ANIMATION
   ═══════════════════════════════════════════════════════════════ */
.spark {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: rgba(37,99,235,0.15);
  animation: sparkGrow 1.2s ease forwards;
  transform-origin: bottom;
}

.spark--high {
  background: var(--azure);
}

@keyframes sparkGrow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING CARDS
   ═══════════════════════════════════════════════════════════════ */
.float-card {
  position: absolute;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}

.float-card--1 {
  bottom: -24px;
  left: -48px;
  animation-delay: 0s;
}

.float-card--2 {
  top: -20px;
  right: -32px;
  animation-delay: 1.5s;
}

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

/* ═══════════════════════════════════════════════════════════════
   PARTICLE ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; }
}

@keyframes float-up {
  0% { transform: translateY(30px); opacity: 0; }
  20% { transform: translateY(15px); opacity: 0; }
  40% { transform: translateY(0px); opacity: 1; }
  60% { transform: translateY(-30px); opacity: 1; }
  80% { transform: translateY(0px); opacity: 0; }
  100% { transform: translateY(30px); opacity: 0; }
}

@keyframes floatParticles {
  0%, 100% { 
    opacity: 0.3;
    transform: translateY(0px);
  }
  50% { 
    opacity: 0.7;
    transform: translateY(-3px);
  }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

@keyframes scaleIn {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to   { 
    opacity: 1;
    transform: scale(1);
  }
}

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

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}
