/* ============================================
   CRITICAL CSS - Above-the-fold styles only
   Setiawan Group - Phase 1 Optimization
   ============================================ */

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

/* Critical Variables */
:root {
    --primary-700: #36454F;
    --primary-900: #102a43;
    --secondary-700: #1560BD;
    --neutral-50: #ffffff;
    --neutral-800: #3B3C36;
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-2xl: 1.5rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;
    --font-bold: 700;
    --font-extrabold: 800;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --radius-lg: 0.5rem;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Typography - Critical */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--neutral-800);
    background-color: var(--neutral-50);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: 1.2;
    color: var(--primary-700);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
}

/* Navigation - Critical for UX */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1030;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: var(--font-bold);
    color: var(--primary-700);
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-700), #0d47a1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-800);
    padding: var(--space-2) 0;
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.nav-link.active,
.nav-link:hover {
    color: var(--secondary-700);
}

/* Page Header - Critical for LCP */
.page-header {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 100%);
    overflow: hidden;
    margin-top: 80px;
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--space-16) var(--space-6);
}

.page-title {
    font-size: var(--text-6xl);
    font-weight: var(--font-extrabold);
    color: white;
    margin-bottom: var(--space-4);
}

.page-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* Buttons - Critical for interaction */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: white;
    color: var(--primary-700);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Skip Link - Critical for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-700);
    color: white;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* Enhanced Focus Management */
.focus-visible:focus-visible {
    outline: 3px solid var(--secondary-700);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* High contrast focus for better accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--secondary-700);
    outline-offset: 2px;
}

/* Mobile Navigation Toggle - Critical */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: var(--space-2);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-700);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

/* Container - Critical layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Responsive - Critical breakpoints */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: var(--space-4);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .page-title {
        font-size: var(--text-4xl);
    }

    .container {
        padding: 0 1rem;
    }
}