/* =========================================
   KeyMetrics - Enterprise UI System
   Executive Luxury & Corporate Elite Themes
   ========================================= */

[data-theme="dark"] {
    --bg-dark: #0B0F19;
    --bg-surface: #151B2C;
    --bg-surface-glass: rgba(21, 27, 44, 0.85);
    --bg-elevated: #222B45;
    
    --brand-primary: #BF953F;
    --brand-gradient: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
    --brand-glow: rgba(191, 149, 63, 0.15);
    
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-button: #111827;
    
    --border-subtle: #222B45;
    --border-light: rgba(34, 43, 69, 0.8);
    --glass-border: rgba(191, 149, 63, 0.2);

    /* KPI Strict Colors */
    --kpi-green: #10B981;
    --kpi-orange: #F59E0B;
    --kpi-red: #EF4444;
}

[data-theme="light"] {
    --bg-dark: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-surface-glass: rgba(255, 255, 255, 0.95);
    --bg-elevated: #F1F5F9;
    
    --brand-primary: #C5A880;
    --brand-gradient: linear-gradient(135deg, #E5BA73 0%, #C5A880 50%, #E8D2A6 100%);
    --brand-glow: rgba(197, 168, 128, 0.1);
    
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #94A3B8;
    --text-button: #0F172A;
    
    --border-subtle: #E2E8F0;
    --border-light: #CBD5E1;
    --glass-border: rgba(229, 186, 115, 0.3);

    /* KPI Strict Colors */
    --kpi-green: #22C55E;
    --kpi-orange: #EAB308;
    --kpi-red: #EF4444;
}

:root {
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background-color: transparent;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    line-height: 1.2; 
    color: var(--text-primary); 
    letter-spacing: -0.02em;
}

.text-gradient { 
    background: var(--brand-gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: var(--bg-dark);
    transition: background-color var(--transition-normal);
    pointer-events: none;
}
.bg-shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
}
.bg-shape-1 {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    background: var(--brand-primary);
    top: -10%;
    inset-inline-start: -10%;
    animation: floatShape1 8s infinite ease-in-out alternate;
}
.bg-shape-2 {
    width: 50vw;
    height: 50vw;
    max-width: 700px;
    max-height: 700px;
    background: var(--kpi-green);
    bottom: -10%;
    inset-inline-end: -10%;
    opacity: 0.3;
    animation: floatShape2 10s infinite ease-in-out alternate;
}
.bg-shape-3 {
    width: 30vw;
    height: 30vw;
    max-width: 400px;
    max-height: 400px;
    background: var(--brand-primary);
    top: 40%;
    inset-inline-start: 40%;
    opacity: 0.5;
    animation: floatShape3 14s infinite ease-in-out alternate;
}

@keyframes floatShape1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30vw, 20vh) scale(1.2); }
}
@keyframes floatShape2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30vw, -20vh) scale(0.8); }
}
@keyframes floatShape3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20vw, 30vh) scale(1.3); }
}

/* Layout Utilities */
.container { max-width: 1320px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 8rem 0; position: relative; z-index: 2; }
.section-header { text-align: center; margin-bottom: 5rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.section-title { font-size: 2.75rem; margin-bottom: 1.25rem; }
.section-desc { color: var(--text-secondary); font-size: 1.15rem; line-height: 1.7; }

/* Navigation */
.navbar { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    background: var(--bg-surface-glass); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border-light); 
    padding: 1rem 0; 
    z-index: 100; 
    transition: var(--transition-normal); 
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-icon { 
    display: flex; align-items: center; justify-content: center; 
    width: 36px; height: 36px; 
    background: var(--brand-gradient); 
    border-radius: var(--radius-md); 
    color: var(--text-button); 
    font-size: 1.25rem; 
}
.brand-text { font-size: 1.2rem; font-weight: 800; color: var(--text-primary); letter-spacing: 0.05em; }

.nav-links { display: flex; gap: 2.5rem; }
.nav-link { 
    color: var(--text-secondary); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: var(--transition-fast); 
    display: flex;
}
.nav-link i { display: none; }
.nav-link:hover { color: var(--text-primary); }

.nav-actions { display: flex; align-items: center; gap: 1.5rem; }
.user-avatar {
    width: 36px; height: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary);
}

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-dropdown {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    margin-top: 0.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.lang-dropdown a:hover, .lang-dropdown a.active {
    background: var(--bg-elevated);
    color: var(--brand-primary);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 1.1rem;
    inset-inline-end: 1.5rem;
    z-index: 101;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.5rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

/* Mobile Nav Open State */
.nav-links.nav-open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn { 
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; 
    padding: 0.75rem 1.5rem; 
    border-radius: var(--radius-md); 
    font-family: var(--font-body); 
    font-weight: 600; font-size: 0.95rem; 
    cursor: pointer; text-decoration: none; 
    transition: var(--transition-fast); 
    border: 1px solid transparent; 
}
.btn-lg { padding: 1.25rem 2.5rem; font-size: 1.05rem; }
.btn-primary { 
    background: var(--brand-gradient); 
    color: var(--text-button); 
    box-shadow: 0 4px 15px var(--brand-glow); 
    border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px var(--brand-glow); }
.btn-outline { 
    background: transparent; 
    border: 1px solid var(--brand-primary); 
    color: var(--brand-primary); 
}
.btn-outline:hover { background: rgba(191, 149, 63, 0.05); }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); background: transparent; border: 1px solid var(--border-subtle); color: var(--text-secondary); cursor: pointer; }
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-light); }
.btn-nav-login { padding: 0.5rem 1rem; font-size: 0.85rem; gap: 0.4rem; }
.btn-nav-login i { font-size: 1rem; }

/* Hero Section */
.hero { 
    padding-top: 12rem; padding-bottom: 6rem;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-content { max-width: 900px; margin: 0 auto; }
.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.hero-title { font-size: 4rem; line-height: 1.15; margin-bottom: 2rem; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 3.5rem; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.7; }
.hero-cta { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* Executive Statistics Strip */
.stats-strip {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: 4rem 0;
    margin-top: 4rem;
}
.stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
    text-align: center;
}
.stat-card { padding: 0 2rem; border-inline-end: 1px solid var(--border-subtle); }
.stat-card:last-child { border-inline-end: none; }
.stat-value { 
    font-size: 3.5rem; font-weight: 800; margin-bottom: 0.5rem; 
    background: var(--brand-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 1.05rem; color: var(--text-secondary); font-weight: 500; }

/* Architecture Map Layout */
.architecture-map { 
    margin-top: 3rem; 
    position: relative;
}
.map-section-title {
    text-align: center;
    color: var(--brand-primary);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.map-lifecycle { 
    display: flex; 
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem; 
}
.map-node-container { 
    flex: 1;
    aspect-ratio: 1 / 1;
    perspective: 1000px;
    position: relative;
    z-index: 2;
}
.map-node-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    border-radius: 50%;
}
.map-node-container:hover .map-node-inner,
.map-node-container.flipped .map-node-inner {
    transform: rotateY(180deg);
}
.map-node-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid rgba(191, 149, 63, 0.2);
    box-shadow: inset 0 0 20px rgba(191, 149, 63, 0.05), 0 10px 20px rgba(0,0,0,0.2);
    transition: var(--transition-normal);
}

.map-node-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    transform: rotateY(180deg);
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(191, 149, 63, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition-normal);
}

.map-node-container:hover .map-node-front,
.map-node-container:hover .map-node-back {
    border-color: rgba(191, 149, 63, 0.8);
    box-shadow: 0 0 25px rgba(191, 149, 63, 0.2), inset 0 0 15px rgba(191, 149, 63, 0.1); 
}

.module-icon { 
    width: 60px; height: 60px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.8rem; color: #0B0F19; 
    border: none;
    border-radius: 50%;
    background: var(--brand-gradient);
    margin-bottom: 1rem; 
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(191, 149, 63, 0.3);
}

.map-node-front h3 { font-size: 0.95rem; margin-bottom: 0; font-weight: 700; color: #E2E8F0; }
.map-node-back p { 
    color: var(--text-secondary); 
    font-size: 0.75rem; 
    line-height: 1.6; 
    margin: 0; 
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.map-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-size: 2rem;
    opacity: 0.7;
}

[dir="rtl"] .rtl-flip {
    transform: scaleX(-1);
}

.map-connection-down {
    display: flex;
    justify-content: center;
    gap: 6rem;
    padding: 2rem 0;
    color: var(--border-light);
    font-size: 2rem;
}

.map-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* Sub-Systems Section */
.subsystems-section {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}
.subsystems-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.subsystem-card {
    padding: 2rem 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}
.subsystem-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.subsystem-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: var(--brand-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}
.subsystem-card h4 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.subsystem-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; }

/* Architecture Strip */
.arch-strip {
    padding: 5rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-dark);
}
.arch-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem;
    text-align: center;
}
.arch-item i {
    font-size: 2rem;
    color: var(--brand-primary);
    margin-bottom: 1rem;
    display: block;
}
.arch-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.arch-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Dashboard Widget Preview */
.dashboard-preview { margin-top: 4rem; padding: 0 2rem; }
.mockup-window {
    background: #151B2C;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    max-width: 1000px; margin: 0 auto;
}
.mockup-header { 
    padding: 1.25rem 2rem; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    display: flex; justify-content: space-between; align-items: center;
}
.mockup-header h4 { font-size: 1rem; color: #E2E8F0; }
.mockup-body { padding: 3rem 2rem; display: flex; gap: 2rem; align-items: flex-end; height: 350px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem; height: 100%; }
.bar-container { flex: 1; display: flex; align-items: flex-end; background: rgba(255,255,255,0.02); border-radius: var(--radius-sm); position: relative; }
.bar-fill { width: 100%; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.bar-val { position: absolute; top: -25px; width: 100%; text-align: center; font-size: 0.85rem; color: #94A3B8; font-weight: 600; }
.chart-label { text-align: center; font-size: 0.85rem; color: #64748B; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); }
.mockup-dots { color: var(--text-muted); }
.dashboard-screenshot {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: cover;
}
.mockup-body:has(.dashboard-screenshot) {
    padding: 0;
    height: auto;
}

/* Final CTA */
.final-cta { 
    max-width: 800px; margin: 8rem auto; text-align: center; 
    padding: 5rem 4rem; 
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    position: relative;
}
.final-cta::before {
    content: ''; position: absolute; top: 0; inset-inline-start: 0; width: 100%; height: 4px;
    background: var(--brand-gradient); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.final-cta h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.final-cta p { color: var(--text-secondary); font-size: 1.15rem; margin-bottom: 3rem; }
.cta-form { display: flex; gap: 1rem; max-width: 500px; margin: 0 auto; }
.cta-form input { 
    flex: 1; padding: 1rem 1.5rem; 
    background: var(--bg-elevated); 
    border: 1px solid var(--border-light); 
    border-radius: var(--radius-md); 
    color: var(--text-primary); font-family: var(--font-body); font-size: 1rem;
    outline: none;
}
.cta-form input:focus { border-color: var(--brand-primary); }
.cta-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1.5rem;
    font-style: italic;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: var(--text-button);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 100;
    box-shadow: 0 4px 15px var(--brand-glow);
}
[dir="rtl"] .back-to-top {
    right: auto;
    left: 2rem;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--brand-glow);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}
.preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer utility classes (replacing inline styles) */
.footer-tagline {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Animations */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* Footer Override */
.site-footer { border-top: 1px solid var(--border-light); padding: 4rem 0 2rem; background: var(--bg-dark); position: relative; z-index: 2; }

/* ========== RESPONSIVE ========== */

@media (max-width: 1200px) {
    .map-lifecycle { flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
    .map-node-container { min-width: 200px; max-width: 320px; width: 100%; }
    .map-arrow { display: none; }
    .map-pillars { grid-template-columns: repeat(2, 1fr); justify-items: center; gap: 1.5rem; }
    .subsystems-grid { grid-template-columns: repeat(2, 1fr); }
    .arch-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    .hero-title { font-size: 3rem; }
    .stats-grid { grid-template-columns: 1fr; gap: 3rem; }
    .stat-card { border-inline-end: none; border-bottom: 1px solid var(--border-subtle); padding-bottom: 3rem; }
    .stat-card:last-child { border-bottom: none; padding-bottom: 0; }
    .cta-form { flex-direction: column; }
    
    /* Remove backdrop-filter from navbar so position:fixed works for children */
    .navbar { 
        backdrop-filter: none !important; 
        -webkit-backdrop-filter: none !important; 
        background: var(--bg-surface); /* Solid background on mobile */
    }
    
    /* Clean up top navbar space for mobile */
    #btnDemo { display: none !important; }
    .btn-nav-login { padding: 0.5rem; border: none; font-size: 1.2rem; }
    .btn-nav-login span { display: none; }
    
    /* App-like Bottom Navigation Bar */
    .nav-links {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--bg-surface-glass);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--border-subtle);
        justify-content: space-around;
        align-items: center;
        padding: 0.75rem 0.5rem;
        z-index: 1000;
        gap: 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
    .nav-link {
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.65rem;
        padding: 0 0.5rem;
    }
    .nav-link i {
        display: block !important;
        font-size: 1.35rem;
        margin: 0;
    }
    .mobile-nav-toggle { display: none !important; }
    .back-to-top { bottom: 5.5rem; }
    body { padding-bottom: 80px; }
    .final-cta { padding: 3rem 2rem; }
    .final-cta h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section { padding: 5rem 0; }
    .section-title { font-size: 2rem; }
    .map-lifecycle { flex-direction: column; align-items: center; gap: 1.5rem; }
    .map-node-container { 
        min-width: unset; 
        width: 100%; 
        max-width: 320px; 
        aspect-ratio: 1 / 1; 
        min-height: unset; 
    }
    .map-pillars { grid-template-columns: 1fr; justify-items: center; gap: 1.5rem; }
    .map-connection-down { display: none; }
    .subsystems-grid { grid-template-columns: 1fr; }
    .arch-grid { grid-template-columns: 1fr; gap: 2rem; }
    .dashboard-preview { padding: 0; }
    .mockup-body { height: 250px; gap: 0.75rem; padding: 2rem 1rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn-lg { width: 100%; }
}
