/* HaldimandElections.com - clean civic theme
   Palette: white, near-black, one green accent, red reserved for negative areas */

:root {
  --ink: #101010;
  --paper: #ffffff;
  --grey-1: #f4f4f2;
  --grey-2: #e7e7e3;
  --muted: #59595c;
  --line: rgba(16, 16, 16, 0.12);
  --green: #0b6b45;
  --green-soft: #ecf4ef;
  --red: #b3261e;
  --red-soft: #fbf1f0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,16,16,.05), 0 8px 24px rgba(16,16,16,.06);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Open Sans", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.container-narrow { max-width: 860px; }

/* ---------- disclaimer banner ---------- */
.disclaimer-banner {
  background: var(--ink);
  color: #ffffff;
  padding: 10px 0;
  font-size: 13px;
  line-height: 1.55;
}
.disclaimer-banner .container { max-width: none; padding: 0 22px; }
.disclaimer-banner p { max-width: 1180px; margin: 0 auto; }
.disclaimer-banner strong { font-weight: 700; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
}
.wordmark {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.4px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-dot { color: var(--green); font-weight: 700; }
.wordmark-light { color: #fff; font-size: 20px; margin-bottom: 8px; }
.nav-links { display: flex; gap: 4px; overflow-x: auto; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s ease;
}
.nav-links a:hover { background: var(--grey-1); }
.nav-links a.nav-red { color: var(--red); }

/* ---------- hero ---------- */
.hero { padding: 88px 0 72px; }
.hero-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.14;
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.hero h1 strong { font-weight: 800; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 640px; margin-bottom: 34px; }
.countdown { display: flex; gap: 12px; margin-bottom: 34px; flex-wrap: wrap; }
.count-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 86px;
  text-align: center;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.count-box span { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.count-box small { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); font-weight: 700; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(16,16,16,.22); }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); }

/* ---------- sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--grey-1); }
.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.kicker-red { color: var(--red); }
.section h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -0.4px; margin-bottom: 14px; }
.section-intro { color: var(--muted); max-width: 760px; margin-bottom: 40px; font-size: 16.5px; }

/* ---------- map ---------- */
.map-wrap { margin-bottom: 28px; }
.ward-map { background: var(--grey-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.ward-map svg { display: block; width: 100%; height: auto; }
.ward-map path {
  fill: #ffffff;
  stroke: var(--ink);
  stroke-width: 1.6;
  cursor: pointer;
  transition: fill .18s ease;
}
.ward-map path:hover { fill: var(--green-soft); }
.ward-map path.selected { fill: var(--green); }
.ward-map path.selected + text, .ward-map text.hovered { fill: #fff; }
.ward-map text {
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  fill: var(--ink);
  pointer-events: none;
}
.map-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---------- ward cards ---------- */
.ward-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ward-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ward-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.ward-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.ward-card p { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.ward-card .cand-count { font-size: 12.5px; font-weight: 700; color: var(--green); }

/* ---------- ward tabs ---------- */
.ward-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.ward-tabs button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.ward-tabs button:hover { border-color: var(--ink); }
.ward-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- candidate cards ---------- */
.candidate-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.candidate-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.cc-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; flex-wrap: wrap; }
.cc-photo {
  width: 116px; height: 116px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.cc-id { flex: 1; min-width: 220px; }
.cc-name { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
.cc-race {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 3px 12px;
  margin: 8px 0 10px;
}
.cc-contact { font-size: 13.5px; color: var(--muted); }
.cc-contact a { color: var(--muted); }
.cc-flagchip {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  padding: 3px 12px;
  margin: 8px 0 10px;
}
.cc-flagchip a { color: #fff; text-decoration: underline; }

.cc-section { border-radius: 12px; padding: 16px 20px; margin-top: 14px; }
.cc-section h4 {
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.cc-against { background: var(--red-soft); border: 1px solid rgba(179, 38, 30, 0.18); }
.cc-against h4 { color: var(--red); }
.cc-for { background: var(--green-soft); border: 1px solid rgba(11, 107, 69, 0.18); }
.cc-for h4 { color: var(--green); }
.cc-section ul { list-style: none; }
.cc-section li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 14.5px;
}
.cc-against li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 9px; height: 9px; border-radius: 2px; background: var(--red); }
.cc-for li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.cc-section a { color: inherit; font-weight: 600; }
.cc-against a { color: var(--red); }

/* ---------- red flag section ---------- */
.section-red { background: var(--ink); color: #fff; }
.section-red .kicker { color: #ff8a80; }
.section-red .section-intro { color: rgba(255,255,255,.72); }
.redflag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.redflag-card {
  background: #ffffff;
  color: var(--ink);
  border-radius: var(--radius);
  border-top: 5px solid var(--red);
  padding: 22px;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
}
.rf-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.rf-photo { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; border: 2px solid var(--red); flex-shrink: 0; }
.rf-name { font-size: 18px; font-weight: 800; }
.rf-race { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--red); }
.rf-headline { font-size: 14.5px; font-weight: 600; margin-bottom: 12px; line-height: 1.5; }
.redflag-card ul { list-style: none; border-top: 1px solid var(--line); padding-top: 12px; }
.redflag-card li { font-size: 13.5px; margin-bottom: 10px; padding-left: 20px; position: relative; }
.redflag-card li::before { content: ""; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 2px; background: var(--red); }
.redflag-card a { color: var(--red); font-weight: 700; }
.rf-disclaimer { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }

/* ---------- voting info ---------- */
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.vote-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.vote-card h3 { font-size: 16.5px; font-weight: 800; margin-bottom: 12px; }
.vote-card p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.vote-card a { color: var(--green); font-weight: 600; }
.fact-list { list-style: none; margin-bottom: 10px; }
.fact-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.fact-list li span { color: var(--muted); }
.fact-list li strong { font-weight: 700; text-align: right; }
.vote-src { font-size: 12px; color: var(--muted); }

/* ---------- poll ---------- */
.poll-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.poll-tabs { margin-bottom: 20px; }
#poll-form label.poll-option {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
  font-size: 15px;
  font-weight: 600;
}
.poll-option:hover { border-color: var(--ink); }
.poll-option input { accent-color: var(--green); width: 18px; height: 18px; }
.poll-option img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.poll-submit {
  margin-top: 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
}
.poll-submit:hover { filter: brightness(1.08); }
.poll-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.poll-result { margin-bottom: 12px; }
.pr-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.pr-row .pr-pct { font-variant-numeric: tabular-nums; }
.pr-bar { height: 10px; border-radius: 999px; background: var(--grey-2); overflow: hidden; }
.pr-fill { height: 100%; border-radius: 999px; background: var(--green); transition: width .6s ease; }
.pr-fill.mine { background: var(--ink); }
.pr-total { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.85); padding: 54px 0 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 34px; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 10px; }
.footer-note { font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,.72); }
.footer-note a { color: #fff; }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .site-nav { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 16px; }
  .nav-links { width: 100%; }
  .hero { padding: 56px 0 48px; }
  .count-box { min-width: 70px; padding: 10px 12px; }
  .count-box span { font-size: 24px; }
  .cc-head { gap: 14px; }
  .cc-photo { width: 92px; height: 92px; }
}
