/* HyperAI Animation Library */
/* Import design-tokens.css first, then this file */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

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

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

/* Slide Down */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scale In */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scale Out */
@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Modal Slide In */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.3) translateY(100px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Light Wave (Background Animation) */
@keyframes lightWave {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Glitch Effect */
@keyframes glitch-1 {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(2px, -2px);
    }
    40% {
        transform: translate(2px, 2px);
    }
    60% {
        transform: translate(-2px, -2px);
    }
    80% {
        transform: translate(-2px, 2px);
    }
}

/* Matrix Scan Effect */
@keyframes matrix-scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Sparkle Animations */
@keyframes sparklePath1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(20px, -20px) scale(1.2);
        opacity: 1;
    }
}

@keyframes sparklePath2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-20px, 20px) scale(1.2);
        opacity: 1;
    }
}

@keyframes sparklePath3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(15px, 15px) scale(1.1);
        opacity: 1;
    }
}

@keyframes sparklePath4 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-15px, -15px) scale(1.1);
        opacity: 1;
    }
}

/* Spin Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Background Float */
@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    33% {
        transform: translate(20px, -20px);
    }
    66% {
        transform: translate(-20px, 20px);
    }
}

/* Honeycomb Reveal */
@keyframes honeycombReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.5;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

/* ============================================
   ANIMATION UTILITY CLASSES
   ============================================ */

/* Fade In */
.animate-fade-in {
    animation: fadeIn var(--transition-normal) ease-out;
}

.animate-fade-in-slow {
    animation: fadeIn var(--transition-slow) ease-out;
}

/* Slide Up */
.animate-slide-up {
    animation: slideUp var(--transition-normal) ease-out;
}

.animate-slide-up-slow {
    animation: slideUp var(--transition-slow) ease-out;
}

/* Scale In */
.animate-scale-in {
    animation: scaleIn var(--transition-normal) ease-out;
}

/* Pulse */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Bounce */
.animate-bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* Spin */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* Float */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Glitch */
.animate-glitch {
    animation: glitch-1 2s infinite;
}

/* Shimmer */
.animate-shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

/* Hover Lift */
.hover-lift {
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Hover Scale */
.hover-scale {
    transition: all var(--transition-normal);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Hover Glow */
.hover-glow {
    transition: all var(--transition-normal);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow-strong);
}

/* Hover Rotate */
.hover-rotate {
    transition: all var(--transition-normal);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Hover Shake */
.hover-shake {
    transition: all var(--transition-normal);
}

.hover-shake:hover {
    animation: glitch-1 0.5s;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* Fade in on scroll */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

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

/* Slide in from left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from right */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in on scroll */
.scale-in-scroll {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease-out;
}

.scale-in-scroll.visible {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   ANIMATION DELAYS
   ============================================ */

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* ============================================
   ANIMATION DURATIONS
   ============================================ */

.duration-fast {
    animation-duration: var(--transition-fast);
}

.duration-normal {
    animation-duration: var(--transition-normal);
}

.duration-slow {
    animation-duration: var(--transition-slow);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use GPU acceleration for smooth animations */
.animate-fade-in,
.animate-slide-up,
.animate-scale-in,
.hover-lift,
.hover-scale {
    will-change: transform, opacity;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

