/* ============================================================
   KOJILABS — Animations & Motion Utilities
   
   Keyframe definitions, scroll-triggered reveal classes,
   stagger helpers, hover micro-interactions, and the
   foundational glassmorphism surface styles.
   ============================================================ */


/* ────────────────────────────────────────────────────────────
   K E Y F R A M E S
   ──────────────────────────────────────────────────────────── */

/* Fade in while rising upward — the workhorse entrance. */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Simple opacity fade — for overlays, modals, tooltips. */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Slide in from the left edge. */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from the right edge. */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale up from slightly smaller — great for cards & modals. */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gentle pulsing opacity — loading indicators, live badges. */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* Horizontal shimmer sweep — skeleton loading states. */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Breathing glow tied to the theme's accent color. */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 40px var(--accent-glow),
                0 0 60px var(--accent-glow);
  }
}

/* Gentle vertical float — decorative elements, icons. */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}


/* ────────────────────────────────────────────────────────────
   S C R O L L - T R I G G E R E D   R E V E A L
   
   Elements start hidden (.animate-in) and transition to
   their final state when .visible is added via JS
   IntersectionObserver.
   ──────────────────────────────────────────────────────────── */

.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ────────────────────────────────────────────────────────────
   S T A G G E R   D E L A Y S
   
   Apply .stagger-1 through .stagger-6 alongside .animate-in
   for cascading entrance sequences.
   ──────────────────────────────────────────────────────────── */

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }


/* ────────────────────────────────────────────────────────────
   H O V E R   M I C R O - I N T E R A C T I O N S
   ──────────────────────────────────────────────────────────── */

/* Lift card upward with a deeper shadow on hover. */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Accent-colored glow ring on hover. */
.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px var(--accent-glow);
}


/* ────────────────────────────────────────────────────────────
   G L A S S M O R P H I S M   S U R F A C E S
   
   The signature frosted-glass aesthetic. Two variants:
   • .glass       — raw surface (no radius / shadow)
   • .glass-card  — complete card with radius + shadow
   ──────────────────────────────────────────────────────────── */

.glass {
  -webkit-backdrop-filter: blur(var(--blur-strength));
          backdrop-filter: blur(var(--blur-strength));
  background: var(--blur-tint);
  border: 1px solid var(--surface-border);
}

.glass-card {
  -webkit-backdrop-filter: blur(var(--blur-strength));
          backdrop-filter: blur(var(--blur-strength));
  background: var(--blur-tint);
  border: 1px solid var(--surface-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
}
