/* CRITICAL CSS - Inlined for fastest rendering */
/* Only styles needed for above-the-fold content */

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

/* CSS Variables - Always needed */
:root {
    --primary-color: #4A90E2;
    --secondary-color: #1a1a1a;
    --accent-color: #3a7bc8;
    --text-light: #f8f9fa;
    --text-dark: #2c2c2c;
    --background-light: #fafafa;
    --background-dark: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, #4A90E2 0%, #667eea 100%);
    --gradient-dark: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    --shadow-blue: 0 10px 30px rgba(74, 144, 226, 0.3);
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Essential Body Styles */
body {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--background-light);
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Critical Navigation Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 90px;
    padding: 0.5rem 3rem;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    background: transparent;
    backdrop-filter: blur(0);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-logo h2 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.6rem;
    text-shadow: none;
    letter-spacing: -0.5px;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap;
    transition: color 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Compact navbar before mobile breakpoint */
@media (max-width: 1167px) {
    .navbar {
        padding: 0.5rem 1.5rem;
        min-height: 84px;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.95rem;
        letter-spacing: 0.3px;
        padding-bottom: 4px;
    }
}

/* Extra compact before mobile */
@media (max-width: 973px) {
    .navbar {
        padding: 0.5rem 1rem;
        min-height: 80px;
        justify-content: flex-start;
    }

    .nav-menu {
        gap: 0.8rem;
        margin-left: 0.5rem;
    }

    .nav-link {
        font-size: 0.9rem;
        letter-spacing: 0.2px;
        padding-bottom: 3px;
    }
}

/* Even tighter just above mobile */
@media (max-width: 878px) {
    .nav-menu {
        gap: 0.7rem;
    }
    .nav-link {
        font-size: 0.88rem;
        letter-spacing: 0.15px;
    }
}

/* Essential CTA Button for Hero */
.cta-button {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--text-light);
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Navigation - Critical */
@media (max-width: 845px) {
    .navbar {
        padding: 0.5rem 1rem;
        min-height: 70px;
        justify-content: space-between; /* restore mobile alignment */
    }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        margin-left: auto; /* keep on right */
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        margin-left: 0; /* reset offset */
    }
    
    .nav-menu.active {
        left: 0;
    }
}

.hamburger {
    display: none;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Index page: white hamburger only at top */
body.index-page .navbar:not(.scrolled) .bar {
    background: #fff;
}
body.index-page .navbar.scrolled .bar {
    background: var(--secondary-color);
}

/* Ensure hamburger shows on small screens even when this file loads last */
@media (max-width: 845px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }
}
