/* ============================================================
   DESIGN SYSTEM — CSS Custom Properties
   Arctic Theme — Light content, dark navbar
   ============================================================ */
:root {
    /* Content-area palette (light) */
    --color-primary:     #FFFFFF;
    --color-secondary:   #F6F9FC;
    --color-accent:      #005BC1;
    --color-accent-alt:  #2571DB;
    --color-success:     #16A34A;
    --color-warning:     #D97706;
    --color-text:        #2D2D2D;
    --color-text-muted:  #6F6F6F;
    --color-border:      #DEE2E6;
    --color-glass:       rgba(255, 255, 255, 0.92);

    /* Arctic extended palette */
    --arctic-navy:       #0B1D3A;
    --arctic-navy-mid:   #112B52;
    --arctic-deep:       #071428;
    --arctic-ice:        #A8D8EA;
    --arctic-teal:       #2EC4B6;
    --arctic-aurora:     #48E5C2;
    --arctic-sky:        #1B98E0;
    --arctic-frost:      #E8F4FD;
    --arctic-glacier:    #F0F7FF;
    --arctic-white:      #FFFFFF;
    --arctic-card:       rgba(255, 255, 255, 0.04);
    --arctic-card-hover: rgba(255, 255, 255, 0.07);

    /* Typography */
    --font-heading: 'DM Sans', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    /* Border radius — modern 12px */
    --radius-card:   12px;
    --radius-button: 8px;
    --radius-input:  8px;

    /* Shadows */
    --shadow-sm: 0px 1px 2px rgba(85, 85, 85, 0.05);
    --shadow-md: 0 1px 2px rgba(0,0,0,.02), 0 4px 4px rgba(0,0,0,.03), 0 8px 16px rgba(0,0,0,.02);
    --shadow-lg: 0 1px 2px rgba(0,0,0,.02), 0 8px 22px rgba(0,0,0,.03), 0 8px 9px rgba(0,0,0,.02);
    --glow-accent: var(--shadow-md);
    --glow-accent-strong: var(--shadow-lg);
    --glow-purple: var(--shadow-md);

    /* Aliases for pipeline app templates (legacy variable names) */
    --bg-primary:        #FFFFFF;
    --bg-secondary:      #F6F9FC;
    --bg-card:           #FFFFFF;
    --bg-input:          #FFFFFF;
    --border-color:      #DEE2E6;
    --text-primary:      #2D2D2D;
    --text-bright:       #2D2D2D;
    --text-secondary:    #495057;
    --text-muted:        #6F6F6F;
    --accent-primary:    #005BC1;
    --accent-highlight:  #2571DB;
    --accent-info:       #4C6EF5;
    --accent-success:    #16A34A;
    --accent-warning:    #D97706;
    --accent-danger:     #F87C7C;
    --navbar-height:     64px;
    --statusbar-height:  0px;

    /* Transition timing */
    --transition-base: all 0.2s ease-in-out;
}

/* ============================================================
   SHARED UTILITY CLASSES (used by pipeline app templates)
   ============================================================ */

/* Layout */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; }

/* Spacing */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }

/* Typography */
.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.8rem; }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 1rem;
    transition: all 0.3s ease;
}
.card:hover {
    transform: translateY(-3px);
    border-color: #005BC1;
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.78rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}
.btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(0,0,0,0.03);
}
.btn-primary {
    color: #FFFFFF;
    border-color: #005BC1;
    background: #005BC1;
    border-radius: 8px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background: #2571DB;
    border-color: #2571DB;
    color: #FFFFFF;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: #005BC1;
    border: 2px solid #005BC1;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}
.btn-outline:hover {
    border-color: #2571DB;
    color: #2571DB;
}
.btn-sm { padding: 0.25rem 0.6rem; font-size: 0.72rem; }
.btn-xs { padding: 2px 8px; font-size: 0.65rem; }

/* Form controls */
.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}
.form-control {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--bg-input);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-input);
    transition: border-color 0.2s ease-in-out;
}
.form-control:focus {
    outline: none;
    border-color: #005BC1;
    box-shadow: 0 0 0 2px rgba(0, 91, 193, 0.15);
}
select.form-control {
    appearance: auto;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: #FFFFFF;
    color: #2D2D2D;
    line-height: 160%;
    font-size: 16px;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #2D2D2D;
    line-height: 1.2;
}

h1 { font-size: 48px; font-weight: 700; }
h2 { font-size: 32px; font-weight: 700; }
h3 { font-size: 24px; font-weight: 600; }
h4 { font-size: 20px; font-weight: 600; }
small { font-size: 14px; }

a {
    color: #005BC1;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #2571DB;
}

img, svg {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   SVG GRID BACKGROUND
   ============================================================ */
.bg-grid {
    display: none;
}

/* ============================================================
   SHELL LAYOUT — top navbar + optional sidebar + main
   ============================================================ */
.shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.shell__top {
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.shell__body {
    display: flex;
    flex: 1;
    min-height: 0;
}

.shell__main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    background: rgba(11, 29, 58, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(168, 216, 234, 0.08);
    box-shadow: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    background: rgba(11, 29, 58, 0.95);
    border-bottom-color: rgba(168, 216, 234, 0.12);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Brand / Logo */
.navbar__brand {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 1.2;
}

.navbar__brand-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--arctic-white);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.navbar__brand-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    color: var(--arctic-ice);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.navbar__brand:hover .navbar__brand-text {
    color: var(--arctic-teal);
}

/* Nav Links */
.navbar__links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar__links a {
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s ease-in-out;
    position: relative;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
}

.navbar__links a::after {
    display: none;
}

.navbar__links a:hover {
    color: var(--arctic-white);
    background: rgba(255, 255, 255, 0.08);
}

.navbar__links a.active {
    color: var(--arctic-teal);
    background: rgba(46, 196, 182, 0.1);
}

/* Navbar dropdown menus */
.navbar__dropdown {
    position: relative;
}

.navbar__dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.navbar__dropdown-btn::after {
    display: none;
}

.navbar__dropdown-btn:hover,
.navbar__dropdown-btn.active {
    color: var(--arctic-white);
    background: rgba(255, 255, 255, 0.08);
}

.navbar__dropdown-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.navbar__dropdown.open .navbar__dropdown-chevron {
    transform: rotate(180deg);
}

.navbar__dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: rgba(17, 43, 82, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 216, 234, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    padding: 0.35rem 0;
    animation: navbar-dropdown-fade 0.15s ease;
}

@keyframes navbar-dropdown-fade {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.navbar__dropdown.open .navbar__dropdown-menu {
    display: block;
}

.navbar__dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    position: relative;
    border-radius: 0;
}

.navbar__dropdown-menu a::after {
    display: none;
}

.navbar__dropdown-menu a:hover {
    color: var(--arctic-white);
    background: rgba(255, 255, 255, 0.06);
}

.navbar__dropdown-menu a.active {
    color: var(--arctic-teal);
    background: rgba(46, 196, 182, 0.08);
}

.navbar__dropdown-menu a svg {
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.navbar__dropdown-menu a:hover svg,
.navbar__dropdown-menu a.active svg {
    color: var(--arctic-teal);
}

.navbar__dropdown-hint {
    display: block;
    font-size: 0.62rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-left: auto;
    white-space: nowrap;
}

.navbar__dropdown-menu a:hover .navbar__dropdown-hint {
    color: var(--color-text-muted);
}

.navbar__highlight {
    font-weight: 600 !important;
}

.navbar__separator {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.25rem;
}

/* Mobile overlay section labels */
.mobile-overlay__section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: -1.5rem;
}

/* Right side group */
.navbar__right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Language Switcher */
.navbar__lang {
    display: flex;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.navbar__lang a {
    color: var(--color-text-muted);
    padding: 0.3rem 0.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-button);
    transition: all 0.25s ease;
}

.navbar__lang a:hover {
    color: var(--arctic-white);
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar__lang a.active {
    color: var(--arctic-teal);
    border-color: var(--arctic-teal);
    background: rgba(46, 196, 182, 0.1);
}

/* CTA Button */
.navbar__cta {
    padding: 0.6rem 1.5rem;
    background: var(--arctic-teal);
    border: none;
    color: var(--arctic-navy);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar__cta:hover {
    box-shadow: var(--glow-accent);
    transform: translateY(-1px);
    color: var(--arctic-navy);
    background: var(--arctic-aurora);
}

/* Mobile hamburger */
.navbar__hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.navbar__hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--arctic-white);
    border-radius: 2px;
    transition: all 0.2s ease-in-out;
    transform-origin: center;
}

.navbar__hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5.5px, 5.5px);
}

.navbar__hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar__hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5.5px, -5.5px);
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 20, 40, 0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    overflow-y: auto;
    padding: 4rem 2rem;
    backdrop-filter: blur(20px);
}

.mobile-overlay.open {
    display: flex;
}

.mobile-overlay a {
    color: var(--arctic-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.mobile-overlay a:hover {
    color: var(--arctic-teal);
}

.mobile-overlay .navbar__cta {
    font-size: 1rem;
    padding: 0.75rem 2rem;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 960px) {
    .navbar {
        padding: 0 1.5rem;
    }

    .navbar__links,
    .navbar__lang,
    .navbar__cta-desktop {
        display: none;
    }

    .navbar__hamburger {
        display: flex;
    }

    .navbar__brand-text {
        font-size: 1rem;
    }
}

@media (min-width: 961px) and (max-width: 1200px) {
    .navbar {
        padding: 0 1.5rem;
    }

    .navbar__links {
        gap: 0.25rem;
    }

    .navbar__links a {
        font-size: 14px;
        padding: 0.35rem 0.5rem;
    }

    .navbar__dropdown-btn {
        font-size: 14px;
        padding: 0.35rem 0.5rem;
    }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7, 20, 40, 0.55) 0%,
        rgba(11, 29, 58, 0.7) 50%,
        rgba(7, 20, 40, 0.92) 100%
    );
}

.hero__content {
    max-width: 900px;
    z-index: 2;
    position: relative;
}

.hero__title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: var(--arctic-white);
    line-height: 1.1;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.3);
}

.hero__title .highlight {
    color: var(--arctic-teal);
    position: relative;
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--arctic-ice);
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    opacity: 0.85;
}

.hero__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__actions .btn-primary {
    padding: 1rem 2.5rem;
    background: var(--arctic-teal);
    color: var(--arctic-navy);
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 24px rgba(46, 196, 182, 0.3);
}

.hero__actions .btn-primary:hover {
    box-shadow: 0 6px 32px rgba(72, 229, 194, 0.4);
    transform: translateY(-2px);
    background: var(--arctic-aurora);
    color: var(--arctic-navy);
}

.btn-secondary {
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--arctic-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    border-color: var(--arctic-teal);
    color: var(--arctic-teal);
    background: rgba(46, 196, 182, 0.08);
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--color-text-muted);
}

.hero__scroll svg {
    width: 24px;
    height: 24px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================================
   SECTIONS — Common
   ============================================================ */
.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section__subtitle {
    text-align: center;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   PROBLEM SECTION
   ============================================================ */
.problems {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.problem-card {
    background: #FFFFFF;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.problem-card:hover {
    border-color: #005BC1;
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.problem-card__icon {
    width: 48px;
    height: 48px;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.problem-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.problem-card__stat {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.problem-card__text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ============================================================
   SOLUTION / THREE PILLARS
   ============================================================ */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.pillar {
    background: #FFFFFF;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.pillar:hover {
    border-color: #005BC1;
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.pillar__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: var(--color-accent);
}

.pillar__title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.pillar__text {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ============================================================
   MAP SECTION (embedded in welcome)
   ============================================================ */
.map-section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.map-container {
    height: 60vh;
    width: 100%;
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--color-border);
    position: relative;
}

/* Full-page map */
.map-fullpage {
    height: calc(100vh - 64px);
    margin-top: 64px;
    position: relative;
}

.map-fullpage .map-container {
    height: 100%;
    border-radius: 0;
    border: none;
}

.map-sidebar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 320px;
    max-height: calc(100% - 2rem);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 800;
    overflow-y: auto;
    color: var(--color-text);
}

.map-sidebar__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

.map-sidebar__content {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.map-sidebar__content p {
    margin-bottom: 0.5rem;
}

.map-sidebar__label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .map-sidebar {
        width: calc(100% - 2rem);
        top: auto;
        bottom: 1rem;
        max-height: 40%;
    }
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
    background: #FFFFFF !important;
    color: var(--color-text) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
    background: #FFFFFF !important;
}

.leaflet-popup-content {
    font-family: var(--font-body) !important;
    font-size: 0.85rem !important;
}

.leaflet-popup-content strong {
    font-family: var(--font-heading);
    color: var(--color-accent);
}

/* ============================================================
   METRICS / TRACTION
   ============================================================ */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.metric {
    padding: 2rem 1rem;
}

.metric__value {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.metric__label {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ============================================================
   WAITLIST CTA SECTION
   ============================================================ */
.cta-section {
    padding: 6rem 2rem;
    background: #FFFFFF;
    text-align: center;
}

.cta-section__inner {
    max-width: 600px;
    margin: 0 auto;
}

.cta-section__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-section__subtitle {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: #F6F9FC;
    border-top: 1px solid var(--color-border);
    padding: 4rem 2rem 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer__brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer__brand-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: #2D2D2D;
}

.footer__tagline {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.footer__socials {
    display: flex;
    gap: 1rem;
}

.footer__socials a {
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.footer__socials a:hover {
    color: var(--color-accent);
}

.footer__socials svg {
    width: 20px;
    height: 20px;
}

.footer__heading {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.footer__link-list {
    list-style: none;
}

.footer__link-list li {
    margin-bottom: 0.5rem;
}

.footer__link-list a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer__link-list a:hover {
    color: var(--color-accent);
}

.footer__bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .hero__title {
        font-size: 2rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .problems,
    .pillars {
        grid-template-columns: 1fr;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR USER MENU
   ═══════════════════════════════════════════════════════════════ */

/* Login button (unauthenticated) */
.navbar__login-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--arctic-navy);
    text-decoration: none;
    background: var(--arctic-teal);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.navbar__login-btn:hover {
    color: var(--arctic-navy);
    background: var(--arctic-aurora);
    box-shadow: var(--glow-accent);
}
.navbar__login-btn svg {
    stroke: var(--arctic-navy);
}

/* User button (authenticated) */
.navbar__user { position: relative; }

.navbar__user-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.navbar__user-btn:hover,
.navbar__user-btn.active {
    color: var(--arctic-white);
    border-color: var(--arctic-teal);
}
.navbar__user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown */
.navbar__user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: rgba(17, 43, 82, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 216, 234, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    padding: 0.35rem 0;
}
.navbar__user-dropdown.open { display: block; }

.navbar__user-dropdown-header {
    padding: 0.5rem 0.85rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(168, 216, 234, 0.1);
    margin-bottom: 0.25rem;
}

.navbar__user-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.navbar__user-dropdown a:hover {
    color: var(--arctic-white);
    background: rgba(255, 255, 255, 0.06);
}
.navbar__user-logout {
    border-top: 1px solid rgba(168, 216, 234, 0.1);
    margin-top: 0.25rem;
    padding-top: 0.45rem !important;
}
.navbar__user-logout:hover { color: #EF4444 !important; }

/* Mobile overlay divider */
.mobile-overlay__divider {
    width: 60%;
    height: 1px;
    background: var(--color-border);
    margin: 0.75rem auto;
}

/* ═══════════════════════════════════════════════════════════════
   INTELLIGENCE SIDEBAR
   ═══════════════════════════════════════════════════════════════ */

/* Sidebar toggle tab — left edge of screen, visible when sidebar collapsed */
.intell-sidebar__tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 48px;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: var(--color-accent);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: opacity 0.25s ease, background 0.15s ease;
    opacity: 1;
}
.intell-sidebar__tab:hover {
    background: rgba(0, 91, 193, 0.06);
}
/* Hide tab when sidebar is open */
.intell-sidebar__tab.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Sidebar overlay (mobile backdrop) */
.intell-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    backdrop-filter: blur(2px);
}
.intell-sidebar-overlay.open { display: block; }

/* Sidebar panel — sits inside .shell__body flex row.
   VISIBLE by default (240px). .collapsed hides it. */
.intell-sidebar {
    width: 240px;
    min-width: 240px;
    background: #FFFFFF;
    border-right: 1px solid var(--color-border);
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}
/* Transition only applies AFTER first paint (JS adds this class) */
.intell-sidebar.animated {
    transition: width 0.25s ease, min-width 0.25s ease, border-color 0.25s ease;
}
.intell-sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right-color: transparent;
    overflow: hidden;
}

/* Close button */
.intell-sidebar__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.intell-sidebar__close:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.05);
}

/* Brand header */
.intell-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1.25rem 1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #005BC1;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.75rem;
}

/* Section labels */
.intell-sidebar__section-label {
    padding: 0.75rem 1.25rem 0.35rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    user-select: none;
}

/* Navigation links */
.intell-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}
.intell-sidebar__link:hover {
    color: #2D2D2D;
    background: #F6F9FC;
    border-left-color: rgba(0, 91, 193, 0.3);
}
.intell-sidebar__link.active {
    color: #005BC1;
    background: rgba(0, 91, 193, 0.06);
    border-left-color: #005BC1;
    font-weight: 500;
}
.intell-sidebar__link svg {
    flex-shrink: 0;
    opacity: 0.7;
}
.intell-sidebar__link:hover svg,
.intell-sidebar__link.active svg {
    opacity: 1;
}

.intell-sidebar__link--primary {
    font-weight: 600;
    color: var(--color-accent);
}

/* Sub-links (indented children, e.g. RSS/Telegram/X under Capture) */
.intell-sidebar__sublink {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1.25rem 0.35rem 2.6rem;
    font-size: 0.72rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
    opacity: 0.8;
}
.intell-sidebar__sublink:hover {
    color: #2D2D2D;
    background: #F6F9FC;
    border-left-color: rgba(0, 91, 193, 0.2);
    opacity: 1;
}
.intell-sidebar__sublink.active {
    color: #005BC1;
    background: rgba(0, 91, 193, 0.04);
    border-left-color: #005BC1;
    opacity: 1;
}
.intell-sidebar__sublink svg {
    flex-shrink: 0;
    opacity: 0.6;
}
.intell-sidebar__sublink:hover svg,
.intell-sidebar__sublink.active svg {
    opacity: 1;
}

/* Mobile: sidebar starts collapsed, becomes fixed overlay when shown */
@media (max-width: 959px) {
    .intell-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 0 !important;
        min-width: 0 !important;
        z-index: 999;
        padding-top: 1rem;
        overflow: hidden;
    }
    /* On mobile, NOT collapsed = visible as overlay */
    .intell-sidebar:not(.collapsed) {
        width: 260px !important;
        min-width: 260px !important;
    }
    /* On mobile, start collapsed */
    .intell-sidebar { width: 0 !important; min-width: 0 !important; }
}

/* Pipeline LED indicator */
.led { font-size: 0.55rem; line-height: 1; vertical-align: middle; }
.led--green  { color: var(--color-success, #22c55e); }
.led--yellow { color: var(--color-warning, #eab308); }
.led--orange { color: #f97316; }
.led--red    { color: var(--color-error,   #ef4444); }
.led--grey   { color: var(--color-text-muted, #6b7280); }

/* ============================================================
   DOMAIN ACCENT COLORS (D1-D8)
   Used by dashboard badges and map markers.
   These are reference values — actual colors come from
   DomainCategory.color via the database.
   ============================================================ */
:root {
    --domain-d1: #3B82F6;   /* blue */
    --domain-d2: #10B981;   /* emerald */
    --domain-d3: #F59E0B;   /* amber */
    --domain-d4: #EF4444;   /* red */
    --domain-d5: #8B5CF6;   /* violet */
    --domain-d6: #EC4899;   /* pink */
    --domain-d7: #06B6D4;   /* cyan */
    --domain-d8: #F97316;   /* orange */
}

/* ============================================================
   MARKDOWN RENDERED CONTENT (.md-render)
   Applied to any container whose raw markdown text is converted
   to HTML by marked.js. Provides clean institutional styling.
   ============================================================ */
.md-render {
    color: var(--color-text);
    line-height: 1.7;
    font-size: 0.92rem;
}
.md-render h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0F172A;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-border);
}
.md-render h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1E293B;
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--color-border);
}
.md-render h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin: 1rem 0 0.4rem;
}
.md-render h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin: 0.75rem 0 0.3rem;
}
.md-render p {
    margin: 0.5rem 0;
}
.md-render strong {
    font-weight: 600;
    color: #0F172A;
}
.md-render ul, .md-render ol {
    margin: 0.5rem 0 0.5rem 1.5rem;
    padding: 0;
}
.md-render li {
    margin-bottom: 0.3rem;
}
.md-render li::marker {
    color: var(--color-accent);
}
.md-render blockquote {
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    border-left: 3px solid var(--color-accent);
    background: #F8FAFC;
    color: #475569;
    font-style: italic;
}
.md-render code {
    background: #F1F5F9;
    color: #1E293B;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
}
.md-render pre {
    background: #F8FAFC;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}
.md-render pre code {
    background: none;
    padding: 0;
}
.md-render table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.85rem;
}
.md-render th {
    background: #F1F5F9;
    font-weight: 600;
    color: #1E293B;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
}
.md-render td {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}
.md-render tr:hover td {
    background: #F8FAFC;
}
.md-render hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 1.25rem 0;
}
.md-render a {
    color: var(--color-accent);
    text-decoration: underline;
}
.md-render a:hover {
    color: #2571DB;
}

/* ============================================================
   SECTION BACKGROUNDS — alternating white / #F6F9FC
   ============================================================ */
.section--alt {
    background: #F6F9FC;
}
.section--gradient {
    background: linear-gradient(180deg, #F6F9FC 0%, rgba(246, 249, 252, 0) 100%);
}

/* ============================================================
   TAG / PILL BADGES (pipeline boards)
   ============================================================ */
.tag {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 119px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
}
.tag-orange { background: #FFF6E1; color: #7A3400; }
.tag-purple { background: #EEE4FA; color: #263CB0; }
.tag-pink   { background: #FFEEF2; color: #810736; }
.tag-blue   { background: #F7F9FC; color: #1954B7; }
.tag-green  { background: #E8F5E9; color: #1B5E20; }
.tag-red    { background: #FFEBEE; color: #B71C1C; }
