/* Performance Optimization CSS */

/* Critical CSS - Load first */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* Lazy loading optimization */
img {
    loading: lazy;
    display: block;
}

/* Reduce CLS (Cumulative Layout Shift) */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Font optimization */
@font-face {
    font-family: 'Inter';
    font-display: swap;
}

/* Smooth transitions without performance impact */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode optimization */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #f1f5f9;
    }
}

/* Print optimization */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none;
    }
}
