/* ============================================
   HEAT-HEALTH RISK INDEX — styles.css
   Shared across Homepage, Data, Resources
   ============================================ */

/* VARIABLES */
:root {
  --coral: #D85A30;
  --coral-light: #F0997B;
  --coral-pale: #FAECE7;
  --slate: #2C3E50;
  --slate-mid: #4A5E70;
  --slate-light: #8DA0B0;
  --slate-pale: #EEF2F5;
  --white: #FFFFFF;
  --text: #1A2530;
  --text-muted: #5A6E7E;
  --border: #D8E2E9;
}

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

/* BODY */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

/* ============================================
   NAV — all pages
   ============================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--slate);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 64px;
  border-bottom: 3px solid var(--coral);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo span {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  color: var(--white);
  letter-spacing: 0.01em;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--coral-light); }

/* ============================================
   FOOTER — all pages
   ============================================ */
footer {
  background: var(--slate);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2.5rem;
  font-size: 13px;
  margin-top: 4rem;
}
footer strong { color: rgba(255,255,255,0.85); }

/* ============================================
   HOMEPAGE — hero
   ============================================ */
.hero {
  background: var(--slate);
  padding: 7rem 3rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(216,90,48,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral-light);
  border: 1px solid rgba(216,90,48,0.5);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero h1 em { font-style: italic; color: var(--coral-light); }
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.65);
  max-width: 580px;
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--coral);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}
.hero-cta:hover { background: #bf4f28; }

/* HOMEPAGE — stat strip */
.stat-strip {
  background: var(--coral);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat-item {
  padding: 2rem 2.5rem;
  border-right: 1px solid rgba(255,255,255,0.2);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  color: var(--white);
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

/* HOMEPAGE — purpose section */
section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem;
}
h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--slate);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}
p { color: var(--text-muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ============================================
   DATA + RESOURCES — shared page header
   ============================================ */
.page-header {
  background: var(--slate);
  padding: 4rem 3rem 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(216,90,48,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.page-header-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.page-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral-light);
  display: block;
  margin-bottom: 0.75rem;
}
.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.page-header p {
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0;
}
.page-header a {
  color: var(--coral-light);
  text-decoration: none;
  font-weight: 500;
}
.page-header a:hover {
  text-decoration: underline;
  color: var(--coral);
}

/* SHARED — main content wrapper */
.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

/* ============================================
   DATA PAGE
   ============================================ */
.section-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  display: block;
  margin-bottom: 0.6rem;
}
.section-intro {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 2rem;
}
.data-section { margin-bottom: 5rem; }
.data-section + .data-section {
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

/* Visualization placeholder */
.viz-placeholder {
  background: var(--slate-pale);
  border: 2px dashed var(--border);
  border-radius: 8px;
  min-height: 420px;
  margin: 1.5rem 0 2rem;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin: 1.5rem 0;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead { background: var(--slate); color: var(--white); }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--slate-pale); }
tbody td { padding: 11px 16px; color: var(--text-muted); }
tbody td:first-child { color: var(--text); font-weight: 500; }
.risk-high { color: #993C1D; font-weight: 600; }
.risk-med  { color: #854F0B; font-weight: 600; }
.risk-low  { color: #3B6D11; font-weight: 600; }

/* Conclusion box */
.conclusion-box {
  background: var(--slate);
  border-radius: 8px;
  padding: 2.5rem 3rem;
  margin-top: 2rem;
}
.conclusion-box h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 1rem;
}
.conclusion-box p { color: rgba(255,255,255,0.65); margin-bottom: 0.75rem; }
.conclusion-box p:last-child { margin-bottom: 0; }

/* ============================================
   RESOURCES PAGE
   ============================================ */
.resources-group { margin-bottom: 3.5rem; }
.group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}
.resource-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.resource-card:last-child { border-bottom: none; }
.resource-body h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 0.35rem;
}
.resource-body h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.resource-body h3 a:hover { color: var(--coral); border-color: var(--coral); }
.resource-meta {
  font-size: 12px;
  color: var(--slate-light);
  margin-bottom: 0.5rem;
}
.resource-summary { font-size: 14px; color: var(--text-muted); }