/* 
  TITAN - Global Infrastructure Design System
  Style: Architectural, High Performance, International Authority.
*/

:root {
    /* Default Branding (TITAN DARK) */
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --surface: #111111;
    --text-header: #ffffff;
    --text-body: #666666;
    --accent: #ffffff;
    --grid-line: rgba(255, 255, 255, 0.05);
    --structural-line: rgba(255, 255, 255, 0.1);
    --radius: 0px;
    /* Titan is purely sharp */

    --font-header: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;

    --site-width: 1400px;
    --column-gap: 2rem;
}

/* Header Visibility Enhancements */
.announcement-bar {
    background: rgba(var(--bg-primary-rgb), 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--structural-line);
    padding: 0.75rem 0;
    position: relative;
    z-index: 100;
}

.announcement-bar a {
    color: var(--text-header) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

nav {
    position: relative;
    z-index: 99;
}

:root {
    /* System Preference Detection */
    color-scheme: light dark;
}

/* Default to Dark (Titan Aesthetic) */
html[data-theme="titan-dark"],
:root:not([data-theme]) {
    --bg-primary: #212121;
    --bg-secondary: #171717;
    --surface: #2c2c2c;
    --text-header: #ffffff;
    --text-body: #d1d1d1;
    --accent: #3b82f6;
    /* Institutional Blue */
    --accent-rgb: 59, 130, 246;
    --bg-primary-rgb: 33, 33, 33;
    --structural-line: #3d3d3d;
    --grid-opacity: 0.05;
}

html[data-theme="titan-light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --surface: #eeeeee;
    --text-header: #000000;
    --text-body: #444444;
    --accent: #007aff;
    --accent-rgb: 0, 122, 255;
    --bg-primary-rgb: 255, 255, 255;
    --grid-line: rgba(0, 0, 0, 0.03);
    --structural-line: #e0e0e0;
    --grid-opacity: 0.15;
}

/* Auto-switch based on system if no manual toggle exists */
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg-primary: #ffffff;
        --bg-secondary: #f5f5f7;
        --text-header: #000000;
        --text-body: #444444;
        --accent: #007aff;
        --structural-line: #e0e0e0;
        --grid-opacity: 0.15;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden !important;
    width: 100vw !important;
    margin: 0;
    padding: 0;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-body);
    font-family: var(--font-body);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Global Content Layering for Map V3 */
main {
    position: relative;
    z-index: 2;
    pointer-events: none;
    /* Allow clicks to pass to map if needed, but we want children to be active */
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 2rem;
}

main>* {
    pointer-events: auto;
    /* Restore interactivity for content */
}

h1,
h2,
h3,
.heading {
    font-family: var(--font-header);
    color: var(--text-header);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 800;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 12-Column Architectural Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--column-gap);
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Structural Layout Utilities */
.span-12 {
    grid-column: span 12;
}

.span-8 {
    grid-column: span 8;
}

.span-6 {
    grid-column: span 6;
}

.span-4 {
    grid-column: span 4;
}

.span-3 {
    grid-column: span 3;
}

.offset-2 {
    grid-column-start: 3;
}

.offset-4 {
    grid-column-start: 5;
}

/* Background Grid Overlay */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: calc(100% / 12) 60px;
}

/* Navbar */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--structural-line);
    padding: 0.75rem 0;
    /* --- NAVIGATION --- */
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    width: 100% !important;
    grid-column: 1 / -1;
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text-header);
    text-transform: uppercase;
    white-space: nowrap;
}

.header-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-toggle-btn {
    display: none;
    /* Desktop hidden */
}

.logo {
    font-family: var(--font-header);
    letter-spacing: -1.5px;
}

/* Hero Section (Asymmetric 12-col) */
.hero {
    padding: 10rem 0;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 7rem);
    grid-column: 1 / 10;
}

.hero-desc {
    grid-column: 7 / 13;
    font-size: 1.25rem;
    margin-top: 2rem;
    border-left: 1px solid var(--accent);
    padding-left: 2rem;
}

/* Content Sections */
.section-meta {
    grid-column: 1 / 4;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    border-top: 1px solid var(--accent);
    padding-top: 1rem;
}

.section-content {
    grid-column: 5 / 13;
    padding-top: 1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* Feature Grid (Structural Columns) */
.feature-card {
    padding: 2rem 0;
    border-top: 1px solid var(--structural-line);
}

.feature-num {
    font-family: var(--font-header);
    font-size: 0.85rem;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

/* Data Tables */
.titan-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.85rem;
    background: var(--bg-primary);
    /* Ensure consistent background */
}

.titan-table th {
    text-align: left;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid var(--accent);
    color: var(--text-header);
    font-family: var(--font-header);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
}

.titan-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--structural-line);
    color: var(--text-body);
    vertical-align: middle;
}

.titan-table tr:hover td {
    color: var(--text-header);
    background: var(--bg-secondary);
}

/* Mobile Table Refinements */
@media (max-width: 768px) {

    .titan-table th,
    .titan-table td {
        padding: 1rem 0.75rem;
        font-size: 0.75rem;
    }

    .titan-table th:nth-child(n+3),
    .titan-table td:nth-child(n+3) {
        /* Subtly differentiate metric columns on mobile */
        opacity: 0.8;
    }
}

/* Operational Status Colors - High Contrast */
.status-operational {
    color: #00ff00;
    font-weight: 700;
}

.status-maintenance {
    color: #f0ad4e;
    font-weight: 700;
}

.status-critical {
    color: #ff3b30;
    font-weight: 700;
}

body[data-theme="titan-light"] .status-operational {
    color: #008000;
}

body[data-theme="titan-light"] .status-maintenance {
    color: #b45309;
}

body[data-theme="titan-light"] .status-critical {
    color: #c00000;
}

/* Pricing & Access Mandates */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 4rem 0;
    border: 1px solid var(--structural-line);
}

.pricing-card {
    padding: 3rem 2rem;
    border-right: 1px solid var(--structural-line);
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.pricing-card:last-child {
    border-right: none;
}

/* Navigation & TOC */
.top-toc {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--structural-line);
    padding: 0.75rem 0;
    width: 100%;
}

.top-toc ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-toc li a {
    font-family: var(--font-header);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-body);
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.top-toc li a:hover,
.top-toc li a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.pricing-card.featured {
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    z-index: 10;
}

.pricing-header {
    margin-bottom: 3rem;
}

.pricing-title {
    font-family: var(--font-header);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.pricing-price {
    font-family: var(--font-header);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-header);
    line-height: 1;
}

.pricing-price .currency {
    font-size: 1.5rem;
    vertical-align: top;
    opacity: 0.5;
    margin-right: 0.25rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 4rem 0;
    flex-grow: 1;
}

.pricing-features li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--structural-line);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pricing-features li::after {
    content: "●";
    font-size: 0.6rem;
    color: var(--accent);
}

.pricing-features li.disabled {
    opacity: 0.3;
}

.pricing-features li.disabled::after {
    content: "○";
}

/* Call to Action Protocols */
.cta-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.btn-institutional {
    padding: 1.25rem 2.5rem;
    font-family: var(--font-header);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.btn-institutional.primary {
    background: var(--text-header);
    color: var(--bg-primary);
}

.btn-institutional.primary:hover {
    background: var(--accent);
    color: #fff;
}

.btn-institutional.secondary {
    background: transparent;
    border: 1px solid var(--structural-line);
    color: var(--text-header);
}

.btn-institutional.secondary:hover {
    border-color: var(--text-header);
}

.btn-institutional .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-institutional:hover .arrow {
    transform: translateX(5px);
}

/* Scroll Spy Styles for TOC */
#toc-nav li a.active {
    color: var(--accent);
    border-left: 2px solid var(--accent);
}

/* Forms & Controls */
.titan-form-group {
    margin-bottom: 2rem;
}

.titan-label {
    display: block;
    font-family: var(--font-header);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.titan-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--structural-line);
    color: var(--text-header);
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

.titan-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Sidebar & TOC */
.sidebar-toc {
    position: sticky;
    top: 8rem;
    border-left: 1px solid var(--structural-line);
    padding-left: 1.5rem;
}

.toc-item {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toc-item.active,
.toc-item:hover {
    opacity: 1;
    color: var(--accent);
}

/* Map Visualization */
.map-viz {
    width: 100%;
    height: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--structural-line);
    position: relative;
    overflow: hidden;
}

.map-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

/* 
   SVG MAP ROBUST STANDARDS
   Ensures tooltips are always visible over subsequent sections
   and theme-neutral legibility.
*/
.svgMap-map-wrapper {
    background: transparent !important;
    width: 100% !important;
    /* Ensure full width */
}

/* Map Paths - Glassy Look for No-Data */
.svgMap-country {
    stroke: var(--structural-line) !important;
    stroke-width: 0.5px;
    transition: fill 0.3s, stroke 0.3s;
}

/* Tooltip Perfection */
.svgMap-tooltip {
    background: var(--bg-primary) !important;
    border: 1px solid var(--accent) !important;
    border-radius: 4px !important;
    padding: 1rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    z-index: 10000 !important;
    pointer-events: none;
    min-width: 180px;
    backdrop-filter: none !important;
}

.svgMap-tooltip-content-container {
    padding: 0 !important;
}

.svgMap-tooltip-title {
    font-family: var(--font-header) !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem !important;
    color: var(--text-header) !important;
    border-bottom: 1px solid var(--structural-line);
    padding-bottom: 0.5rem;
}

.svgMap-tooltip-content {
    font-family: var(--font-body) !important;
    font-size: 0.75rem !important;
    color: var(--text-body) !important;
    line-height: 1.4 !important;
}

/* Fix for Light Mode Legibility - Solid White */
html[data-theme="titan-light"] .svgMap-tooltip {
    background: #ffffff !important;
    border-color: #e5e5e5 !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="titan-light"] .svgMap-tooltip-title {
    color: #000000 !important;
    border-color: #f0f0f0 !important;
}

html[data-theme="titan-light"] .svgMap-tooltip-content {
    color: #333333 !important;
}

/* Map specific section handling */
.map-section {
    position: relative;
    z-index: 20 !important;
}

.map-line {
    position: absolute;
    background: var(--structural-line);
    height: 1px;
    transform-origin: 0 0;
}

/* Stats Card Asymmetric */
.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 200px;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--structural-line);
}

.stat-val {
    font-family: var(--font-header);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* Footer */
footer {
    border-top: 1px solid var(--structural-line);
    padding: 4rem 0;
    margin-top: 10rem;
}

/* Theme Switcher UI (Titan Styles) */
.theme-picker {
    position: fixed;
    bottom: 0;
    right: 0;
    background: var(--text-header);
    color: var(--bg-primary);
    display: flex;
    z-index: 1000;
}

.theme-btn {
    padding: 0.4rem 0.8rem;
    font-family: var(--font-header);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid var(--structural-line);
    cursor: pointer;
    background: transparent;
    color: inherit;
    transition: opacity 0.2s;
    margin-right: 0;
    height: 100%;
    align-self: center;
}

.theme-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.theme-btn:hover {
    opacity: 0.7;
}

/* Mobile First Overrides (Titan Master Reset) */
@media (max-width: 900px) {

    /* MASTER GRID RESET: Kill the grid, force block flow */
    .grid-container {
        display: block !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 1rem !important;
        overflow: hidden !important;
    }

    .span-12,
    .span-8,
    .span-6,
    .span-4,
    .span-3,
    .offset-2,
    .offset-4 {
        display: block !important;
        width: 100% !important;
        margin: 0 0 1rem 0 !important;
        padding: 0 !important;
        grid-column: auto !important;
    }

    .nav-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: calc(100vw - 2rem) !important;
    }

    .nav-content .logo img,
    header .logo img,
    nav .logo img {
        height: 24px !important;
        width: auto !important;
        max-width: 45vw !important;
        display: block !important;
    }

    /* BANNER COMPRESSION FIX */
    .top-banner .grid-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
        text-align: center !important;
        padding: 1rem !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    .banner-text {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }

    .banner-links {
        display: flex !important;
        gap: 1.5rem !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .banner-links a {
        font-size: 0.75rem !important;
        white-space: nowrap !important;
    }

    /* SECTION STACKING (Standard, Pro, Legal) */
    .section-grid,
    .pricing-grid,
    .hero-split,
    .spec-grid,
    .comparison-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .info-card,
    .spec-card,
    .pricing-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem !important;
        padding: 1.5rem !important;
    }

    .logo span {
        font-size: 0.9rem !important;
        white-space: nowrap;
    }

    .hero-split {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem;
    }

    /* HERO RESET & RESPONSIVE TYPE */
    .hero-title {
        font-size: clamp(2rem, 8vw, 4rem);
        line-height: 1.1;
        margin-bottom: 1.5rem;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .hero-desc {
        font-size: 1rem;
        margin-top: 1rem;
        padding-left: 1rem;
        border-width: 2px;
    }

    /* PRICING GRID RESET */
    .pricing-grid {
        grid-template-columns: 1fr;
        /* Single column */
        border: none;
    }

    .pricing-card {
        border-right: none;
        border-bottom: 1px solid var(--structural-line);
        padding: 2rem 1.5rem;
    }

    .pricing-price {
        font-size: 3rem;
    }

    /* MOBILE NAVIGATION - HAMBURGER STYLE */
    .nav-content .header-links {
        display: none !important;
        /* ABSOLUTE HIDE */
        flex-direction: column;
        width: 100%;
        max-width: 100vw;
        background: var(--bg-secondary);
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        height: auto;
        padding: 2rem 1rem;
        border-bottom: 2px solid var(--accent);
        z-index: 9999;
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.9);
    }

    .nav-content .header-links.active {
        display: flex !important;
    }

    .nav-content .header-links .toc-item {
        font-size: 1.2rem;
        padding: 1.5rem;
        width: 100%;
        text-align: left;
        border: none;
        background: transparent;
        border-bottom: 1px solid var(--structural-line);
        color: var(--text-header) !important;
        display: block;
    }

    /* HAMBURGER BUTTON */
    .nav-content .nav-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
        cursor: pointer;
        background: var(--bg-secondary);
        border: 1px solid var(--structural-line);
        color: var(--accent) !important;
        border-radius: 4px;
        z-index: 10001;
    }

    .nav-content .header-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* MAP FIX - Forces visibility and aspect ratio */
    #svgMap {
        width: 100% !important;
        height: 400px !important;
        display: block !important;
        margin: 2rem 0;
        background: var(--bg-secondary);
        border: 1px solid var(--structural-line);
        position: relative;
        overflow: hidden;
    }

    #svgMap .svgMap-map-wrapper {
        height: 100% !important;
    }

    #svgMap svg {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }

    /* TABLE RESPONSIVE WRAPPER */
    /* Add logic if container exists, but for now ensure table scrolls */
    .titan-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* UTILITIES */
    .section-meta {
        border-top: none;
        padding-top: 0;
        margin-bottom: 0.5rem;
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* LEGAL TEXT */
    .legal-content,
    p,
    li {
        font-size: 0.95rem;
        /* Slightly smaller for mobile density */
        line-height: 1.6;
    }

    /* MODAL MOBILE RESET */
    .modal-content {
        width: 95% !important;
        margin: 1rem auto;
        padding: 1.5rem !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    .pricing-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .pricing-card {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* --- NEW FOOTER STYLES (Titan/PabloCirre Replication) --- */
.main-footer {
    padding: 60px 0;
    border-top: 1px solid var(--structural-line);
    color: var(--text-body);
    font-size: 0.9rem;
    margin-top: 6rem;
}

.footer-content {
    grid-column: span 12;
    /* CRITICAL: Span full 12 columns */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
}

.legal-links {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.legal-links a {
    color: var(--text-body);
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.legal-links a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 30px;
}

.footer-socials a {
    color: var(--text-header);
    /* Higher contrast */
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.footer-socials a:hover {
    color: var(--accent);
}

/* --- COOKIE BANNER --- */
#cookie-banner {
    position: fixed;
    bottom: -200px;
    /* Hidden initially */
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--structural-line);
    padding: 2rem 0;
    z-index: 1000;
    transition: bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.3);
}

#cookie-banner.visible {
    bottom: 0;
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.cookie-text {
    font-size: 0.95rem;
    color: var(--text-header);
    max-width: 60%;
    line-height: 1.6;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.cookie-btn {
    padding: 0.8rem 2rem;
    font-family: var(--font-header);
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
}

.cookie-btn.primary {
    background: var(--text-header);
    color: var(--bg-primary);
}

.cookie-btn.secondary {
    background: transparent;
    border: 1px solid var(--structural-line);
    color: var(--text-header);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cookie-btn.primary:hover {
    background: var(--accent);
    color: #fff;
}

@media (max-width: 900px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .cookie-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .cookie-text {
        max-width: 100%;
    }
}

/* V3 Glassmorphism Utils */
.text-glass {
    background: rgba(var(--bg-primary-rgb), 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.015);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

html[data-theme="titan-light"] .text-glass {
    border-color: rgba(0, 0, 0, 0.015);
}

/* Ensure RGB vars exist if not set by inline styles */
html:not([data-theme]),
html[data-theme="titan-dark"] {
    --bg-primary-rgb: 33, 33, 33;
}

html[data-theme="titan-light"] {
    --bg-primary-rgb: 255, 255, 255;
}

/* --- MOBILE MENU V4 INTEGRATION --- */
@media (max-width: 1024px) {
    .nav-toggle-btn {
        display: none !important;
        /* Hide old generic toggle */
    }

    .v4-menu-trigger {
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 5px;
        z-index: 2100;
        margin-left: 1rem;
    }

    .burger-line {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text-header);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .v4-menu-trigger.active .burger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .v4-menu-trigger.active .burger-line:nth-child(2) {
        opacity: 0;
    }

    .v4-menu-trigger.active .burger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .v4-mobile-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: rgba(var(--bg-primary-rgb), 0.85);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        transform: translateX(100%);
    }

    .v4-mobile-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    .v4-menu-container {
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 2rem 1.5rem 2rem 1.5rem;
        /* Reduced top padding now that branding is inside */
        overflow-y: auto;
    }

    .v4-menu-branding {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding-bottom: 2rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--structural-line);
    }

    .v4-menu-branding img {
        height: 24px !important;
        width: 24px !important;
        max-height: 24px !important;
        max-width: 24px !important;
        object-fit: contain;
    }

    .v4-menu-branding span {
        font-family: var(--font-header);
        font-weight: 800;
        font-size: 1.2rem;
        letter-spacing: -0.02em;
        color: var(--text-header);
        text-transform: uppercase;
    }

    .v4-menu-links {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .v4-nav-item,
    .v4-nav-link {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        border-bottom: 1px solid var(--structural-line);
    }

    .v4-mobile-menu.open .v4-nav-item,
    .v4-mobile-menu.open .v4-nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    .v4-nav-link,
    .v4-submenu-trigger {
        display: block;
        width: 100%;
        padding: 0.85rem 0;
        font-family: var(--font-header);
        font-size: 1rem;
        font-weight: 800;
        text-transform: uppercase;
        color: var(--text-header);
        text-decoration: none;
        background: none;
        border: none;
        text-align: left;
        cursor: pointer;
        position: relative;
    }

    .v4-submenu-trigger .arrow {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-right: 2px solid var(--accent);
        border-bottom: 2px solid var(--accent);
        transform: rotate(45deg);
        margin-left: 1rem;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        position: absolute;
        right: 0;
        top: 1.2rem;
    }

    .v4-submenu-trigger.active .arrow {
        transform: rotate(-135deg);
    }

    .v4-submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding-left: 1rem;
    }

    .v4-submenu.active {
        max-height: 500px;
        padding-bottom: 1rem;
    }

    .v4-submenu a {
        color: var(--text-body);
        font-size: 0.85rem;
        padding: 0.6rem 0;
        text-decoration: none;
        transition: color 0.2s;
    }

    .v4-menu-footer {
        margin-top: auto;
        padding-top: 2rem;
        opacity: 0;
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
    }

    .v4-mobile-menu.open .v4-menu-footer {
        opacity: 1;
    }

    /* Staggered Delays for Mobile Viewport */
    .v4-mobile-menu.open .v4-nav-item:nth-child(1) {
        transition-delay: 0.05s;
    }

    .v4-mobile-menu.open .v4-nav-item:nth-child(2) {
        transition-delay: 0.1s;
    }

    .v4-mobile-menu.open .v4-nav-item:nth-child(3) {
        transition-delay: 0.15s;
    }

    .v4-mobile-menu.open .v4-nav-item:nth-child(4) {
        transition-delay: 0.2s;
    }

    .v4-mobile-menu.open .v4-nav-item:nth-child(5) {
        transition-delay: 0.25s;
    }
}

@media (min-width: 1025px) {

    .v4-menu-trigger,
    .v4-mobile-menu {
        display: none !important;
    }
}