/* 
 * Connect Information Technology - Enhanced Animations
 * Premium Motion Design System
 */

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */

/* Fade In Up - Main scroll animation */
.fade-in-up {
    opacity: 1;
    /* Default visible for SEO/No-JS */
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only hide if JS is running */
body.js-enabled .fade-in-up {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in-up.visible,
body.js-enabled .fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Fade In Left */
.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.visible,
body.js-enabled .fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Right */
.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.visible,
body.js-enabled .fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In */
/* Scale In */
.scale-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.js-enabled .scale-in {
    opacity: 0;
    transform: scale(0.9);
}

.scale-in.visible,
body.js-enabled .scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for sequential animations */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* =========================================
   CONTINUOUS ANIMATIONS
   ========================================= */

/* Float Animation - Smooth up and down */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Gentle Bounce */
@keyframes gentle-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: gentle-bounce 2s ease-in-out infinite;
}

/* Pulse Glow - Glowing effect */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(0, 102, 204, 0);
    }
}

.animate-pulse {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

/* Pulse Scale - Breathing effect */
@keyframes pulse-scale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-scale {
    animation: pulse-scale 3s ease-in-out infinite;
}

/* Rotate - Continuous rotation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-rotate {
    animation: rotate 20s linear infinite;
}

/* Spin - Fast rotation (for loaders) */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Shimmer - Shine effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.animate-shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}

/* Gradient Animation */
@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Wiggle - Attention grabber */
@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-3deg);
    }

    75% {
        transform: rotate(3deg);
    }
}

.animate-wiggle {
    animation: wiggle 0.5s ease-in-out;
}

/* Shake - Alert animation */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.6s ease-in-out;
}

/* =========================================
   LOADING ANIMATIONS
   ========================================= */

/* Loader - Spinning circle */
.loader {
    border: 3px solid rgba(0, 102, 204, 0.1);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loader-sm {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.loader-lg {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

/* Dots Loader */
@keyframes dots-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.dots-loader {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.dots-loader span {
    width: 12px;
    height: 12px;
    background: var(--primary-blue);
    border-radius: 50%;
    animation: dots-bounce 1.4s infinite ease-in-out;
}

.dots-loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.dots-loader span:nth-child(2) {
    animation-delay: -0.16s;
}

/* =========================================
   HOVER EFFECTS
   ========================================= */

/* Lift on hover */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

/* Grow on hover */
.hover-grow {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-grow:hover {
    transform: scale(1.05);
}

/* Glow on hover */
.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.4);
}

/* =========================================
   ENTRANCE ANIMATIONS
   ========================================= */

/* Slide In from Bottom */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in-bottom {
    animation: slideInBottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Slide In from Top */
@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-in-top {
    animation: slideInTop 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom-in {
    animation: zoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-in;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */

/* Pause animation on hover */
.pause-on-hover:hover {
    animation-play-state: paused;
}

/* Smooth transitions */
.transition-all {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.transition-fast {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-slow {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 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;
    }
}