/* Critical CSS - Above the fold content only */
:root {
    --primary-blue: #0066cc;
    --secondary-teal: #00a8cc;
    --gradient-blue: linear-gradient(135deg, #0066cc 0%, #0080ff 100%);
    --transition-fast: all 0.2s ease;
    --transition-smooth: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Loading state styles - Prevent FOUC */
html {
    visibility: hidden;
}

html.loaded,
html:not(.loading) {
    visibility: visible !important;
}

body {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

html.loaded body,
body.loaded {
    opacity: 1 !important;
    visibility: visible !important;
}

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: #1f2937;
    line-height: 1.6;
    overflow-x: hidden;
    visibility: visible !important;
    opacity: 1 !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

/* Navigation - Critical */
.nav-glass {
    background: linear-gradient(to left, #006BFF, #ffffff);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
}

/* Hero Section - Critical */
.hero-content-box {
    background: rgba(248, 251, 255, 0.95);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12), 0 8px 25px rgba(59, 130, 246, 0.08);
    position: relative;
    overflow: hidden;
    color: #0E1E2E;
}

/* Mobile Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
}

.hamburger-box {
    width: 20px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-inner {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 1px;
    transition: all 0.3s ease;
    left: 0;
}

.hamburger-inner::before {
    top: -7px;
}

.hamburger-inner::after {
    top: 7px;
}

/* Hamburger animation states */
.hamburger-menu.active .hamburger-inner {
    background: transparent;
}

.hamburger-menu.active .hamburger-inner::before {
    transform: rotate(45deg);
    top: 0;
}

.hamburger-menu.active .hamburger-inner::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    /* Fix hero section mobile */
    .hero-content-box {
        margin: 1rem;
        padding: 1.5rem !important;
        border-radius: 20px;
    }
    
    /* Fix text sizes mobile */
    .text-6xl {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }
    
    .text-5xl {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    /* Fix navigation mobile */
    .nav-glass {
        padding: 1rem 0.5rem;
    }
    
    /* Fix mobile menu */
    .mobile-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: linear-gradient(to left, #006BFF, #ffffff) !important;
        margin: 0;
        border-radius: 0;
        z-index: 1000;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
    }
    
    .mobile-menu.active {
        transform: translateY(0);
        opacity: 1;
        display: block !important;
    }
    
    /* Fix overlapping content */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix grid layouts */
    .grid {
        gap: 1rem;
    }
    
    /* Fix spacing */
    .space-y-8 > * + * {
        margin-top: 1rem;
    }
    
    .space-y-6 > * + * {
        margin-top: 0.75rem;
    }
    
    /* Fix buttons mobile */
    .btn-modern,
    .btn-metallic {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    
    /* Fix cards mobile */
    .modern-card,
    .industrial-card,
    .glassmorphism-card {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    /* Fix images mobile */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix logo mobile */
    .h-24 {
        height: 3rem;
    }
    
    /* Disable heavy animations on mobile */
    * {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Fix overflow issues */
    .overflow-hidden {
        overflow: visible;
    }
    
    /* Fix section padding mobile */
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Fix footer white circles on mobile */
    footer .absolute {
        display: none !important;
    }
    
    footer .opacity-10,
    footer .opacity-5 {
        display: none !important;
    }
    
    /* Fix mobile menu positioning */
    .mobile-menu {
        top: 70px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    /* Fix mobile navigation spacing */
    .container.mx-auto.px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix mobile hero section */
    .min-h-screen {
        min-height: 100vh;
        padding-top: 80px;
    }
    
    /* Fix mobile text alignment */
    .text-center.lg\:text-left {
        text-align: center !important;
    }
    
    /* Fix mobile button layout */
    .flex.flex-col.sm\:flex-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Fix mobile grid layouts */
    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.lg\:grid-cols-2,
    .grid.lg\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Fix mobile spacing issues */
    .space-x-12 > * + * {
        margin-left: 0;
    }
    
    .space-x-6 > * + * {
        margin-left: 0;
    }
    
    .space-x-3 > * + * {
        margin-left: 0;
    }
}