/* Critical CSS - Inline this for faster initial render */

/* Reset and base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent layout shift */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation critical styles */
nav {
    background: var(--white);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    contain: layout style;
}

/* Hero section above fold */
.hero {
    padding: 120px 0 80px;
    min-height: 100vh;
}

/* Prevent animation jank */
.animate-on-scroll,
.animate-left,
.animate-right {
    opacity: 0;
    transform: translateY(0);
}

.animate-on-scroll.visible,
.animate-left.visible,
.animate-right.visible {
    opacity: 1;
}

/* Disable animations during scroll */
body.scrolling * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent FOUC */
.invisible {
    visibility: hidden;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    /* Disable complex animations on mobile */
    .animate-on-scroll,
    .animate-left,
    .animate-right {
        opacity: 1 !important;
        transform: none !important;
    }
}