:root {
    /* Color Palette - Premium Dark "Economist" Theme */
    --bg-color: #0b1121; /* Very dark slate blue */
    --bg-card: rgba(19, 28, 48, 0.7); /* Translucent cards */
    --bg-card-hover: rgba(28, 41, 65, 0.9);
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --primary-color: #3b82f6; /* Trust blue */
    --primary-light: #60a5fa;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-indigo: #6366f1;
    --accent-rose: #f43f5e;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(59, 130, 246, 0.3);
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Utilities */
    --container-width: 1200px;
    --nav-height: 80px;
    --transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Chart Colors */
    --agri-color: #10b981;
    --ind-color: #f59e0b;
    --serv-color: #3b82f6;
}

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

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(11, 17, 33, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(11, 17, 33, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Typography Utilities */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h3 {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
    font-weight: 300;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    color: var(--primary-light);
}

.m-0 { margin: 0; }
.mt-4 { margin-top: 1.5rem; }
.text-sm { font-size: 0.875rem; }

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.alt-bg {
    background-color: rgba(15, 23, 42, 0.4);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-standard), border-color var(--transition-standard), background var(--transition-standard);
}

.glass-panel:hover {
    transform: translateY(-5px);
    border-color: var(--border-highlight);
    background: var(--bg-card-hover);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(11, 17, 33, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-standard);
}

.navbar.scrolled {
    height: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.logo svg {
    color: var(--primary-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-standard);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-light);
    transition: width var(--transition-standard);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--primary-light);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above overlay */
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(11, 17, 33, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-standard);
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-link:hover {
    color: var(--primary-light);
}

/* Open state for hamburger */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

/* Stats Cards in Hero */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    color: var(--primary-light);
}

.stat-value {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Chart Visual */
.chart-container {
    width: 100%;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.chart-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.line-chart {
    width: 100%;
    aspect-ratio: 2/1;
    position: relative;
}
.chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s forwards ease-out 0.5s;
}
.chart-area {
    opacity: 0;
    animation: fadeIn 1s forwards ease-in 2s;
}
.data-point {
    opacity: 0;
    animation: popIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.data-point:nth-child(1) { animation-delay: 0.5s; }
.data-point:nth-child(2) { animation-delay: 1.0s; }
.data-point:nth-child(3) { animation-delay: 1.5s; }
.data-point:nth-child(4) { animation-delay: 2.0s; }

.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}
@keyframes popIn {
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 0 rgba(6, 182, 212, 0)); }
    50% { filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.8)); }
    100% { filter: drop-shadow(0 0 0 rgba(6, 182, 212, 0)); }
}

/* Scroll Hint */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}
.scroll-indicator a {
    color: var(--text-muted);
    transition: color var(--transition-standard);
}
.scroll-indicator a:hover {
    color: var(--primary-light);
}

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

/* --- General Section Styling --- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.5rem;
}

.title-underline {
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 1rem auto;
    border-radius: 2px;
}

.section-lead {
    font-size: 1.1rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.feature-list {
    list-style: none;
    margin-top: 1.5rem;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}
.feature-list svg {
    color: var(--accent-emerald);
}

/* --- Custom CSS Data Visualizations --- */

/* Bar Chart (Structural Shift) */
.bar-chart-container {
    width: 100%;
}
.bar-group {
    margin-bottom: 1.5rem;
}
.bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.bars {
    width: 100%;
    height: 24px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
    position: relative;
}
.bar {
    height: 100%;
    transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    cursor: pointer;
}
.bar:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card-hover);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    z-index: 10;
}
.agriculture { background: var(--agri-color); }
.industry { background: var(--ind-color); }
.services { background: var(--serv-color); }

.chart-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    font-size: 0.85rem;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.agriculture-color { background: var(--agri-color); }
.industry-color { background: var(--ind-color); }
.services-color { background: var(--serv-color); }


/* Matrix (Institutions) */
.matrix-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    padding: 2rem;
}
.axis-y-label {
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.axis-x-label {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.quadrant {
    background: rgba(255,255,255,0.03);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    transition: all 0.3s;
}

.q-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.q-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.active-q {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--primary-color);
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}
.active-q .q-label {
    color: var(--primary-light);
}
.ext-q {
    background: rgba(244, 63, 94, 0.05);
}

.q-icon {
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

/* Mini Stats (Institutions) */
.stat-row {
    display: flex;
    gap: 2rem;
}
.mini-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.mini-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-cyan);
}

/* Human Capital Cards */
.card {
    text-align: left;
}
.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-indigo));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

/* --- Footer --- */
.footer {
    background: rgba(11, 17, 33, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}
.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}
.footer-brand svg {
    color: var(--primary-light);
}
.footer-text {
    max-width: 500px;
}
.footer-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: var(--primary-light);
}

/* --- Animations & Utilities --- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}
.fade-in.visible {
    opacity: 1;
}

/* Animation Delays */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .grid-2-col {
        grid-template-columns: 1fr;
    }
    .hero-container {
        grid-template-columns: 1fr;
        padding-top: 4rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-stats {
        margin-bottom: 2rem;
    }
    .reverse-layout .visual-pane {
        order: 2;
    }
    .reverse-layout .content-block {
        order: 1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide desktop links */
    }
    .menu-toggle {
        display: flex; /* Show hamburger */
    }
    .hero-stats {
        grid-template-columns: 1fr; /* Stack stats */
    }
    .stat-row {
        flex-direction: column;
        gap: 1rem;
    }
}
