/* === CaregiverCrisis.org Design System === */
/* Extracted from caregivercrisis-prototype.html */

:root {
  --ink: #1a1a1a;
  --paper: #faf8f5;
  --paper-warm: #f5f0e8;
  --accent: #c23b22;
  --accent-dark: #9e2f1b;
  --teal: #1a6b5a;
  --teal-light: #e8f4f0;
  --slate: #4a5568;
  --slate-light: #718096;
  --border: #d4cdc4;
  --border-light: #e8e2d9;
  --highlight: #fff3cd;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === UTILITY === */
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 740px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* === NAVIGATION === */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 0;
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.nav-brand {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--ink);
  text-decoration: none; text-transform: uppercase;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.nav-links a {
  font-size: 0.82rem; font-weight: 500; color: var(--slate);
  text-decoration: none; letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* === HERO === */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 3px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: -10%; width: 50%; height: 100%;
  background: radial-gradient(ellipse at 70% 50%, rgba(194, 59, 34, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.hero-eyebrow::before {
  content: ''; display: block; width: 2rem; height: 2px;
  background: var(--accent);
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700; line-height: 1.12;
  max-width: 820px; margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal; color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(194, 59, 34, 0.3);
  text-underline-offset: 4px;
  text-decoration-thickness: 3px;
}
.hero-lede {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.65;
  color: var(--slate); max-width: 640px; margin-bottom: 2rem;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  margin-top: 2.5rem;
}
.hero-stat {
  background: var(--paper); padding: 1.4rem 1.2rem;
}
.hero-stat .number {
  font-family: var(--mono); font-size: 1.8rem; font-weight: 700;
  color: var(--ink); line-height: 1; margin-bottom: 0.4rem;
}
.hero-stat .number.red { color: var(--accent); }
.hero-stat .label {
  font-size: 0.78rem; color: var(--slate-light);
  line-height: 1.35; letter-spacing: 0.01em;
}

/* === STATE HERO (codified from inline styles) === */
.state-hero {
  padding: 3rem 0 2rem;
}
.state-hero h1 {
  font-family: var(--serif); font-size: 2.4rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.state-hero .hero-lede {
  font-size: 1.05rem; color: var(--slate);
  max-width: 640px; margin-bottom: 2rem;
  font-family: var(--serif);
}

/* === SECTION HEADERS === */
.section { padding: 4rem 0; }
.section + .section { border-top: 1px solid var(--border-light); }
.section-number {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--slate-light); margin-bottom: 0.5rem;
}
.section h2 {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 700;
  line-height: 1.2; margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}
.section h2 + p {
  font-size: 1rem; color: var(--slate); max-width: 600px;
  margin-bottom: 2rem; line-height: 1.6;
}

/* === AUDIENCE PATHS === */
.paths {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem; margin-top: 2rem;
}
.path-card {
  border: 1px solid var(--border);
  padding: 1.8rem 1.5rem;
  text-decoration: none; color: var(--ink);
  transition: all 0.25s ease;
  position: relative;
  background: var(--paper);
}
.path-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.path-card::after {
  content: '\2192'; position: absolute; top: 1.8rem; right: 1.5rem;
  font-size: 1.1rem; color: var(--slate-light);
  transition: all 0.25s;
}
.path-card:hover::after { color: var(--accent); transform: translateX(4px); }
.path-icon {
  font-size: 1.6rem; margin-bottom: 0.8rem; display: block;
}
.path-card h3 {
  font-family: var(--sans); font-size: 1rem; font-weight: 700;
  margin-bottom: 0.4rem; padding-right: 1.5rem;
}
.path-card p {
  font-size: 0.82rem; color: var(--slate-light); line-height: 1.45;
}

/* === COMPARISON TABLE === */
.comparison-intro {
  margin-bottom: 1.5rem;
  font-family: var(--serif); font-size: 1.05rem;
  color: var(--slate);
}
.comparison-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.88rem; margin-bottom: 1rem;
}
.comparison-table th {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate-light); text-align: left;
  padding: 0.8rem 1rem; border-bottom: 2px solid var(--ink);
  background: var(--paper-warm);
  position: sticky; top: 3.2rem; z-index: 10;
}
.comparison-table td {
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.comparison-table tr:hover td { background: rgba(26, 107, 90, 0.03); }
.comparison-table .metric-name { font-weight: 600; color: var(--ink); }
.comparison-table .metric-source {
  font-size: 0.72rem; color: var(--slate-light);
  font-family: var(--mono); display: block; margin-top: 0.2rem;
}
.comparison-table .gap-flag {
  display: inline-block; font-size: 0.65rem; font-family: var(--mono);
  padding: 0.15rem 0.4rem; border-radius: 2px;
  font-weight: 600; letter-spacing: 0.04em;
}
.gap-flag.public { background: #e8f4f0; color: #1a6b5a; }
.gap-flag.foia { background: #fce4ec; color: #c23b22; }
.gap-flag.proxy { background: #fff3cd; color: #856404; }
.gap-flag.gap { background: #fce4ec; color: #c23b22; }
.gap-flag.partial { background: #fff3cd; color: #856404; }
.gap-flag.estimated { background: #fff3cd; color: #856404; }
.gap-flag.derived { background: #fff3cd; color: #856404; }
.gap-flag.academic { background: #e8eaf6; color: #3949ab; }
.gap-flag.pending { background: #f3e5f5; color: #7b1fa2; }
.gap-flag.proposal { background: #e8eaf6; color: #3949ab; }
.gap-flag.analysis { background: #fff3cd; color: #856404; }
.gap-flag.monitor { background: #f3e5f5; color: #7b1fa2; }
.cat-row td {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); padding: 1rem;
  background: var(--paper-warm) !important;
  border-bottom: 1px solid var(--border);
}

/* === CALLOUT BLOCKS === */
.callout {
  border-left: 4px solid var(--accent);
  background: rgba(194, 59, 34, 0.04);
  padding: 1.5rem 1.5rem 1.5rem 1.8rem;
  margin: 2rem 0;
}
.callout.teal {
  border-left-color: var(--teal);
  background: rgba(26, 107, 90, 0.04);
}
.callout-label {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.5rem;
}
.callout.teal .callout-label { color: var(--teal); }
.callout p {
  font-family: var(--serif); font-size: 1rem; line-height: 1.6;
  color: var(--ink);
}
.callout p strong { font-weight: 700; }

/* === ACTION TOOLKIT === */
.toolkit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem; margin-top: 1.5rem;
}
.toolkit-item {
  border: 1px solid var(--border); padding: 1.5rem;
  background: var(--paper);
  transition: border-color 0.2s;
}
.toolkit-item:hover { border-color: var(--teal); }
.toolkit-type {
  font-family: var(--mono); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.6rem;
}
.toolkit-item h4 {
  font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem;
}
.toolkit-item p {
  font-size: 0.82rem; color: var(--slate); line-height: 1.45;
  margin-bottom: 0.8rem;
}
.toolkit-dl {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  color: var(--teal); text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.2s;
}
.toolkit-dl:hover { color: var(--accent); }

/* === SITE MAP (ARCHITECTURE) === */
.sitemap {
  background: var(--paper-warm); border: 1px solid var(--border);
  padding: 2.5rem; margin: 2rem 0;
}
.sitemap h3 {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1.5rem; color: var(--ink);
}
.sitemap-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.sitemap-section h4 {
  font-size: 0.88rem; font-weight: 700; margin-bottom: 0.6rem;
  padding-bottom: 0.4rem; border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.sitemap-section ul {
  list-style: none; padding: 0;
}
.sitemap-section li {
  font-size: 0.8rem; color: var(--slate);
  padding: 0.3rem 0; padding-left: 1rem;
  position: relative;
}
.sitemap-section li::before {
  content: ''; position: absolute; left: 0; top: 0.7rem;
  width: 6px; height: 1px; background: var(--border);
}
.sitemap-section li code {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--slate-light); display: block;
}

/* === METHODOLOGY SECTION === */
.methodology-note {
  background: var(--paper-warm);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin: 2rem 0;
  font-size: 0.85rem;
  color: var(--slate);
}
.methodology-note h4 {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.6rem; color: var(--ink);
}

/* === FOOTER === */
footer {
  border-top: 3px solid var(--ink);
  padding: 3rem 0;
  margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.footer-about p {
  font-size: 0.82rem; color: var(--slate); line-height: 1.55;
  margin-bottom: 0.8rem;
}
.footer-col h5 {
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.footer-col a {
  display: block; font-size: 0.82rem; color: var(--slate);
  text-decoration: none; padding: 0.25rem 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.72rem; color: var(--slate-light);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}

/* === COMING SOON BANNER (scaffold pages) === */
.coming-soon-banner {
  background: var(--paper-warm);
  border: 2px dashed var(--border);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0;
}
.coming-soon-banner .badge {
  display: inline-block;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--slate-light);
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  margin-bottom: 1.2rem;
}
.coming-soon-banner h3 {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  margin-bottom: 0.6rem; color: var(--ink);
}
.coming-soon-banner p {
  font-size: 0.88rem; color: var(--slate);
  max-width: 500px; margin: 0 auto; line-height: 1.55;
}

/* === ACTIVE NAV HIGHLIGHTING === */
body[data-section="home"] .nav-links a[href="/"],
body[data-section="home"] .nav-links a[href="index.html"],
body[data-section="crisis"] .nav-links a[href="/crisis/"],
body[data-section="states"] .nav-links a[href="/states/"],
body[data-section="exemption"] .nav-links a[href="/exemption/"],
body[data-section="toolkit"] .nav-links a[href="/toolkit/"],
body[data-section="methodology"] .nav-links a[href="/methodology/"] {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* === STATE GRID (state selector) === */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 2rem 0;
}
.state-grid-item {
  display: block;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
}
.state-grid-item:hover {
  border-color: var(--teal);
  background: var(--teal-light);
}
.state-grid-item.available {
  border-left: 3px solid var(--teal);
}
.state-grid-item.coming-soon {
  color: var(--slate-light);
  background: var(--paper-warm);
}
.state-grid-item .state-badge {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--slate-light);
  margin-top: 0.2rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .comparison-table { font-size: 0.8rem; }
  .comparison-table th, .comparison-table td { padding: 0.5rem 0.6rem; }
  .sitemap-grid { grid-template-columns: 1fr; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-eyebrow { animation: fadeUp 0.6s ease both; }
.hero h1 { animation: fadeUp 0.6s ease 0.1s both; }
.hero-lede { animation: fadeUp 0.6s ease 0.2s both; }
.hero-stats { animation: fadeUp 0.6s ease 0.35s both; }
.path-card { animation: fadeUp 0.5s ease both; }
.path-card:nth-child(1) { animation-delay: 0.1s; }
.path-card:nth-child(2) { animation-delay: 0.2s; }
.path-card:nth-child(3) { animation-delay: 0.3s; }
.path-card:nth-child(4) { animation-delay: 0.4s; }
