/* ==========================================================================
   KIA SOLUTIONS — GLOBAL HOME PAGE (EXPERIMENT-01)
   MAIN DESIGN SYSTEM & BASE STYLES
   ========================================================================== */

:root {
    /* Brand Palette */
    --deep-forest: #0B211D;
    --deep-navy: #0C2340;
    --graphite: #171C1B;
    --charcoal: #242A27;
    --kia-teal: #1D9E75;
    --kia-teal-glow: rgba(29, 158, 117, 0.35);
    --soft-mint: #A9D6B7;
    --warm-amber: #E5B272;
    --amber-glow: rgba(229, 178, 114, 0.16);
    --warm-white: #F4F5EF;
    --pure-white: #FFFFFF;
    --muted-slate: #94A3B8;
    --text-body: #CBD5E1;

    /* Frosted Glass Tokens (Refinement 03) */
    --glass-bg: linear-gradient(145deg, rgba(22, 30, 28, 0.65) 0%, rgba(12, 18, 16, 0.78) 100%);
    --glass-bg-subtle: linear-gradient(145deg, rgba(20, 28, 26, 0.42) 0%, rgba(11, 16, 15, 0.52) 100%);
    --glass-bg-hover: linear-gradient(145deg, rgba(26, 38, 34, 0.78) 0%, rgba(14, 22, 19, 0.88) 100%);
    --glass-blur: blur(22px) saturate(145%);
    --glass-border: 1px solid rgba(255, 255, 255, 0.09);
    --glass-border-highlight: 1px solid rgba(169, 214, 183, 0.28);
    --glass-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);

    /* Typography */
    --font-heading: 'Manrope', sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--graphite);
}

body {
    background-color: var(--graphite);
    color: var(--text-body);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Atmospheric Ambient Lighting Behind Sections */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(140px);
    opacity: 0.35;
}
.ambient-teal {
    width: 600px;
    height: 600px;
    top: 30%;
    left: -150px;
    background: radial-gradient(circle, var(--kia-teal-glow) 0%, transparent 70%);
}
.ambient-navy {
    width: 700px;
    height: 700px;
    bottom: 20%;
    right: -150px;
    background: radial-gradient(circle, rgba(12, 35, 64, 0.45) 0%, transparent 70%);
}

/* ==========================================================================
   GLOBAL NAVIGATION (EDGE-TO-EDGE REAL FROSTED GLASS BAR)
   ========================================================================== */
.global-nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    display: flex;
    align-items: center;
    z-index: 1000;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-capsule {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    border-radius: 0;
    /* 75% transparent real glass look: alpha 0.25 (25% opacity = 75% transparency) */
    background: linear-gradient(180deg, rgba(20, 26, 24, 0.25) 0%, rgba(11, 16, 15, 0.28) 100%);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-nav-container.scrolled .nav-capsule {
    /* 70% transparency on scroll for subtle grounding while retaining clear glass feel */
    background: linear-gradient(180deg, rgba(14, 25, 22, 0.32) 0%, rgba(9, 17, 15, 0.38) 100%);
    border-bottom: 1px solid rgba(29, 158, 117, 0.30);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.nav-brand img {
    height: 38px;
    width: auto;
}
.brand-titles {
    display: flex;
    flex-direction: column;
}
.brand-name {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: var(--warm-white);
    letter-spacing: 1.5px;
}
.brand-sub {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--soft-mint);
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    list-style: none;
}
.nav-links a {
    color: var(--warm-white);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--soft-mint);
}
.external-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    transition: all 0.3s ease;
}
.external-link-pill:hover {
    background: rgba(29, 158, 117, 0.18);
    border-color: var(--kia-teal);
    border-top-color: var(--soft-mint);
}

.nav-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(29, 158, 117, 0.85) 0%, rgba(15, 60, 48, 0.95) 100%);
    border: 1px solid rgba(169, 214, 183, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--warm-white);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.35s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.nav-cta-btn:hover {
    background: linear-gradient(135deg, rgba(29, 158, 117, 1) 0%, rgba(18, 90, 70, 1) 100%);
    border-top-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 22px rgba(29, 158, 117, 0.45);
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    transition: background 0.3s ease, border-color 0.3s ease;
}
.mobile-toggle span {
    display: block;
    width: 20px;
    height: 1.8px;
    background: var(--warm-white);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
.mobile-toggle.is-active {
    background: rgba(29, 158, 117, 0.16);
    border-color: rgba(169, 214, 183, 0.35);
}
.mobile-toggle.is-active span:nth-child(1) {
    transform: translateY(6.8px) rotate(45deg);
}
.mobile-toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-toggle.is-active span:nth-child(3) {
    transform: translateY(-6.8px) rotate(-45deg);
}

.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(11, 21, 18, 0.94) 0%, rgba(8, 14, 13, 0.98) 100%);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-bottom: 1px solid rgba(169, 214, 183, 0.18);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.65);
    border-radius: 0;
    padding: 20px 20px 28px 20px;
    z-index: 999;
}
.mobile-menu-drawer.open {
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: mobileDrawerReveal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes mobileDrawerReveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.mobile-menu-drawer a {
    color: var(--warm-white);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 12px;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.25s ease, border-color 0.25s ease;
}
.mobile-menu-drawer a:active {
    background: rgba(29, 158, 117, 0.14);
    border-color: rgba(169, 214, 183, 0.28);
}
.mobile-menu-drawer a:last-child {
    margin-top: 8px;
    text-align: center;
    background: linear-gradient(135deg, var(--kia-teal) 0%, #137254 100%);
    border: 1px solid rgba(169, 214, 183, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 14px 18px;
    font-size: 14px;
    letter-spacing: 0.4px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 960px) {
    .nav-links, .nav-cta-btn {
        display: none;
    }
    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    :root {
        --glass-blur: blur(10px) saturate(130%);
    }
    .nav-capsule {
        backdrop-filter: blur(8px) saturate(130%);
        -webkit-backdrop-filter: blur(8px) saturate(130%);
    }
    /* Eliminate expensive 140px fixed software blur on mobile; radial gradient remains soft */
    .ambient-glow {
        filter: none;
        opacity: 0.28;
    }
}

@media (max-width: 480px) {
    .global-nav-container {
        height: 64px;
    }
    .mobile-menu-drawer {
        top: 64px;
    }
    .nav-capsule {
        padding: 0 16px;
    }
    .nav-brand {
        gap: 10px;
    }
    .nav-brand img {
        height: 32px;
    }
    .brand-name {
        font-size: 15px;
        letter-spacing: 1.2px;
    }
    .brand-sub {
        font-size: 8px;
        letter-spacing: 1.6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .global-nav-container,
    .nav-capsule,
    .nav-links a,
    .external-link-pill,
    .nav-cta-btn,
    .mobile-toggle,
    .mobile-toggle span,
    .mobile-menu-drawer.open {
        transition: none !important;
        animation: none !important;
    }
}
