/* ============================================================
   Carolyn Carter — Bremen Township Democratic Committeewoman
   Design tokens + global stylesheet
   ============================================================ */

:root {
  /* Navy — trust & authority */
  --navy-950: #06112a;
  --navy-900: #0a1834;
  --navy-800: #0e2147;
  --navy-700: #14305f;
  --navy-600: #1b3e78;

  /* Democratic blue — party identity */
  --blue-600: #1d51a8;
  --blue-500: #2566cb;
  --blue-400: #4f8be6;
  --blue-100: #dce8fb;
  --blue-050: #eef4fd;

  /* Red — action & urgency */
  --red-700: #9f1722;
  --red-600: #c2202c;
  --red-500: #d8333f;

  /* Gold — highlights & badges */
  --gold-600: #ad8a1f;
  --gold-500: #c7a233;
  --gold-400: #ddbb55;
  --gold-100: #f6ecd0;

  /* Neutrals */
  --paper: #f4f6f9;
  --paper-warm: #f7f5f1;
  --white: #ffffff;
  --ink: #111a2e;
  --ink-soft: #2b3650;
  --muted: #5d6779;
  --line: #e2e7ef;
  --line-strong: #cfd6e1;

  --shadow-sm: 0 1px 2px rgba(10, 24, 52, .06), 0 2px 6px rgba(10, 24, 52, .05);
  --shadow-md: 0 6px 18px rgba(10, 24, 52, .10), 0 2px 6px rgba(10, 24, 52, .06);
  --shadow-lg: 0 24px 60px rgba(8, 18, 42, .18), 0 8px 20px rgba(8, 18, 42, .10);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 56px);

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 116px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--navy-900); color: #fff;
  padding: 12px 18px; border-radius: 10px; z-index: 200;
  font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  font-weight: 700; color: var(--blue-600);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: var(--red-600); display: inline-block;
}
.eyebrow.on-dark { color: var(--gold-400); }
.eyebrow.on-dark::before { background: var(--gold-500); }

.section-head { max-width: 760px; }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  margin-top: 16px;
}
.section-head .lede {
  margin-top: 18px; font-size: clamp(17px, 1.7vw, 20px);
  color: var(--muted); max-width: 620px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 16px; letter-spacing: -0.01em;
  padding: 14px 22px; border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  min-height: 50px; line-height: 1; text-align: center;
}
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: translateY(1px); }

.btn-red { background: var(--red-600); color: #fff; box-shadow: 0 6px 16px rgba(160, 24, 36, .28); }
.btn-red:hover { background: var(--red-700); box-shadow: 0 10px 22px rgba(160, 24, 36, .34); transform: translateY(-1px); }

.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); transform: translateY(-1px); }

.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-400); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy-700); background: #fff; }

.btn-ghost-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.32); }
.btn-ghost-light:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 16px; font-size: 14px; min-height: 42px; border-radius: 10px; }
.btn-lg { padding: 17px 28px; font-size: 18px; min-height: 58px; }

/* ---------- Badges / chips ---------- */
.ribbon {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px;
  background: var(--gold-100); color: var(--gold-600);
  border: 1px solid rgba(173, 138, 31, .28);
}
.ribbon .star { color: var(--red-600); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600;
  background: #fff; color: var(--navy-800);
  border: 1px solid var(--line-strong);
  transition: transform .14s, border-color .14s, background .14s, color .14s;
  cursor: default;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-500); }
.chip:hover { border-color: var(--blue-500); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
a.chip { cursor: pointer; text-decoration: none; }
a.chip:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }

/* ---------- Seal / monogram ---------- */
.seal {
  --s: 52px;
  width: var(--s); height: var(--s); flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 38%, var(--navy-700), var(--navy-900) 72%);
  border: 2px solid var(--gold-500);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.06);
  position: relative; color: #fff;
}
.seal b {
  font-family: var(--font-display); font-weight: 800;
  font-size: calc(var(--s) * .40); letter-spacing: -0.04em; line-height: 1;
}
.seal .seal-star { position: absolute; bottom: calc(var(--s) * .12); color: var(--gold-400); font-size: calc(var(--s)*.16); }

/* ---------- Image placeholder ---------- */
.ph {
  position: relative; overflow: hidden;
  background-color: #e9edf3;
  background-image: repeating-linear-gradient(135deg,
    rgba(20,48,95,.07) 0 11px, rgba(20,48,95,0) 11px 22px);
  display: grid; place-items: center; text-align: center;
  border-radius: var(--radius);
  color: var(--navy-700);
}
.ph.dark {
  background-color: #0d2046;
  background-image: repeating-linear-gradient(135deg,
    rgba(255,255,255,.05) 0 11px, rgba(255,255,255,0) 11px 22px);
  color: #cdd9ee;
}
.ph .ph-label {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em;
  padding: 7px 12px; border-radius: 8px;
  background: rgba(255,255,255,.82); color: var(--navy-800);
  border: 1px dashed var(--line-strong);
}
.ph.dark .ph-label { background: rgba(8,18,42,.6); color: #dbe6f7; border-color: rgba(255,255,255,.25); }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .25s, border-color .18s;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-100); }

/* generic grid */
.grid { display: grid; gap: 22px; }

/* ---------- Section dark theme ---------- */
.dark-section {
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(37,102,203,.30), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-950));
  color: #eaf0fa;
}
.dark-section .section-head .lede,
.dark-section .muted { color: #aebfd8; }
.dark-section h2, .dark-section h3 { color: #fff; }

/* utility */
.muted { color: var(--muted); }
.center { text-align: center; }
.flag-rule { height: 4px; border-radius: 999px;
  background: linear-gradient(90deg, var(--navy-800) 0 33%, var(--red-600) 33% 66%, var(--gold-500) 66% 100%); }
.stars { color: var(--gold-500); letter-spacing: 3px; }

/* Entrance: visible by default so content never gets stuck hidden if the
   compositor/observer is paused. Animate in only where motion + JS run. */
.fade-up { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal-on .fade-up { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal-on .fade-up.in { opacity: 1; transform: none; }
}
