/* VoidSEO Premium Animations & Micro-interactions */
/* Week 4: Final polish for startup pitch */

/* Smooth page transitions */
* {
    transition: all 0.2s ease;
}

/* Hero animations */
.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-content h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content .hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-content .btn {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Card hover effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 255, 153, 0.1);
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 153, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Navigation animations */
.nav-links a {
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--void-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Testimonial cards animation */
.testimonials .card {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease-out forwards;
}

.testimonials .card:nth-child(1) { animation-delay: 0.1s; }
.testimonials .card:nth-child(2) { animation-delay: 0.2s; }
.testimonials .card:nth-child(3) { animation-delay: 0.3s; }

/* Metrics counter animation */
.metric-number {
    font-family: var(--font-mono);
    font-weight: bold;
    animation: countUp 1.5s ease-out;
}

/* VOID Loop steps animation */
.void-steps-grid .card {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.5s ease-out forwards;
}

.void-steps-grid .card:nth-child(1) { animation-delay: 0.1s; }
.void-steps-grid .card:nth-child(2) { animation-delay: 0.2s; }
.void-steps-grid .card:nth-child(3) { animation-delay: 0.3s; }
.void-steps-grid .card:nth-child(4) { animation-delay: 0.4s; }

/* Progress bar animation */
.progress-fill {
    animation: progressFill 2s ease-out;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 153, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* Pulse effect for CTAs */
.pulse {
    animation: pulse 2s infinite;
}

/* Typing effect for hero text */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--void-accent);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(45deg, var(--void-accent), var(--void-blue), var(--void-orange));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes countUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: var(--progress-width, 23%);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 153, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 153, 0);
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--void-accent);
    }
}

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

/* Responsive animations */
@media (max-width: 768px) {
    .card:hover {
        transform: translateY(-4px);
    }
    
    .btn:hover {
        transform: translateY(-1px);
    }
    
    /* Reduce motion for mobile */
    .hero-content,
    .hero-content h1,
    .hero-content .hero-subtitle,
    .hero-content .btn {
        animation-duration: 0.5s;
    }
}

/* 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;
    }
}

/* Performance optimizations */
.card,
.btn,
.nav-links a {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.btn:focus,
.nav-links a:focus {
    outline: 2px solid var(--void-accent);
    outline-offset: 2px;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--void-gray);
    border-top: 4px solid var(--void-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
