/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Apply animations to elements */
.hero-title {
    animation: fadeIn 1s ease-out;
}

.hero-subtitle {
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.hero-cta {
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.hero-stats {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.feature-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.features-grid .feature-card:nth-child(1) {
    animation-delay: 0.2s;
}

.features-grid .feature-card:nth-child(2) {
    animation-delay: 0.4s;
}

.features-grid .feature-card:nth-child(3) {
    animation-delay: 0.6s;
}

.features-grid .feature-card:nth-child(4) {
    animation-delay: 0.8s;
}

.step {
    animation: fadeIn 0.6s ease-out backwards;
}

.steps-container .step:nth-child(1) {
    animation-delay: 0.2s;
}

.steps-container .step:nth-child(2) {
    animation-delay: 0.4s;
}

.steps-container .step:nth-child(3) {
    animation-delay: 0.6s;
}

.steps-container .step:nth-child(4) {
    animation-delay: 0.8s;
}

/* Hover Animations */
.primary-button:hover {
    animation: pulse 1s infinite;
}

.feature-card:hover .feature-icon {
    animation: pulse 0.5s ease-in-out;
}

/* Loading Animation */
.loading {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.1)
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Animations */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Form Input Animations */
.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

/* Success Message Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    animation: slideInUp 0.5s ease-out;
}

/* Error Message Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.error-message {
    animation: shake 0.5s ease-in-out;
}

/* Scroll to Top Button Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-to-top {
    animation: fadeInUp 0.3s ease-out;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease-out;
}

/* Stats Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 1s ease-out backwards;
}

/* Progressive Loading Animation */
.progressive-load {
    transition: filter 0.5s ease-out;
}

.progressive-load.loaded {
    filter: blur(0);
}

/* Custom Cursor Animation */
@keyframes cursorPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.custom-cursor {
    animation: cursorPulse 2s infinite;
}