/* ============================================
   CRITICAL CSS — Above-the-fold only
   Inlined or loaded first for fast FCP
   ============================================ */

/* --- CSS Variables --- */
:root {
    --color-primary: #1a3a5c;
    --color-primary-light: #2d5a87;
    --color-primary-dark: #0f2840;
    --color-accent: #3498db;
    --color-accent-light: #5dade2;
    --color-accent-dark: #2980b9;
    --color-secondary: #f39c12;
    --color-secondary-light: #f5b041;
    --color-white: #ffffff;
    --color-gray-50: #fafafa;
    --color-gray-100: #f5f5f5;
    --color-gray-200: #eeeeee;
    --color-gray-300: #e0e0e0;
    --color-gray-600: #757575;
    --color-gray-700: #616161;
    --color-gray-800: #424242;
    --color-gray-900: #212121;
    --font-heading: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Sora', system-ui, sans-serif;
    --font-ui: 'Montserrat', system-ui, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --radius-full: 9999px;
    --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 40px rgba(52, 152, 219, 0.3);
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-gray-800);
    background: var(--color-white);
    overflow-x: hidden;
}

/* --- Accessibility --- */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    z-index: 9999;
    font-weight: 600;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-gray-900);
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* --- Announcement Bar --- */
.announcement-bar {
    background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 50%, #0f2840 100%);
    color: var(--color-white);
    padding: var(--space-3) 0;
    padding-top: max(var(--space-3, 12px), env(safe-area-inset-top, 0));
    font-size: var(--text-sm);
    position: relative;
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    min-height: 40px;
    contain: layout;
    visibility: visible !important;
    opacity: 1 !important;
}

.announcement-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: var(--space-4);
    min-height: 28px;
}

.announcement-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    white-space: nowrap;
}

.announcement-icon {
    font-size: var(--text-lg);
    line-height: 1;
}

.announcement-text {
    font-size: var(--text-sm);
}

.announcement-text strong {
    color: var(--color-secondary);
}

.announcement-center {
    display: flex;
    align-items: center;
}

.announcement-locations {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.announcement-locations svg {
    color: var(--color-accent-light);
}

.announcement-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    white-space: nowrap;
}

.announcement-phone {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-white);
}

.announcement-phone svg {
    color: var(--color-accent-light);
}

.announcement-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.announcement-hours {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-xs);
}

/* --- Header --- */
.header {
    position: fixed;
    top: 46px;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
    background: transparent;
    min-height: 70px;
    contain: layout style;
}

.header.scrolled {
    top: 0;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    flex: 1;
    padding: 0 var(--space-8);
}

.nav-links>li {
    position: relative;
}

.nav-links>li>a {
    font-family: var(--font-ui);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    padding: var(--space-2) var(--space-3);
    position: relative;
    white-space: nowrap;
}

.nav-cta {
    padding: var(--space-2) var(--space-5);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    z-index: 1010;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
}

/* --- Buttons (above-fold CTA) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: var(--text-base);
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* --- Hero (shared) --- */
.hero {
    position: relative;
    min-height: 100svh;
    contain: layout;
    display: flex;
    align-items: center;
    padding: var(--space-24) 0 var(--space-16);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Support both bg-image div and <picture>/<img> hero */
.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 20px;
    width: 100%;
    display: grid;
    gap: var(--space-12);
    grid-template-columns: 1.5fr 1fr;
    /* Defaulting to modern 1.5fr */
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
}

.hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Correct gradient matching styles.css - prevents CLS when deferred CSS loads */
    background: linear-gradient(to bottom, rgba(8, 20, 40, 0.3) 0%, rgba(8, 20, 40, 0.55) 60%, rgba(8, 20, 40, 0.88) 100%);
}

.hero-overlay-light {
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.5) 0%, rgba(26, 58, 92, 0.3) 50%, rgba(26, 58, 92, 0.2) 100%);
}

/* --- Mobile header --- */
@media (max-width: 768px) {
    .announcement-bar {
        padding: var(--space-2) var(--space-4);
    }

    .announcement-content {
        justify-content: center;
        text-align: center;
    }

    .announcement-left {
        flex: 1;
        flex-direction: row;
        align-items: center;
        gap: var(--space-2);
    }

    .announcement-text {
        font-size: var(--text-xs);
    }

    .announcement-icon {
        font-size: var(--text-sm);
    }

    .announcement-center,
    .announcement-right {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .header {
        top: 36px;
    }
}

/* --- Desktop CLS Prevention --- */
@media (min-width: 769px) {
    .announcement-bar {
        min-height: 44px;
        contain: layout;
    }

    .header {
        min-height: 80px;
        contain: layout style;
    }

    .hero {
        min-height: 100vh;
        contain: layout;
    }

    .nav {
        min-height: 50px;
    }
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none !important;
    }

    .hero {
        padding-top: 140px;
    }
}