<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Climate Justice Analytics Hub</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,800&family=DM+Sans:wght@400;500;600&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0d1117;
--bg-elevated: #161b22;
--fg: #e6edf3;
--muted: #7d8590;
--accent: #d4a012;
--accent-glow: rgba(212, 160, 18, 0.3);
--hazard-heat: #ef4444;
--hazard-flood: #3b82f6;
--hazard-fire: #f97316;
--hazard-drought: #a16207;
--card: #21262d;
--border: #30363d;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
font-family: 'DM Sans', sans-serif;
background: var(--bg);
color: var(--fg);
margin: 0;
overflow-x: hidden;
}
.font-display {
font-family: 'Fraunces', serif;
}
/* Background atmosphere */
.bg-atmosphere {
background:
radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 160, 18, 0.08) 0%, transparent 50%),
radial-gradient(ellipse 60% 40% at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
radial-gradient(ellipse 50% 30% at 10% 90%, rgba(239, 68, 68, 0.05) 0%, transparent 40%),
var(--bg);
}
/* Map visualization */
.map-container {
position: relative;
background: var(--bg-elevated);
border-radius: 16px;
overflow: hidden;
}
.map-grid {
display: grid;
grid-template-columns: repeat(20, 1fr);
gap: 2px;
padding: 20px;
}
.map-cell {
aspect-ratio: 1;
border-radius: 2px;
transition: all 0.3s ease;
position: relative;
}
.map-cell::after {
content: '';
position: absolute;
inset: 0;
border-radius: 2px;
opacity: 0;
transition: opacity 0.3s ease;
}
.map-cell:hover::after {
opacity: 1;
box-shadow: 0 0 12px currentColor;
}
.map-cell.heat { background: rgba(239, 68, 68, 0.6); color: var(--hazard-heat); }
.map-cell.flood { background: rgba(59, 130, 246, 0.6); color: var(--hazard-flood); }
.map-cell.fire { background: rgba(249, 115, 22, 0.6); color: var(--hazard-fire); }
.map-cell.drought { background: rgba(161, 98, 7, 0.6); color: var(--hazard-drought); }
.map-cell.compound {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.7), rgba(59, 130, 246, 0.7));
color: var(--accent);
}
.map-cell.vulnerable {
background: rgba(212, 160, 18, 0.4);
box-shadow: inset 0 0 0 1px var(--accent);
}
/* Hazard toggle buttons */
.hazard-toggle {
padding: 8px 16px;
border-radius: 8px;
border: 1px solid var(--border);
background: var(--card);
color: var(--muted);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
display: flex;
align-items: center;
gap: 8px;
}
.hazard-toggle:hover {
border-color: var(--muted);
}
.hazard-toggle.active {
background: var(--bg-elevated);
color: var(--fg);
border-color: currentColor;
}
.hazard-toggle .dot {
width: 8px;
height: 8px;
border-radius: 50%;
}
/* Stats cards */
.stat-card {
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 24px;
transition: all 0.3s ease;
}
.stat-card:hover {
border-color: var(--accent);
transform: translateY(-2px);
}
.stat-value {
font-family: 'Fraunces', serif;
font-size: 48px;
font-weight: 800;
line-height: 1;
background: linear-gradient(135deg, var(--fg), var(--accent));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* Community cards */
.community-card {
background: linear-gradient(135deg, var(--card) 0%, var(--bg-elevated) 100%);
border: 1px solid var(--border);
border-radius: 16px;
overflow: hidden;
transition: all 0.3s ease;
}
.community-card:hover {
border-color: var(--accent);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent);
}
.compound-bar {
height: 8px;
border-radius: 4px;
background: var(--bg);
overflow: hidden;
display: flex;
}
.compound-bar-segment {
height: 100%;
transition: width 0.6s ease;
}
/* Investment priority */
.priority-indicator {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.priority-critical {
background: rgba(239, 68, 68, 0.15);
color: #f87171;
}
.priority-high {
background: rgba(249, 115, 22, 0.15);
color: #fb923c;
}
.priority-elevated {
background: rgba(212, 160, 18, 0.15);
color: var(--accent);
}
/* Scroll reveal */
.reveal {
opacity: 0;
transform: translateY(30px);
transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
opacity: 1;
transform: translateY(0);
}
/* Navigation */
.nav-link {
color: var(--muted);
text-decoration: none;
font-size: 14px;
font-weight: 500;
transition: color 0.2s ease;
position: relative;
}
.nav-link:hover {
color: var(--fg);
}
.nav-link::after {
content: '';
position: absolute;
bottom: -4px;
left: 0;
width: 0;
height: 2px;
background: var(--accent);
transition: width 0.2s ease;
}
.nav-link:hover::after {
width: 100%;
}
/* Button styles */
.btn-primary {
background: var(--accent);
color: var(--bg);
padding: 14px 28px;
border-radius: 10px;
font-weight: 600;
font-size: 15px;
border: none;
cursor: pointer;
transition: all 0.2s ease;
display: inline-flex;
align-items: center;
gap: 8px;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-secondary {
background: transparent;
color: var(--fg);
padding: 14px 28px;
border-radius: 10px;
font-weight: 600;
font-size: 15px;
border: 1px solid var(--border);
cursor: pointer;
transition: all 0.2s ease;
}
.btn-secondary:hover {
border-color: var(--muted);
background: var(--card);
}
/* Focus states */
button:focus-visible,
a:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
html {
scroll-behavior: auto;
}
}
/* Pulse animation for map */
@keyframes pulse-glow {
0%, 100% { opacity: 0.6; }
50% { opacity: 1; }
}
.map-cell.compound {
animation: pulse-glow 2s ease-in-out infinite;
}
/* Methodology accordion */
.method-item {
border: 1px solid var(--border);
border-radius: 12px;
overflow: hidden;
transition: all 0.3s ease;
}
.method-item:hover {
border-color: var(--muted);
}
.method-header {
padding: 20px 24px;
background: var(--card);
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background 0.2s ease;
}
.method-header:hover {
background: var(--bg-elevated);
}
.method-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease;
background: var(--bg-elevated);
}
.method-item.open .method-content {
max-height: 300px;
}
.method-item.open .method-chevron {
transform: rotate(180deg);
}
.method-chevron {
transition: transform 0.3s ease;
}
</style>
</head>
<body class="bg-atmosphere">
<!-- Navigation -->
<nav class="fixed top-0 left-0 right-0 z-50 backdrop-blur-xl bg-[rgba(13,17,23,0.8)] border-b border-[var(--border)]">
<div class="max-w-7xl mx-auto px-6 py-4 flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-lg bg-gradient-to-br from-[var(--accent)] to-[#8b5a00] flex items-center justify-center">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="text-[var(--bg)]">
<circle cx="12" cy="12" r="10"/>
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
<path d="M2 12h20"/>
</svg>
</div>
<span class="font-display font-semibold text-lg">CJAH</span>
</div>
<div class="hidden md:flex items-center gap-8">
<a href="#map" class="nav-link">Live Map</a>
<a href="#metrics" class="nav-link">Metrics</a>
<a href="#communities" class="nav-link">Communities</a>
<a href="#methodology" class="nav-link">Methodology</a>
</div>
<button class="btn-primary text-sm py-2 px-4">Access Dashboard</button>
</div>
</nav>
<!-- Hero Section -->
<header class="pt-32 pb-20 px-6">
<div class="max-w-7xl mx-auto">
<div class="max-w-3xl">
<div class="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-[var(--card)] border border-[var(--border)] mb-6">
<span class="w-2 h-2 rounded-full bg-green-500 animate-pulse"></span>
<span class="text-sm text-[var(--muted)]">Live analysis • 1,247 communities monitored</span>
</div>
<h1 class="font-display text-5xl md:text-7xl font-800 leading-[1.1] mb-6">
Climate hazards don't fall equally.
<span class="text-[var(--accent)]">Neither should resources.</span>
</h1>
<p class="text-xl text-[var(--muted)] leading-relaxed mb-8 max-w-2xl">
Quantifying disproportionate exposure to compound climate hazards and directing adaptation investments where they're needed most.
</p>
<div class="flex flex-wrap gap-4">
<button class="btn-primary">
Explore the Map
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M5 12h14M12 5l7 7-7 7"/>
</svg>
</button>
<button class="btn-secondary">View Methodology</button>
</div>
</div>
</div>
</header>
<!-- Map Section -->
<section id="map" class="px-6 pb-24">
<div class="max-w-7xl mx-auto">
<div class="reveal">
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4 mb-6">
<div>
<h2 class="font-display text-3xl font-semibold mb-2">Compound Hazard Exposure Map</h2>
<p class="text-[var(--muted)]">Toggle layers to see overlapping climate and vulnerability factors</p>
</div>
<div class="flex flex-wrap gap-2">
<button class="hazard-toggle active" data-layer="heat">
<span class="dot bg-[var(--hazard-heat)]"></span>
Extreme Heat
</button>
<button class="hazard-toggle active" data-layer="flood">
<span class="dot bg-[var(--hazard-flood)]"></span>
Flooding
</button>
<button class="hazard-toggle" data-layer="fire">
<span class="dot bg-[var(--hazard-fire)]"></span>
Wildfire
</button>
<button class="hazard-toggle active" data-layer="vulnerable">
<span class="dot bg-[var(--accent)]"></span>
Vulnerable Communities
</button>
</div>
</div>
<div class="map-container border border-[var(--border)]" id="hazard-map">
<div class="map-grid" id="map-grid"></div>
<!-- Map overlay info -->
<div class="absolute bottom-4 left-4 bg-[var(--bg)] bg-opacity-90 backdrop-blur-sm border border-[var(--border)] rounded-lg p-4 max-w-xs">
<div class="text-sm font-semibold mb-2">Compound Hazard Index</div>
<div class="flex items-center gap-4 text-xs">
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-sm bg-gradient-to-r from-[var(--hazard-heat)] to-[var(--hazard-flood)]"></div>
<span class="text-[var(--muted)]">Heat + Flood</span>
</div>
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-sm" style="background: rgba(212, 160, 18, 0.4); box-shadow: inset 0 0 0 1px var(--accent);"></div>
<span class="text-[var(--muted)]">High Vulnerability</span>
</div>
</div>
</div>
<!-- Hover tooltip -->
<div id="map-tooltip" class="absolute hidden bg-[var(--bg)] border border-[var(--border)] rounded-lg p-3 text-sm pointer-events-none z-10 shadow-xl">
<div class="font-semibold" id="tooltip-title">Census Tract 06037206000</div>
<div class="text-[var(--muted)] text-xs mt-1" id="tooltip-sub">South Los Angeles, CA</div>
<div class="mt-2 pt-2 border-t border-[var(--border)] grid grid-cols-2 gap-2 text-xs">
<div>
<div class="text-[var(--muted)]">Exposure Score</div>
<div class="font-semibold text-[var(--hazard-heat)]" id="tooltip-exposure">94th percentile</div>
</div>
<div>
<div class="text-[var(--muted)]">Vulnerability</div>
<div class="font-semibold text-[var(--accent)]" id="tooltip-vuln">Very High</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Metrics Section -->
<section id="metrics" class="px-6 py-24 bg-[var(--bg-elevated)]">
<div class="max-w-7xl mx-auto">
<div class="reveal">
<h2 class="font-display text-3xl md:text-4xl font-semibold mb-4">Disproportionate Exposure Quantified</h2>
<p class="text-[var(--muted)] text-lg mb-12 max-w-2xl">
Our compound hazard index reveals patterns of environmental injustice across intersecting climate threats.
</p>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<div class="stat-card reveal" style="transition-delay: 0.1s;">
<div class="text-[var(--muted)] text-sm font-medium mb-3">Communities in Crisis</div>
<div class="stat-value" data-target="312">0</div>
<div class="text-[var(--muted)] text-sm mt-2">facing 3+ compound hazards</div>
<div class="mt-4 h-1 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full bg-[var(--hazard-heat)] rounded-full" style="width: 73%;"></div>
</div>
<div class="text-xs text-[var(--muted)] mt-2">73% are communities of color</div>
</div>
<div class="stat-card reveal" style="transition-delay: 0.2s;">
<div class="text-[var(--muted)] text-sm font-medium mb-3">Exposure Gap</div>
<div class="stat-value" data-target="4.2" data-decimal="1">0</div>
<div class="text-[var(--muted)] text-sm mt-2">× higher exposure rate</div>
<div class="mt-4 text-xs">
<span class="text-[var(--accent)]">Low-income communities</span> vs. affluent areas
</div>
</div>
<div class="stat-card reveal" style="transition-delay: 0.3s;">
<div class="text-[var(--muted)] text-sm font-medium mb-3">Adaptation Funding Gap</div>
<div class="stat-value" data-target="847">0</div>
<div class="text-[var(--muted)] text-sm mt-2">million dollars shortfall</div>
<div class="mt-4 text-xs">
In top 10% most vulnerable communities
</div>
</div>
<div class="stat-card reveal" style="transition-delay: 0.4s;">
<div class="text-[var(--muted)] text-sm font-medium mb-3">Investment ROI</div>
<div class="stat-value" data-target="3.8" data-decimal="1">0</div>
<div class="text-[var(--muted)] text-sm mt-2">× return on adaptation</div>
<div class="mt-4 text-xs">
Every $1 in resilience saves $3.80 in disaster recovery
</div>
</div>
</div>
</div>
</section>
<!-- Communities Section -->
<section id="communities" class="px-6 py-24">
<div class="max-w-7xl mx-auto">
<div class="reveal">
<div class="flex flex-col md:flex-row justify-between items-start md:items-end gap-4 mb-12">
<div>
<h2 class="font-display text-3xl md:text-4xl font-semibold mb-2">Priority Investment Communities</h2>
<p class="text-[var(--muted)] text-lg">Communities identified for immediate adaptation investment based on compound exposure and historical underinvestment</p>
</div>
<button class="btn-secondary text-sm py-2 px-4">View Full Priority List</button>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6" id="community-cards">
<!-- Cards will be inserted by JS -->
</div>
</div>
</section>
<!-- Methodology Section -->
<section id="methodology" class="px-6 py-24 bg-[var(--bg-elevated)]">
<div class="max-w-7xl mx-auto">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-16">
<div class="reveal">
<h2 class="font-display text-3xl md:text-4xl font-semibold mb-4">Transparent Methodology</h2>
<p class="text-[var(--muted)] text-lg mb-8">
Our compound hazard index combines climate science with environmental justice indicators to identify communities facing disproportionate, overlapping risks.
</p>
<div class="space-y-3" id="methodology-accordion">
<div class="method-item">
<div class="method-header">
<span class="font-semibold">Compound Hazard Exposure Index</span>
<svg class="method-chevron text-[var(--muted)]" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"/>
</svg>
</div>
<div class="method-content">
<div class="p-6 text-[var(--muted)] text-sm leading-relaxed">
We calculate overlapping exposure to extreme heat, flooding, wildfire, and drought using downscaled climate models at 1km resolution. Compound scores weight co-occurring hazards higher than single events.
</div>
</div>
</div>
<div class="method-item">
<div class="method-header">
<span class="font-semibold">Social Vulnerability Assessment</span>
<svg class="method-chevron text-[var(--muted)]" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"/>
</svg>
</div>
<div class="method-content">
<div class="p-6 text-[var(--muted)] text-sm leading-relaxed">
Incorporates income, race, age, disability, housing quality, healthcare access, and historical redlining maps. Data sources include Census ACS, CDC SVI, and university environmental justice research centers.
</div>
</div>
</div>
<div class="method-item">
<div class="method-header">
<span class="font-semibold">Adaptive Capacity Indicators</span>
<svg class="method-chevron text-[var(--muted)]" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"/>
</svg>
</div>
<div class="method-content">
<div class="p-6 text-[var(--muted)] text-sm leading-relaxed">
Measures community resources for adaptation: green space coverage, cooling center access, flood infrastructure, community organization strength, and local government climate planning capacity.
</div>
</div>
</div>
<div class="method-item">
<div class="method-header">
<span class="font-semibold">Investment Priority Algorithm</span>
<svg class="method-chevron text-[var(--muted)]" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"/>
</svg>
</div>
<div class="method-content">
<div class="p-6 text-[var(--muted)] text-sm leading-relaxed">
Combines exposure index, vulnerability score, and historical underinvestment to generate prioritized investment recommendations. Weights informed by community advisory panels and environmental justice organizations.
</div>
</div>
</div>
</div>
</div>
<div class="reveal" style="transition-delay: 0.2s;">
<div class="bg-[var(--card)] border border-[var(--border)] rounded-2xl p-8">
<h3 class="font-display text-xl font-semibold mb-6">Index Composition</h3>
<div class="space-y-6">
<div>
<div class="flex justify-between text-sm mb-2">
<span>Climate Hazard Exposure</span>
<span class="text-[var(--muted)]">40%</span>
</div>
<div class="h-3 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full rounded-full bg-gradient-to-r from-[var(--hazard-heat)] to-[var(--hazard-fire)]" style="width: 40%;"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-2">
<span>Social Vulnerability</span>
<span class="text-[var(--muted)]">35%</span>
</div>
<div class="h-3 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full rounded-full bg-[var(--accent)]" style="width: 35%;"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-2">
<span>Adaptive Capacity Gap</span>
<span class="text-[var(--muted)]">15%</span>
</div>
<div class="h-3 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full rounded-full bg-[var(--hazard-flood)]" style="width: 15%;"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-2">
<span>Historical Disinvestment</span>
<span class="text-[var(--muted)]">10%</span>
</div>
<div class="h-3 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full rounded-full bg-[var(--muted)]" style="width: 10%;"></div>
</div>
</div>
</div>
<div class="mt-8 pt-6 border-t border-[var(--border)]">
<div class="text-sm text-[var(--muted)] mb-4">Data Sources</div>
<div class="flex flex-wrap gap-2">
<span class="px-3 py-1 bg-[var(--bg)] rounded-full text-xs">NOAA</span>
<span class="px-3 py-1 bg-[var(--bg)] rounded-full text-xs">EPA EJScreen</span>
<span class="px-3 py-1 bg-[var(--bg)] rounded-full text-xs">CDC SVI</span>
<span class="px-3 py-1 bg-[var(--bg)] rounded-full text-xs">Census ACS</span>
<span class="px-3 py-1 bg-[var(--bg)] rounded-full text-xs">FEMA NFHL</span>
<span class="px-3 py-1 bg-[var(--bg)] rounded-full text-xs">CAL FIRE</span>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- CTA Section -->
<section class="px-6 py-24">
<div class="max-w-4xl mx-auto text-center reveal">
<h2 class="font-display text-3xl md:text-5xl font-semibold mb-6">
Data for action, <span class="text-[var(--accent)]">not just awareness</span>
</h2>
<p class="text-xl text-[var(--muted)] mb-10 max-w-2xl mx-auto">
Access our full analytics platform to identify investment priorities, track funding flows, and measure adaptation outcomes in your region.
</p>
<div class="flex flex-wrap justify-center gap-4">
<button class="btn-primary text-lg px-8 py-4">
Request Platform Access
</button>
<button class="btn-secondary text-lg px-8 py-4">
Download API Documentation
</button>
</div>
<div class="mt-12 flex justify-center items-center gap-8 text-[var(--muted)] text-sm">
<div class="flex items-center gap-2">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
</svg>
<span>Open Data License</span>
</div>
<div class="flex items-center gap-2">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"/>
<path d="M12 6v6l4 2"/>
</svg>
<span>Real-time Updates</span>
</div>
<div class="flex items-center gap-2">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/>
<circle cx="9" cy="7" r="4"/>
<path d="M23 21v-2a4 4 0 0 0-3-3.87"/>
<path d="M16 3.13a4 4 0 0 1 0 7.75"/>
</svg>
<span>Community Governance</span>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="px-6 py-12 border-t border-[var(--border)]">
<div class="max-w-7xl mx-auto flex flex-col md:flex-row justify-between items-center gap-6">
<div class="flex items-center gap-3">
<div class="w-8 h-8 rounded-lg bg-gradient-to-br from-[var(--accent)] to-[#8b5a00] flex items-center justify-center">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="text-[var(--bg)]">
<circle cx="12" cy="12" r="10"/>
<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>
<path d="M2 12h20"/>
</svg>
</div>
<span class="font-display font-semibold">Climate Justice Analytics Hub</span>
</div>
<div class="text-[var(--muted)] text-sm">
Open source • Community governed • Data for justice
</div>
</div>
</footer>
<script>
// Data definitions first
const communityData = [
{
name: "South Los Angeles",
state: "California",
tract: "06037206000",
population: 47832,
hazards: [
{ type: "heat", label: "Extreme Heat", score: 94, color: "var(--hazard-heat)" },
{ type: "flood", label: "Flooding", score: 67, color: "var(--hazard-flood)" },
{ type: "drought", label: "Drought", score: 82, color: "var(--hazard-drought)" }
],
vulnerability: "Very High",
priority: "critical",
investment: 12.4,
gap: 8.7
},
{
name: "Seventh Ward",
state: "Louisiana",
tract: "22071005400",
population: 31245,
hazards: [
{ type: "flood", label: "Flooding", score: 98, color: "var(--hazard-flood)" },
{ type: "heat", label: "Extreme Heat", score: 89, color: "var(--hazard-heat)" },
{ type: "fire", label: "Hurricane Wind", score: 91, color: "var(--hazard-fire)" }
],
vulnerability: "Very High",
priority: "critical",
investment: 8.2,
gap: 15.3
},
{
name: "South Bronx",
state: "New York",
tract: "36005013300",
population: 62189,
hazards: [
{ type: "heat", label: "Extreme Heat", score: 88, color: "var(--hazard-heat)" },
{ type: "flood", label: "Flooding", score: 79, color: "var(--hazard-flood)" }
],
vulnerability: "High",
priority: "high",
investment: 5.1,
gap: 11.8
},
{
name: "West Side",
state: "Chicago, IL",
tract: "17031842900",
population: 28471,
hazards: [
{ type: "heat", label: "Extreme Heat", score: 86, color: "var(--hazard-heat)" },
{ type: "flood", label: "Flooding", score: 72, color: "var(--hazard-flood)" }
],
vulnerability: "High",
priority: "high",
investment: 3.8,
gap: 9.2
},
{
name: "Colonias",
state: "Texas",
tract: "48215012200",
population: 18934,
hazards: [
{ type: "heat", label: "Extreme Heat", score: 96, color: "var(--hazard-heat)" },
{ type: "drought", label: "Drought", score: 91, color: "var(--hazard-drought)" },
{ type: "flood", label: "Flash Flood", score: 74, color: "var(--hazard-flood)" }
],
vulnerability: "Very High",
priority: "critical",
investment: 2.1,
gap: 14.6
},
{
name: "Navajo Nation",
state: "Arizona",
tract: "04002010800",
population: 24678,
hazards: [
{ type: "drought", label: "Drought", score: 97, color: "var(--hazard-drought)" },
{ type: "heat", label: "Extreme Heat", score: 84, color: "var(--hazard-heat)" }
],
vulnerability: "Very High",
priority: "elevated",
investment: 4.3,
gap: 7.9
}
];
// Initialize map data
const mapData = [];
const gridSize = 200; // 20x10 grid
// Generate map data
for (let i = 0; i < gridSize; i++) {
const row = Math.floor(i / 20);
const col = i % 20;
const isVulnerable = Math.random() > 0.7;
const hasHeat = Math.random() > 0.6;
const hasFlood = Math.random() > 0.7;
const hasFire = Math.random() > 0.85;
const hasDrought = Math.random() > 0.8;
let types = [];
if (hasHeat) types.push('heat');
if (hasFlood) types.push('flood');
if (hasFire) types.push('fire');
if (hasDrought) types.push('drought');
// Create clusters
const heatCluster = (row > 3 && row < 8 && col > 2 && col < 8) || (row > 5 && row < 9 && col > 14 && col < 19);
const floodCluster = (row > 6 && row < 10 && col > 5 && col < 12);
if (heatCluster && Math.random() > 0.3) {
if (!types.includes('heat')) types.push('heat');
}
if (floodCluster && Math.random() > 0.4) {
if (!types.includes('flood')) types.push('flood');
}
mapData.push({
types,
isVulnerable,
exposure: Math.floor(Math.random() * 40) + 60
});
}
// DOM elements
const mapGrid = document.getElementById('map-grid');
const mapTooltip = document.getElementById('map-tooltip');
const tooltipTitle = document.getElementById('tooltip-title');
const tooltipSub = document.getElementById('tooltip-sub');
const tooltipExposure = document.getElementById('tooltip-exposure');
const tooltipVuln = document.getElementById('tooltip-vuln');
// Track active layers
let activeLayers = {
heat: true,
flood: true,
fire: false,
vulnerable: true
};
// Render map
function renderMap() {
if (!mapGrid) return;
mapGrid.innerHTML = '';
mapData.forEach((cell, index) => {
const div = document.createElement('div');
div.className = 'map-cell';
const relevantTypes = cell.types.filter(t => activeLayers[t]);
const isCompound = relevantTypes.length > 1;
const hasVisibleHazard = relevantTypes.length > 0;
const showVulnerable = cell.isVulnerable && activeLayers.vulnerable;
if (isCompound && hasVisibleHazard) {
div.classList.add('compound');
} else if (hasVisibleHazard) {
// Show highest priority hazard
const priorityOrder = ['heat', 'flood', 'fire', 'drought'];
for (const type of priorityOrder) {
if (relevantTypes.includes(type)) {
div.classList.add(type);
break;
}
}
} else {
div.style.background = 'rgba(48, 54, 61, 0.3)';
}
if (showVulnerable) {
div.classList.add('vulnerable');
}
// Add hover interaction
div.addEventListener('mouseenter', (e) => {
if (!mapTooltip) return;
const rect = div.getBoundingClientRect();
const mapRect = mapGrid.getBoundingClientRect();
mapTooltip.style.left = `${rect.left - mapRect.left + 20}px`;
mapTooltip.style.top = `${rect.top - mapRect.top - 80}px`;
mapTooltip.classList.remove('hidden');
if (tooltipTitle) tooltipTitle.textContent = `Census Tract ${(index + 1000000).toString().slice(0, 11)}`;
if (tooltipSub) {
const subs = ['Los Angeles, CA', 'New Orleans, LA', 'Bronx, NY', 'Houston, TX', 'Phoenix, AZ'];
tooltipSub.textContent = subs[index % subs.length];
}
if (tooltipExposure) tooltipExposure.textContent = `${cell.exposure}th percentile`;
if (tooltipVuln) tooltipVuln.textContent = cell.isVulnerable ? 'Very High' : 'Moderate';
});
div.addEventListener('mouseleave', () => {
if (mapTooltip) mapTooltip.classList.add('hidden');
});
mapGrid.appendChild(div);
});
}
// Render community cards
function renderCommunityCards() {
const container = document.getElementById('community-cards');
if (!container) return;
container.innerHTML = communityData.map((community, index) => `
<div class="community-card reveal" style="transition-delay: ${0.1 + index * 0.1}s;">
<div class="p-6">
<div class="flex justify-between items-start mb-4">
<div>
<h3 class="font-display text-xl font-semibold">${community.name}</h3>
<div class="text-[var(--muted)] text-sm">${community.state} • ${community.tract}</div>
</div>
<div class="priority-indicator priority-${community.priority}">
${community.priority === 'critical' ? '!' : community.priority === 'high' ? '↑' : '●'}
${community.priority.charAt(0).toUpperCase() + community.priority.slice(1)}
</div>
</div>
<div class="flex items-center gap-4 text-sm text-[var(--muted)] mb-4">
<span>${community.population.toLocaleString()} residents</span>
<span>•</span>
<span class="text-[var(--accent)]">${community.vulnerability} Vulnerability</span>
</div>
<div class="space-y-3 mb-6">
${community.hazards.map(h => `
<div>
<div class="flex justify-between text-sm mb-1">
<span>${h.label}</span>
<span style="color: ${h.color};">${h.score}th percentile</span>
</div>
<div class="h-2 bg-[var(--bg)] rounded-full overflow-hidden">
<div class="h-full rounded-full transition-all duration-500" style="width: ${h.score}%; background: ${h.color};"></div>
</div>
</div>
`).join('')}
</div>
<div class="pt-4 border-t border-[var(--border)] grid grid-cols-2 gap-4 text-sm">
<div>
<div class="text-[var(--muted)]">Current Investment</div>
<div class="font-semibold text-lg">$${community.investment}M</div>
</div>
<div>
<div class="text-[var(--muted)]">Funding Gap</div>
<div class="font-semibold text-lg text-[var(--hazard-heat)]">$${community.gap}M</div>
</div>
</div>
</div>
<button class="w-full py-3 bg-[var(--bg)] text-center text-sm font-medium hover:bg-[var(--card)] transition-colors border-t border-[var(--border)]">
View Community Profile
</button>
</div>
`).join('');
}
// Animate stat counters
function animateCounters() {
const statValues = document.querySelectorAll('.stat-value');
statValues.forEach(stat => {
const target = parseFloat(stat.dataset.target) || 0;
const decimal = parseInt(stat.dataset.decimal) || 0;
const duration = 2000;
const startTime = performance.now();
function update(currentTime) {
const elapsed = currentTime - startTime;
const progress = Math.min(elapsed / duration, 1);
const easeOut = 1 - Math.pow(1 - progress, 3);
const current = target * easeOut;
stat.textContent = decimal > 0 ? current.toFixed(decimal) : Math.floor(current).toLocaleString();
if (progress < 1) {
requestAnimationFrame(update);
}
}
requestAnimationFrame(update);
});
}
// Scroll reveal
function setupScrollReveal() {
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
// Animate counters when metrics section is visible
if (entry.target.closest('#metrics') || entry.target.classList.contains('stat-card')) {
animateCounters();
}
}
});
}, { threshold: 0.1, rootMargin: '0px 0px -50px 0px' });
document.querySelectorAll('.reveal').forEach(el => observer.observe(el));
}
// Hazard toggles
function setupHazardToggles() {
const toggles = document.querySelectorAll('.hazard-toggle');
toggles.forEach(toggle => {
toggle.addEventListener('click', () => {
const layer = toggle.dataset.layer;
if (!layer) return;
activeLayers[layer] = !activeLayers[layer];
toggle.classList.toggle('active', activeLayers[layer]);
renderMap();
});
});
}
// Methodology accordion
function setupAccordion() {
const methodItems = document.querySelectorAll('.method-item');
methodItems.forEach(item => {
const header = item.querySelector('.method-header');
if (!header) return;
header.addEventListener('click', () => {
const wasOpen = item.classList.contains('open');
methodItems.forEach(i => i.classList.remove('open'));
if (!wasOpen) {
item.classList.add('open');
}
});
});
}
// Initialize everything
document.addEventListener('DOMContentLoaded', () => {
renderMap();
renderCommunityCards();
setupScrollReveal();
setupHazardToggles();
setupAccordion();
});
</script>
</body>
</html>