/* ==========================================================================
   Pete Herron for Sheriff — Montgomery County, NC
   Self-contained stylesheet. No external fonts / CDNs. System font stack.
   Brand: RED #dd3333 · NAVY #12305a · WHITE · GOLD #f2c14e
   ========================================================================== */

:root {
  --red: #dd3333;
  --red-dark: #b71f1f;
  --navy: #12305a;
  --navy-dark: #0d2444;
  --navy-light: #1c4680;
  --gold: #f2c14e;
  --white: #ffffff;
  --ink: #1a1f2b;
  --muted: #5a6472;
  --bg: #f6f8fb;
  --card: #ffffff;
  --border: #dfe4ec;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(18, 48, 90, 0.08);
  --shadow-lg: 0 10px 30px rgba(18, 48, 90, 0.16);
  --display: "Helvetica Neue", "Arial Narrow", Arial, system-ui, -apple-system,
    Segoe UI, Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --maxw: 1120px;
}

/* -------- Reset-ish -------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

a {
  color: var(--navy-light);
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  text-transform: uppercase;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.15rem);
  text-transform: uppercase;
  font-weight: 800;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.1rem;
}

/* -------- Accessibility helpers -------- */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3.5rem;
  z-index: 1000;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* -------- Header / Nav -------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 4px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1.1rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 58px;
  width: auto;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: var(--white);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
}

.nav-toggle .bars {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
}

.nav-toggle .bars::before {
  top: -7px;
}
.nav-toggle .bars::after {
  top: 7px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav-menu a[aria-current="page"] {
  color: var(--gold);
}

.btn-contribute {
  background: var(--red);
  color: var(--white) !important;
  text-transform: uppercase;
  font-weight: 800 !important;
  letter-spacing: 0.03em;
}

.btn-contribute:hover {
  background: var(--red-dark) !important;
}

.nav-fb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  padding: 0 !important;
}

.nav-fb:hover {
  background: var(--gold);
}

.nav-fb svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.nav-fb:hover svg {
  fill: var(--navy-dark);
}

/* -------- Buttons -------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: 8px;
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  font-size: 1.05rem;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-red:hover {
  background: var(--red-dark);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover {
  background: var(--navy-dark);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-gold:hover {
  background: #e7ad2f;
}

.btn:active {
  transform: translateY(1px);
}

/* -------- Hero -------- */
.hero {
  background: var(--navy);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  /* subtle star-field accent, kept faint */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
      circle at 12% 22%,
      rgba(242, 193, 78, 0.16) 0 2px,
      transparent 3px
    ),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 45% 85%, rgba(242, 193, 78, 0.1) 0 2px, transparent 3px);
  opacity: 0.7;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 3rem 1.1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-copy h1 {
  color: var(--white);
  margin-bottom: 0.3rem;
}

.hero-copy .lead-vote {
  color: var(--gold);
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.hero-copy .subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.hero-photo img {
  border-radius: var(--radius);
  border: 5px solid var(--gold);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
}

/* -------- Sections / cards -------- */
main {
  display: block;
}

.section {
  padding: 3rem 0;
}

.section.alt {
  background: var(--white);
}

.section-tight {
  padding: 2rem 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.center {
  text-align: center;
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* Accent bar under headings */
.heading-accent::after {
  content: "";
  display: block;
  width: 68px;
  height: 5px;
  background: var(--red);
  border-radius: 3px;
  margin-top: 0.55rem;
}

.heading-accent.center::after {
  margin-left: auto;
  margin-right: auto;
}

/* -------- Bio -------- */
.bio-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-bottom: 2.4rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--border);
}

.bio-section:last-child {
  border-bottom: none;
}

.bio-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
}

.bio-portrait {
  float: none;
  max-width: 320px;
  margin: 0 auto 1rem;
}

.pull-banner {
  background: var(--red);
  color: var(--white);
  text-align: center;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  padding: 1.4rem 1.1rem;
  border-radius: var(--radius);
  margin: 2.4rem 0;
}

/* -------- Donate block -------- */
.donate {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  border-top: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
}

.donate h2 {
  color: var(--white);
}

.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.4rem;
}

.donate-amounts .btn {
  min-width: 96px;
}

/* -------- Forms -------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 5px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.signup-panel {
  background: var(--white);
  color: var(--ink);
}

.field {
  margin-bottom: 1.05rem;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.field .req {
  color: var(--red);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fdfefe;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--navy-light);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

/* honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

fieldset.checks {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0 0 1.05rem;
}

fieldset.checks legend {
  font-weight: 700;
  color: var(--navy);
  padding: 0 0.4rem;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.45rem 0;
}

.check-row input {
  margin-top: 0.28rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.check-row label {
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

.form-status {
  margin-top: 1rem;
  padding: 0;
  font-weight: 600;
}

.form-status:not(:empty) {
  padding: 0.8rem 1rem;
  border-radius: 8px;
}

.form-status.is-success {
  background: #e8f6ec;
  color: #1c6b34;
  border: 1px solid #b7e2c4;
}

.form-status.is-error {
  background: #fdecec;
  color: #a51f1f;
  border: 1px solid #f3c2c2;
}

.form-note {
  font-size: 0.9rem;
  color: var(--muted);
}

/* -------- Two column layout -------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

.grid-2.reverse {
  grid-template-columns: 1fr 1.3fr;
}

/* -------- Empty state (news) -------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.empty-state .star {
  color: var(--gold);
  font-size: 2.4rem;
  line-height: 1;
}

/* -------- Legal pages -------- */
.legal h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.legal .updated {
  color: var(--muted);
  font-style: italic;
}

.legal ul {
  margin: 0 0 1rem 1.3rem;
}

/* -------- Footer -------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.88);
  border-top: 4px solid var(--gold);
  padding: 2.5rem 0 1.6rem;
  font-size: 0.98rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}

.footer-grid h3 {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.footer-paid {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--white);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin: 0.3rem 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-fb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer-fb svg {
  width: 18px;
  height: 18px;
  fill: var(--gold);
  vertical-align: middle;
}

/* -------- Responsive -------- */
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy);
    border-bottom: 4px solid var(--gold);
    padding: 0.6rem 1.1rem 1rem;
    gap: 0.15rem;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    padding: 0.75rem 0.6rem;
    width: 100%;
  }

  .btn-contribute {
    text-align: center;
    margin-top: 0.3rem;
  }

  .nav-fb {
    width: auto;
    height: auto;
    border-radius: 6px;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 0.6rem !important;
  }

  .nav-fb::after {
    content: "Facebook";
    color: var(--white);
    font-weight: 600;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    order: -1;
  }

  .grid-2,
  .grid-2.reverse {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  .brand img {
    height: 48px;
  }

  .card,
  .form-card {
    padding: 1.15rem;
  }
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
