
/* CVG Performance Optimized CSS - Core Web Vitals Enhanced */

/* Critical CSS for above-the-fold content */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font display optimization for LCP */
@font-face {
    font-family: 'CVG-Primary';
    font-display: swap; /* Improves LCP */
    src: url('data:,'); /* Fallback */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 100vh;
    
    /* Performance optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Container with performance considerations */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    
    /* CLS prevention */
    contain: layout style;
}

/* Performance-optimized cards */
.platform-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Button optimizations for FID */
.btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    
    /* Performance optimizations */
    will-change: transform;
    transition: all 0.2s ease; /* Shorter transition for better FID */
    touch-action: manipulation; /* Improves mobile responsiveness */
}

.btn:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Lazy loading image optimization */
.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .platform-card {
        margin: 0.5rem 0;
        padding: 1.5rem;
    }
    
    /* Reduce animations on mobile for performance */
    .platform-card:hover {
        transform: none;
    }
}

/* Critical performance CSS for LCP optimization */
h1, .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    
    /* LCP optimization */
    font-display: swap;
}

/* Prevent CLS with proper sizing */
img, video {
    height: auto;
    max-width: 100%;
}

/* Performance-optimized animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.6s ease-out;
}
