/* =============================================
   ICT Voter Guide — Stylesheet
   Non-partisan civic design
   Kansas gold + slate palette
   ============================================= */

:root {
  --navy:       #1B2A4A;
  --navy-light: #2C4270;
  --gold:       #E8A020;
  --gold-light: #FDF3DC;
  --slate:      #475569;
  --slate-light:#94A3B8;
  --bg:         #F7F8FA;
  --bg-card:    #FFFFFF;
  --text:       #1A202C;
  --text-muted: #64748B;
  --border:     #E2E8F0;
  --radius:     8px;
  --radius-lg:  14px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.10);
  --max-w:      1100px;

  /* Party badge colors — all neutral, not partisan */
  --party-bg:   #EEF2F7;
  --party-text: #334155;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--navy); text-decoration: underline; }
a:hover { color: var(--navy-light); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* Glossary links */
.gloss-link {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
  text-decoration-color: currentColor;
}
.gloss-link:hover { color: var(--gold); }

/* Offset in-page anchors for sticky header */
[id] { scroll-margin-top: 80px; }

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

/* ── Typography ─────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; line-height: 1.15; color: var(--navy); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 700; color: var(--navy); }
h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
h4 { font-size: 1rem; font-weight: 600; color: var(--slate); }
p  { margin-bottom: 0.75rem; }

/* ── Layout utilities ───────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 3rem 0; }
.section--alt { background: var(--bg-card); }

/* ── Skip link (accessibility) ───────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ── Site Header ─────────────────────────────── */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.site-logo .logo-badge {
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
  font-size: 0.85rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.site-logo:hover { color: var(--gold); text-decoration: none; }

/* Desktop nav */
.site-nav { display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a.active { background: var(--gold); color: var(--navy); font-weight: 700; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 1.5rem;
  line-height: 1;
}
.nav-toggle:focus-visible { outline: 3px solid var(--gold); }

@media (max-width: 680px) {
  .nav-toggle { display: flex; align-items: center; }
  .site-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .site-nav a:last-child { border-bottom: none; }
}

/* ── Hero Banner ─────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -60px;
  top: -60px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(232,160,32,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-label {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 { color: #fff; margin-bottom: 0.75rem; max-width: 620px; }
.hero p  { color: rgba(255,255,255,0.8); max-width: 560px; font-size: 1.1rem; margin-bottom: 1.5rem; }

.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--secondary:hover { border-color: #fff; color: #fff; }
.btn--sm { font-size: 0.85rem; padding: 0.45rem 1rem; }

/* ── Key Dates strip ─────────────────────────── */
.key-dates {
  background: var(--gold-light);
  border-bottom: 2px solid var(--gold);
  padding: 0.85rem 0;
}
.key-dates .container {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.key-date-item { text-align: center; }
.key-date-item .label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--slate); font-weight: 700; }
.key-date-item .value { font-size: 0.95rem; font-weight: 800; color: var(--navy); }
.key-date-divider { color: var(--slate-light); font-size: 1.2rem; }
@media (max-width: 540px) { .key-date-divider { display: none; } .key-dates .container { gap: 1rem; } }

/* ── Section Headings ────────────────────────── */
.section-heading { margin-bottom: 2rem; }
.section-heading .eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.section-heading p { color: var(--text-muted); font-size: 1.05rem; margin-top: 0.5rem; max-width: 600px; }

/* ── Issue Cards ─────────────────────────────── */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.issue-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.issue-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.issue-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}
.issue-card h3 { font-size: 1rem; line-height: 1.3; }
.issue-card p { font-size: 0.9rem; color: var(--text-muted); flex: 1; margin-bottom: 0.75rem; }
.issue-card .card-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
}
.issue-card .card-link:hover { color: var(--gold); text-decoration: none; }

/* ── Race Cards ──────────────────────────────── */
.races-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.race-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}
.race-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; color: inherit; }
.race-card .race-level {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-light);
}
.race-card h3 { font-size: 1.05rem; }
.race-card .race-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.race-tag {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  color: var(--slate);
}
.race-tag--contested { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.race-tag--open     { background: #F0FDF4; border-color: #BBF7D0; color: #15803D; }
.race-tag--primary  { background: var(--gold-light); border-color: var(--gold); color: #92400E; }

/* ── Candidate Section ───────────────────────── */
.party-section { margin-bottom: 2rem; }
.party-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--slate);
  padding: 0.4rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 1rem;
}
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.candidate-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.candidate-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.candidate-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.candidate-name { font-size: 1rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.candidate-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }
.party-badge {
  display: inline-block;
  background: var(--party-bg);
  color: var(--party-text);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}
.incumbent-badge {
  display: inline-block;
  background: #F0FDF4;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.3rem;
}

.candidate-positions { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.candidate-positions li {
  font-size: 0.875rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.pos-topic {
  font-weight: 700;
  color: var(--slate);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 80px;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.candidate-links { margin-top: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.candidate-link {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--navy);
}
.candidate-link:hover { background: var(--gold-light); border-color: var(--gold); text-decoration: none; }

/* ── Ballot Measure Box ──────────────────────── */
.ballot-measure {
  background: #FFF8E7;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}
.ballot-measure .bm-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #92400E;
  margin-bottom: 0.4rem;
}
.ballot-measure h3 { margin-bottom: 0.5rem; }
.ballot-measure .bm-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 540px) { .ballot-measure .bm-sides { grid-template-columns: 1fr; } }
.bm-side { font-size: 0.9rem; }
.bm-side-label { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.35rem; }
.bm-side--for .bm-side-label  { color: #15803D; }
.bm-side--against .bm-side-label { color: #B91C1C; }

/* ── How to Vote strip ───────────────────────── */
.how-to-vote {
  background: var(--navy);
  color: #fff;
  padding: 2.5rem 0;
}
.how-to-vote h2 { color: #fff; margin-bottom: 1.5rem; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.step-card {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.12);
}
.step-num {
  width: 32px; height: 32px;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 900;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}
.step-card h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.35rem; }
.step-card p  { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin: 0; }
.step-card a  { color: var(--gold); }

/* ── Footer ──────────────────────────────────── */
.site-footer {
  background: #111827;
  color: rgba(255,255,255,0.6);
  padding: 2rem 0;
  font-size: 0.85rem;
}
.site-footer .container {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }
.footer-disclaimer {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  max-width: 600px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ── Alert/Warning box ───────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.9rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1rem 0;
}
.alert--info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1e3a5f; }
.alert--warn { background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }

/* ── Responsive tweaks ───────────────────────── */
@media (max-width: 760px) {
  .section { padding: 2rem 0; }
  .hero { padding: 2.5rem 0 2rem; }
  .ballot-measure { padding: 1.25rem; }
}

/* ── Print styles ────────────────────────────── */
@media print {
  .site-header, .nav-toggle, .hero-ctas .btn--secondary { display: none; }
  .site-footer { display: none; }
  .candidate-card { break-inside: avoid; }
}
