/* ============================================================================
   BLUEAURA TECH - ANIMATIONS & TRANSITIONS
   ============================================================================
   This file contains all animation definitions for smooth interactions
   ========================================================================== */

/* ============================================================================
   FADE IN ANIMATIONS (Applied on scroll trigger)
   ========================================================================== */

/* Fade in from top */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in from left */
.fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out 0.2s forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Fade in from right */
.fade-in-right {
    opacity: 0;
    animation: fadeInRight 0.8s ease-out 0.2s forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================================
   SCALE ANIMATIONS
   ========================================================================== */

/* Pop in effect using scale */
.scale-in {
    opacity: 0;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================================
   FLOATING ANIMATIONS
   ========================================================================== */

/* Continuous floating motion */
@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: floatUpDown 4s ease-in-out infinite;
}

/* ============================================================================
   ROTATE ANIMATIONS
   ========================================================================== */

/* Continuous slow rotation */
@keyframes slowRotate {
    from {
        transform: rotateZ(0deg);
    }
    to {
        transform: rotateZ(360deg);
    }
}

.rotate-slow {
    animation: slowRotate 20s linear infinite;
}

/* Continuous fast rotation */
@keyframes fastRotate {
    from {
        transform: rotateZ(0deg);
    }
    to {
        transform: rotateZ(360deg);
    }
}

.rotate {
    animation: fastRotate 2s linear infinite;
}

/* ============================================================================
   PULSE ANIMATIONS
   ========================================================================== */

/* Pulse effect for emphasis */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================================================
   GLOW ANIMATIONS
   ========================================================================== */

/* Glow effect from shadow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* ============================================================================
   SLIDE ANIMATIONS
   ========================================================================== */

/* Slide from left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

/* Slide from right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

/* ============================================================================
   BOUNCE ANIMATIONS
   ========================================================================== */

/* Bounce effect */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 0.8s ease-in-out;
}

/* ============================================================================
   SHIMMER ANIMATION (Loading effect)
   ========================================================================== */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
}

/* ============================================================================
   FLIP ANIMATION
   ========================================================================== */

/* 3D flip effect */
@keyframes flip {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0deg);
    }
}

.flip {
    animation: flip 1s ease-in-out;
    perspective: 1000px;
}

/* ============================================================================
   WAVE ANIMATION
   ========================================================================== */

/* Wave effect for text or elements */
@keyframes wave {
    0%, 100% {
        transform: rotateZ(0deg);
    }
    25% {
        transform: rotateZ(5deg);
    }
    75% {
        transform: rotateZ(-5deg);
    }
}

.wave {
    animation: wave 0.5s ease-in-out;
    transform-origin: center center;
}

/* ============================================================================
   STAGGER ANIMATIONS
   ========================================================================== */

/* Stagger effect for multiple elements - use with nth-child */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-fade-in {
    opacity: 0;
    animation: staggerFadeIn 0.6s ease-out forwards;
}

.stagger-fade-in:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-fade-in:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-fade-in:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-fade-in:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-fade-in:nth-child(6) {
    animation-delay: 0.6s;
}

/* ============================================================================
   HOVER ANIMATIONS
   ========================================================================== */

/* Lift effect on hover */
.lift:hover {
    transform: translateY(-5px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scale effect on hover */
.scale-hover:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease-out;
}

/* ============================================================================
   ATTENTION SEEKERS
   ========================================================================== */

/* Heartbeat effect */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1);
    }
}

.heartbeat {
    animation: heartbeat 1.3s ease-in-out infinite;
}

/* Shake effect */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* ============================================================================
   PROGRESS ANIMATIONS
   ========================================================================== */

/* Loading spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* ============================================================================
   SCROLL-TRIGGERED ANIMATIONS (Applied by JavaScript)
   ========================================================================== */

/* Use data-animated or class on elements that should animate on scroll */
.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animated {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ============================================================================
   SMOOTH TRANSITIONS FOR COMMON PROPERTIES
   ========================================================================== */

/* Universal smooth transitions for better UX */
button,
a,
.btn,
.glass-card,
.feature-card,
.service-card {
    transition: 
        background-color 0.3s ease-out,
        color 0.3s ease-out,
        transform 0.3s ease-out,
        box-shadow 0.3s ease-out,
        border-color 0.3s ease-out;
}

/* ============================================================================
   PARALLAX EFFECT (For visual depth)
   ========================================================================== */

/* This is handled by JavaScript with mouse movement */
.parallax-bg {
    transform: translateZ(0);
}

/* ============================================================================
   RESPONSIVE ANIMATION ADJUSTMENTS
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    /* Respect user's reduced motion preference */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 768px) {
    /* Disable parallax and complex animations on touch devices */
    .parallax-bg {
        transform: none;
    }

    .floating-graphic {
        animation: none;
    }

    .security-graphic {
        animation: none;
    }

    /* Reduce animation duration on mobile for better performance */
    .fade-in-up,
    .fade-in-left,
    .fade-in-right,
    .scale-in {
        animation-duration: 0.6s;
    }
}

/* ============================================================================
   SPECIAL EFFECTS FOR VISUAL FEEDBACK
   ========================================================================== */

/* Highlight effect for important elements */
@keyframes highlight {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(0, 212, 255, 0.2);
    }
}

.highlight {
    animation: highlight 2s ease-in-out infinite;
}

/* Focus ring animation */
@keyframes focusRing {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 102, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
    }
}

input:focus,
select:focus,
textarea:focus {
    animation: focusRing 0.6s ease-out;
}

/* ============================================================================
   KEYBOARD ANIMATION
   ========================================================================== */

/* Demonstrate keyboard shortcuts visually */
@keyframes keyPress {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

kbd {
    animation: keyPress 0.2s ease-out;
}

/* ============================================================================
   NEON GLOW ANIMATIONS (Dark Mode)
   ========================================================================== */

/* Neon glow pulse - Light Mode with Neon Blue */
@keyframes neonGlow {
    0% {
        text-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.2);
    }
    50% {
        text-shadow: 0 0 15px rgba(0, 191, 255, 0.6);
        box-shadow: 0 0 25px rgba(0, 191, 255, 0.4);
    }
    100% {
        text-shadow: 0 0 5px rgba(0, 191, 255, 0.3);
        box-shadow: 0 0 10px rgba(0, 191, 255, 0.2);
    }
}

.neon-glow {
    animation: neonGlow 2s ease-in-out infinite;
}

/* Drift animation for background elements */
@keyframes drift {
    0% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(20px) translateY(-20px);
    }
    50% {
        transform: translateX(0) translateY(-40px);
    }
    75% {
        transform: translateX(-20px) translateY(-20px);
    }
    100% {
        transform: translateX(0) translateY(0);
    }
}

/* Cyber pulse animation with neon blue */
@keyframes cyberPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 191, 255, 0.5), 0 0 10px rgba(0, 153, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 191, 255, 0.8), 0 0 30px rgba(0, 153, 255, 0.6);
    }
}

.cyber-pulse {
    animation: cyberPulse 1.5s ease-in-out infinite;
}

/* Float animation with neon blue glow */
@keyframes floatGlow {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
    }
    50% {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 191, 255, 0.5);
    }
}

.float-glow {
    animation: floatGlow 3s ease-in-out infinite;
}

