/* ========================================
   THE SILENT EPIDEMIC - Lead Poisoning in Africa
   Apple-inspired design system
   ======================================== */

:root {
    --bg-primary: #fafafa;
    --bg-dark: #0a0a0a;
    --bg-card: #ffffff;
    --bg-card-dark: #161616;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-light: #f5f5f7;
    --text-muted: #86868b;
    --accent: #d4380d;
    --accent-light: #ff6b35;
    --accent-glow: rgba(212, 56, 13, 0.15);
    --danger: #c0392b;
    --warning: #e67e22;
    --success: #27ae60;
    --blue: #0071e3;
    --border: rgba(0, 0, 0, 0.08);
    --border-dark: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --transition: 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --max-width: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   HERO
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0505 40%, #2d0a0a 70%, #0a0a0a 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(212, 56, 13, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 30%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    text-align: center;
    padding: 80px 24px;
    max-width: 900px;
}

.hero-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 24px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(56px, 10vw, 120px);
    font-weight: 700;
    line-height: 0.95;
    color: var(--text-light);
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    max-width: 640px;
    margin: 0 auto 60px;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    color: var(--accent-light);
    line-height: 1;
    display: inline;
}

.hero-stat-suffix {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    color: var(--accent-light);
}

.hero-stat-label {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    line-height: 1.4;
}

.hero-stat-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
}

.scroll-indicator {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    transition: var(--transition);
    animation: bounce 2s ease infinite;
}

.scroll-indicator:hover {
    color: rgba(255, 255, 255, 0.7);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========================================
   NAVIGATION
   ======================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.nav.visible {
    transform: translateY(0);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition);
    padding: 4px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: 120px 0;
    position: relative;
}

.section-dark {
    background: var(--bg-dark);
    color: var(--text-light);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 80px;
}

.section-number {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 16px;
}

.section-dark .section-number {
    color: var(--accent-light);
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.section-description {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-secondary);
}

.section-dark .section-description {
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   COMPARISON GRID (Scale Section)
   ======================================== */

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.comparison-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
}

.comparison-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.comparison-card.accent {
    background: linear-gradient(135deg, rgba(212, 56, 13, 0.15), rgba(212, 56, 13, 0.05));
    border-color: rgba(212, 56, 13, 0.3);
}

.comparison-icon {
    color: var(--accent-light);
    margin-bottom: 20px;
    opacity: 0.8;
}

.comparison-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-light);
    line-height: 1;
    margin-bottom: 8px;
}

.comparison-label {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.comparison-context {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.comparison-cite {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 8px;
    font-style: italic;
}

/* ========================================
   CITATIONS (global)
   ======================================== */

.inline-cite {
    font-size: 0.78em;
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
    margin-left: 2px;
}

.section-dark .inline-cite {
    color: rgba(255, 255, 255, 0.35);
}

.chart-source {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
    line-height: 1.4;
}

.section-dark .chart-source {
    color: rgba(255, 255, 255, 0.3);
}

.hero-stat-cite {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6px;
    font-style: italic;
}

.stat-highlight-cite {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 8px;
    font-style: italic;
}

.big-number-cite {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 8px;
    font-style: italic;
}

.solution-cite {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.iq-cite {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.iq-explainer-source {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 16px;
}

/* ========================================
   CHARTS
   ======================================== */

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.section-dark .chart-container {
    background: var(--bg-card-dark);
    border-color: var(--border-dark);
}

.chart-container.large {
    grid-column: 1 / -1;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.chart-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.section-dark .chart-subtitle {
    color: rgba(255, 255, 255, 0.5);
}

canvas {
    max-height: 400px;
}

/* ========================================
   MAP
   ======================================== */

.map-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

#leaflet-map {
    height: 600px;
    width: 100%;
    background: #1a1a2e;
}

.map-legend {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    z-index: 1000;
    font-size: 13px;
    box-shadow: var(--shadow-md);
}

.map-legend h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.critical { background: #c0392b; box-shadow: 0 0 8px rgba(192, 57, 43, 0.5); }
.legend-dot.severe { background: #e67e22; }
.legend-dot.elevated { background: #f1c40f; }
.legend-dot.comparison { background: #3498db; }

/* Site Detail Panel */
.site-detail {
    margin-top: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    position: relative;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.4s ease;
}

.site-detail.hidden {
    display: none;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.site-detail-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 4px;
    transition: var(--transition);
}

.site-detail-close:hover {
    color: var(--text-primary);
}

.site-detail h3 {
    font-family: var(--font-serif);
    font-size: 28px;
    margin-bottom: 4px;
}

.site-detail .site-location {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
}

.site-detail .site-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.site-stat-item {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.site-stat-item .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.site-stat-item .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.site-detail .site-narrative {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.site-detail .site-narrative p {
    margin-bottom: 12px;
}

.site-detail .site-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.site-tag.critical { background: rgba(192, 57, 43, 0.1); color: #c0392b; }
.site-tag.severe { background: rgba(230, 126, 34, 0.1); color: #e67e22; }
.site-tag.elevated { background: rgba(241, 196, 15, 0.1); color: #b7950b; }
.site-tag.comparison { background: rgba(52, 152, 219, 0.1); color: #2980b9; }

/* ========================================
   BATTERY CRISIS SECTION
   ======================================== */

.process-flow {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.process-step {
    flex: 1 1 0;
    min-width: 180px;
    max-width: 240px;
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    /* Force equal height across all steps */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.process-step.danger {
    border-color: rgba(212, 56, 13, 0.3);
    background: linear-gradient(180deg, rgba(212, 56, 13, 0.1) 0%, var(--bg-card-dark) 100%);
}

.process-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.process-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.process-step.danger .process-icon {
    color: var(--accent-light);
}

.process-step h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.process-step p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
    flex-grow: 1;
}

.process-arrow {
    color: rgba(255, 255, 255, 0.2);
    padding-top: 70px;
    flex-shrink: 0;
}

/* Stat Highlights */
.stat-highlight-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.stat-highlight {
    text-align: center;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
}

.stat-highlight-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.stat-highlight-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Callout Box */
.callout-box {
    display: flex;
    gap: 20px;
    padding: 32px;
    border-radius: var(--radius-lg);
    background: rgba(212, 56, 13, 0.08);
    border: 1px solid rgba(212, 56, 13, 0.2);
    margin-top: 40px;
}

.callout-box.light {
    background: rgba(39, 174, 96, 0.08);
    border-color: rgba(39, 174, 96, 0.2);
}

.callout-box.light .callout-icon {
    color: var(--success);
}

.callout-icon {
    color: var(--accent-light);
    flex-shrink: 0;
    margin-top: 2px;
}

.callout-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.callout-content p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.callout-box.light .callout-content p {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   IQ SECTION
   ======================================== */

.iq-explainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 80px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.iq-card {
    display: grid;
    grid-template-columns: 100px 1fr 160px;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.iq-card.highlight {
    border-color: var(--accent);
    background: rgba(212, 56, 13, 0.03);
}

.iq-card.danger {
    border-color: var(--danger);
}

.iq-level {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.iq-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.iq-loss {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    text-align: right;
}

.iq-bar {
    grid-column: 1 / -1;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    position: relative;
}

.iq-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    transition: width 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.iq-card.fade-in.visible .iq-bar::after {
    width: var(--width);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.subsection-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
}

.subsection-title.centered {
    text-align: center;
}

.col p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Threshold Timeline */
.threshold-timeline {
    margin-top: 80px;
    padding: 0 40px;
}

.threshold-track {
    position: relative;
    height: 120px;
    margin-top: 40px;
}

.threshold-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
    transform: translateY(-50%);
}

.threshold-item {
    position: absolute;
    left: var(--pos);
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.threshold-year {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    position: relative;
    top: -30px;
}

.threshold-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 6px 12px;
    border-radius: 100px;
    border: 2px solid var(--border);
    white-space: nowrap;
    position: relative;
    top: 30px;
}

.threshold-item.active .threshold-value {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ========================================
   ECONOMICS SECTION
   ======================================== */

.big-number-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.big-number-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
}

.big-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--accent-light);
    line-height: 1;
    margin-bottom: 12px;
}

.big-number-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.big-number-context {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   TIMELINE
   ======================================== */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item.left {
    justify-content: flex-start;
    padding-right: calc(50% + 40px);
    text-align: right;
}

.timeline-item.right {
    justify-content: flex-end;
    padding-left: calc(50% + 40px);
}

.timeline-date {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    background: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    border: 2px solid var(--border);
    z-index: 1;
    white-space: nowrap;
}

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.timeline-card.danger {
    border-color: rgba(192, 57, 43, 0.3);
    background: rgba(192, 57, 43, 0.03);
}

.timeline-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   SOLUTIONS
   ======================================== */

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.solution-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
}

.solution-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.solution-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 12px;
}

.solution-card h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.solution-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 16px;
}

.solution-stat {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    padding-top: 16px;
    border-top: 1px solid var(--border-dark);
}

.solution-stat strong {
    color: var(--accent-light);
}

/* ========================================
   SOURCES
   ======================================== */

.sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.source-category h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.source-category ul {
    list-style: none;
}

.source-category li {
    margin-bottom: 10px;
}

.source-category a {
    font-size: 14px;
    color: var(--blue);
    transition: var(--transition);
    line-height: 1.5;
}

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

.methodology-note {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
}

.methodology-note h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.methodology-note p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 80px 0;
    text-align: center;
}

.footer-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.footer-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

@media (max-width: 1024px) {
    .chart-row {
        grid-template-columns: 1fr;
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .process-arrow {
        display: none;
    }

    .process-flow {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .hero-stat-divider {
        width: 60px;
        height: 1px;
    }

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

    .stat-highlight-row {
        grid-template-columns: 1fr;
    }

    .big-number-row {
        grid-template-columns: 1fr;
    }

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

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

    .timeline-item.left,
    .timeline-item.right {
        padding-left: 60px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-line {
        left: 20px;
    }

    .timeline-date {
        left: 20px;
    }

    .iq-card {
        grid-template-columns: 80px 1fr;
    }

    .iq-loss {
        text-align: left;
    }

    .threshold-timeline {
        padding: 0;
    }

    .threshold-track {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .threshold-track::before {
        display: none;
    }

    .threshold-item {
        position: static;
        transform: none;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .threshold-year {
        position: static;
        min-width: 50px;
    }

    .threshold-value {
        position: static;
    }

    .nav-links {
        gap: 16px;
    }

    .callout-box {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .chart-container {
        padding: 20px;
    }
}

/* Map mobile */
@media (max-width: 768px) {
    #leaflet-map {
        height: 450px;
    }

    .map-legend {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 12px;
        border-radius: var(--radius-md);
    }
}

/* Selection highlight */
::selection {
    background: rgba(212, 56, 13, 0.2);
    color: inherit;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 16px !important;
    font-family: var(--font-sans) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.leaflet-popup-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.leaflet-popup-content .popup-severity {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.leaflet-popup-content .popup-severity.critical { color: #c0392b; }
.leaflet-popup-content .popup-severity.severe { color: #e67e22; }
.leaflet-popup-content .popup-severity.elevated { color: #b7950b; }

.leaflet-popup-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.leaflet-popup-content .popup-link {
    color: var(--blue);
    cursor: pointer;
    font-weight: 500;
}

.leaflet-popup-content .popup-link:hover {
    text-decoration: underline;
}

/* Leaflet tooltip styling */
.map-tooltip {
    font-family: var(--font-sans) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}

/* Ensure circle markers show pointer cursor */
.leaflet-interactive {
    cursor: pointer !important;
}
