/* ============================================================
   Ask the Census — static site styles
   Design tokens + page layout. Single CSS file, no build step.
   ============================================================ */

/* Webfonts — civic, institutional. Google Fonts CDN. */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,400..600&family=Public+Sans:ital,wght@0,300..700;1,400..600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Warm neutrals */
  --paper:        #F5F1E8;
  --paper-deep:   #ECE6D6;
  --ink:          #1B1B1B;
  --n-100:        #F0EDE3;
  --n-200:        #E3DFD3;
  --n-300:        #CFC9BB;
  --n-500:        #7E7A71;
  --n-600:        #5B584F;
  --n-700:        #3F3D37;

  /* Brand accents */
  --navy:         #1F3A5F;
  --navy-hover:   #182F4D;
  --navy-soft:    #E5EBF3;
  --brick:        #8B2E2E;
  --ochre:        #B08A3E;

  /* Type */
  --font-serif:   'Source Serif 4', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-sans:    'Public Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SF Mono', Menlo, Consolas, monospace;

  --content:      1180px;
  --content-prose: 720px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain over everything */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url('assets/paper-grain.svg');
  opacity: 0.04;
  mix-blend-mode: multiply;
  z-index: 100;
}

a { color: var(--navy); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 120ms ease-out; }
a:hover { border-bottom-color: var(--ochre); }

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

/* ============================================================
   Header
   ============================================================ */

.site-header {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: sticky; top: 0; z-index: 10;
}
.site-header__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border: 0 !important;
}
.brand__mark { height: 30px; }
.brand__name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.site-nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding: 4px 2px;
}
.site-nav a:hover { border-bottom-color: var(--ochre); }
.cta {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  background: var(--navy);
  color: var(--paper);
  border: 0;
  padding: 9px 16px;
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease-out;
}
.cta:hover { background: var(--navy-hover); border-bottom: 0; }
.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--n-300);
}
.cta--ghost:hover { background: var(--n-100); }

/* ============================================================
   Section scaffolding
   ============================================================ */

section { padding: 0; }

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

.section-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--n-600);
  padding-bottom: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--n-300);
}
.section-label__num { color: var(--brick); }

.rule-top { border-top: 1px solid var(--ink); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 88px 0 96px;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brick);
  margin-bottom: 28px;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6.4vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 0;
  max-width: 1000px;
  color: var(--ink);
}
.hero__title em {
  font-style: italic;
  color: var(--navy);
}
.hero__lede {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--n-700);
  margin: 32px 0 40px;
  max-width: 760px;
}
.hero__ctas {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   Stats strip
   ============================================================ */

.stats {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper-deep);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--content);
  margin: 0 auto;
}
.stat {
  padding: 36px 32px;
  border-right: 1px solid var(--n-300);
}
.stat:last-child { border-right: 0; }
.stat__num {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: 13px;
  color: var(--n-700);
  line-height: 1.4;
}

/* ============================================================
   Generic content blocks
   ============================================================ */

.block {
  padding: 80px 0;
}
.block--narrow .container { max-width: 920px; }

.block__intro {
  display: grid;
  grid-template-columns: minmax(0, 600px) 1fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 48px;
}
.block__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}
.block__lede {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--n-700);
  margin: 0;
}
.block__lede + .block__lede { margin-top: 18px; }

.block__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--n-600);
  line-height: 1.8;
}
.block__meta strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   Prose
   ============================================================ */

.prose {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink);
  max-width: var(--content-prose);
}
.prose p { margin: 0 0 22px; }
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }

/* ============================================================
   Coverage table — what kinds of data we hold
   ============================================================ */

.coverage {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 15px;
}
.coverage thead th {
  text-align: left;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--n-600);
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--ink);
}
.coverage thead th:last-child { text-align: right; }
.coverage tbody td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--n-300);
  vertical-align: top;
}
.coverage tbody tr:last-child td { border-bottom: 1px solid var(--ink); }
.coverage td:last-child {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--n-700);
  white-space: nowrap;
}
.coverage td strong { font-weight: 600; }
.coverage td .desc {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--n-600);
  margin-top: 4px;
}
.coverage tbody tr:hover td { background: var(--n-100); }

/* ============================================================
   Three-column "mission" block
   ============================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.card-block {
  padding-top: 24px;
  border-top: 1px solid var(--n-300);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-block__num {
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--brick);
  font-weight: 500;
}
.card-block__title {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.card-block__body {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--n-700);
  margin: 0;
}

/* ============================================================
   Contact section
   ============================================================ */

.contact {
  background: var(--paper-deep);
  border-top: 1px solid var(--ink);
}
.contact__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 96px 32px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
  align-items: start;
}
.contact__seal { width: 160px; opacity: 0.9; }
.contact__title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 500;
  margin: 0 0 24px;
  color: var(--ink);
}
.contact__body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--n-700);
  margin: 0 0 32px;
  max-width: 600px;
}
.contact__email {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--navy);
  border-bottom: 1px solid var(--n-300);
  padding-bottom: 4px;
  display: inline-block;
}
.contact__email:hover { border-bottom-color: var(--brick); }
.contact__meta {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--n-600);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--ink);
  background: var(--paper);
}
.site-footer__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--n-600);
}
.site-footer a { color: var(--n-700); }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header__inner { padding: 16px 20px; gap: 16px; }
  .container { padding: 0 20px; }

  .hero { padding: 56px 0 64px; }
  .block { padding: 56px 0; }
  .block__intro { grid-template-columns: 1fr; gap: 24px; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 0; border-bottom: 1px solid var(--n-300); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--n-300); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }

  .cards { grid-template-columns: 1fr; gap: 20px; }
  .contact__inner { grid-template-columns: 1fr; gap: 32px; padding: 64px 20px; }
  .contact__seal { width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
