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

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

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

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Utility Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease-out;
}

.animate-count-up {
    animation: countUp 1s ease-out forwards;
}

/* Intersection Observer Classes */
.reveal {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
}

/* Parallax Effect */
.parallax {
    transform: translateY(var(--parallax-offset, 0));
    transition: transform 0.1s ease-out;
    will-change: transform;
}

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

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Hover Effects */
.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-8px);
}

.hover-grow {
    transition: all 0.3s ease;
}

.hover-grow:hover {
    transform: scale(1.03);
}

/* Button Interactions */
.btn-pulse {
    position: relative;
    overflow: hidden;
}

.btn-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease-out, height 0.6s ease-out;
}

.btn-pulse:active::after {
    width: 200%;
    height: 200%;
    opacity: 0;
}

/* Form Field Animations */
@keyframes fieldFocus {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

.form-field {
    position: relative;
}

.form-field::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #3B82F6;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.form-field:focus-within::after {
    transform: translateX(-50%) scaleX(1);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 3D Tilt Effect */
.tilt {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-inner {
    transform: translateZ(20px);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #3B82F6, #60A5FA);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Page Transition Overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #3B82F6;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.86, 0, 0.07, 1);
    z-index: 9999;
}

.page-transition-overlay.active {
    transform: scaleY(1);
    transform-origin: top;
}

/* Loading States */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.content-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(190, 190, 190, 0.2) 25%,
        rgba(129, 129, 129, 0.24) 37%,
        rgba(190, 190, 190, 0.2) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Mobile-optimized animations */
@media (max-width: 768px) {
    .hover-float:hover {
        transform: none;
    }
    
    .tilt {
        transform: none !important;
    }
    
    .tilt-inner {
        transform: none !important;
    }
    
    .card-hover:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .reveal-up {
        transform: translateY(15px);
    }
}

/* Enhanced Parallax for different sections */
.parallax-slow { --parallax-speed: 0.3; }
.parallax-medium { --parallax-speed: 0.5; }
.parallax-fast { --parallax-speed: 0.7; }

/* Interactive Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #3B82F6;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    display: none;
}

@media (min-width: 1024px) {
    .custom-cursor {
        display: block;
    }
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.21, 0.39, 0.39, 1.37);
} 