/* =============================================================
   Civic Data Collective — Shared Stylesheet
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@700;800&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:        #0f2240;
  --navy-mid:    #1a3a5c;
  --navy-light:  #234b75;
  --gold:        #c9a227;
  --gold-light:  #e8c04a;
  --gold-pale:   #fdf6e3;
  --bg:          #f5f7fa;
  --white:       #ffffff;
  --text:        #111827;
  --text-mid:    #374151;
  --text-muted:  #6b7280;
  --border:      #e2e8f0;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.14);
  --radius-sm:   6px;
  --radius:      10px;
  --radius-lg:   16px;
  --max:         1100px;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:  'Playfair Display', Georgia, serif;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-mid); text-decoration: none; }
a:hover { color: var(--gold); }

/* ── Layout helpers ─────────────────────────────────────────── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.text-center { text-align: center; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); }
h1 { font-family: var(--font-serif); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { color: var(--text-mid); }

.lead {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--text-mid);
  max-width: 640px;
  line-height: 1.75;
}

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 12px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: -.01em;
}
.nav-brand .brand-icon {
  width: 32px; height: 32px;
  background: var(--gold);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-brand .brand-icon svg { width: 18px; height: 18px; fill: var(--navy); }
.nav-brand span em { font-style: normal; color: var(--gold-light); }
.nav-links {
  display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,.08);
}
.nav-links .nav-cta a {
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
}
.nav-links .nav-cta a:hover { background: var(--gold-light); color: var(--navy); }

/* ── Hero (dark, full-width) ────────────────────────────────── */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 96px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 40%, rgba(201,162,39,.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 10% 80%, rgba(26,90,140,.3) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,162,39,.15);
  border: 1px solid rgba(201,162,39,.35);
  color: var(--gold-light);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}
.hero h1 { color: var(--white); margin-bottom: 24px; }
.hero h1 span { color: var(--gold-light); display: block; }
.hero .lead { color: rgba(255,255,255,.75); margin-bottom: 40px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
}
.stat-item strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-item span { font-size: .85rem; color: rgba(255,255,255,.55); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.35);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,.08); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-mid); border-color: var(--navy-mid); color: var(--white); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px; height: 48px;
  background: var(--gold-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--gold); fill: none; stroke-width: 1.75; }

/* ── Grid ───────────────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 32px; }

/* ── Section headings ───────────────────────────────────────── */
.section-heading { margin-bottom: 48px; }
.section-heading h2 { margin-bottom: 12px; }
.section-heading p { max-width: 560px; }

/* ── Feature list ───────────────────────────────────────────── */
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: .925rem; color: var(--text-mid);
}
.feature-list li::before {
  content: '';
  width: 20px; height: 20px;
  flex-shrink: 0;
  background: var(--gold-pale);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23c9a227'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 2px;
}

/* ── Coming Soon badge ──────────────────────────────────────── */
.coming-soon-badge {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid rgba(201,162,39,.3);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  margin-left: 8px;
  vertical-align: middle;
}
.live-badge {
  background: #ecfdf5;
  color: #065f46;
  border-color: rgba(6,95,70,.2);
}

/* ── Dark section ───────────────────────────────────────────── */
.section-dark {
  background: var(--navy);
  color: var(--white);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p, .section-dark .lead { color: rgba(255,255,255,.7); }
.section-dark .eyebrow { color: var(--gold-light); }
.section-dark .card {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.1);
}
.section-dark .card:hover { background: rgba(255,255,255,.08); }
.section-dark .card h3 { color: var(--white); }
.section-dark .card-icon { background: rgba(201,162,39,.1); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 48px 0 32px;
  color: rgba(255,255,255,.5);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand { max-width: 280px; }
.footer-brand .nav-brand { margin-bottom: 12px; color: var(--white); }
.footer-brand p { font-size: .875rem; line-height: 1.6; }
.footer-links h4 { color: var(--white); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: .875rem; color: rgba(255,255,255,.5); transition: color .15s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8rem;
}

/* ── Page hero (inner pages) ────────────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 56px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.page-hero h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page-hero p  { color: rgba(255,255,255,.65); max-width: 600px; font-size: 1.05rem; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  width: 48px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 16px 0 24px;
}

/* ── Table ──────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  background: var(--navy); color: var(--white);
  padding: 10px 14px; text-align: left; font-weight: 600; font-size: .8rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.data-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-mid); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

/* ── Inline code ────────────────────────────────────────────── */
code {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: .85em;
  background: #eef1f5;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--navy);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .hero-stats { gap: 24px; }
  .nav-links li:not(.nav-cta):not(:last-child) { display: none; }
  .footer-inner { flex-direction: column; }
}
