/* Critical CSS - Load first */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');
@import "tailwindcss";

/* CSS Variables for better performance */
:root {
    --dark-bg: #0f0f0f;
    --dark-card: #1a1a1a;
    --dark-border: #2a2a2a;
    --dark-accent: #8b5cf6;
    --dark-accent-light: #a78bfa;
    --glass-bg: rgba(26, 26, 26, 0.7);
}

/* Base styles */
* {
    box-sizing: border-box;
}

body { 
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility classes */
.gradient-text {
    background: linear-gradient(135deg, var(--dark-accent) 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    /* Fallback for browsers that don't support background-clip */
    color: #8b5cf6;
}

/* Better gradient text support */
.gradient-text-alt {
    color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Process cards specific styling */
.process-card .glass {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.process-card .glass:hover {
    border-color: rgba(139, 92, 246, 0.6);
    background: rgba(139, 92, 246, 0.1);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glow {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
}

/* Animation classes for better performance */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Optimized hover effects */
.service-card,
.project-card,
.testimonial-card,
.about-card,
.process-card,
.pricing-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.service-card:hover,
.project-card:hover,
.testimonial-card:hover,
.about-card:hover,
.process-card:hover,
.pricing-card:hover {
    transform: translateY(-5px);
}

/* Optimized scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-accent-light);
}

/* Focus states for accessibility */
button:focus,
a:focus,
input:focus,
select:focus {
    outline: 2px solid var(--dark-accent);
    outline-offset: 2px;
}

/* Performance optimizations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .service-card:hover,
    .project-card:hover,
    .testimonial-card:hover,
    .about-card:hover,
    .process-card:hover,
    .pricing-card:hover {
        transform: none; /* Disable hover effects on mobile */
    }
}

/* Contact methods animation */
.contact-method-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.contact-method-item:nth-child(1) {
    animation-delay: 0.1s;
}

.contact-method-item:nth-child(2) {
    animation-delay: 0.2s;
}

.contact-method-item:nth-child(3) {
    animation-delay: 0.3s;
}

.contact-method-item:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 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;
    }
    
    .fade-in,
    .scale-in {
        transition: none;
    }
}
