/* The Virginia Compact — shared styles
   Palette is sampled from the logo: cream #F7F3E8, navy #192A37, gold #BD9F71. */

:root {
  --cream: #f7f3e8;
  --navy: #192a37;
  --gold: #bd9f71;

  --bg: var(--cream);
  --bg-raised: #fcfaf4;
  --bg-band: var(--navy);
  --ink: var(--navy);
  --ink-soft: #46586a;
  --ink-on-band: var(--cream);
  --ink-on-band-soft: #c3ccd3;
  --accent: var(--gold);
  --accent-ink: #856527;          /* gold dark enough to read as text on cream */
  --rule: rgba(189, 159, 113, 0.45);
  --rule-soft: rgba(25, 42, 55, 0.12);
  --btn-bg: var(--navy);
  --btn-ink: var(--cream);

  --serif: "Libre Caslon Text", "Baskerville", "Georgia", serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

:root[data-theme="dark"] {
  --bg: #15242f;
  --bg-raised: #1c2f3d;
  --bg-band: #0f1b24;
  --ink: var(--cream);
  --ink-soft: #b9c3cb;
  --ink-on-band: var(--cream);
  --ink-on-band-soft: #b9c3cb;
  --accent-ink: #d0b488;
  --rule: rgba(189, 159, 113, 0.4);
  --rule-soft: rgba(247, 243, 232, 0.12);
  --btn-bg: var(--gold);
  --btn-ink: #15242f;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
em { font-style: italic; color: var(--accent-ink); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 18px;
}

.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 40em; }

/* Logo swaps with the theme */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  transition: background-color 0.25s ease;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand img { height: 64px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 34px); }
.nav a {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.theme-toggle {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: none; color: var(--ink);
  border: 1px solid var(--rule); border-radius: 50%;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 16px 28px; border: 1px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-ink);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--accent); }
.btn.on-band { background: var(--gold); border-color: var(--gold); color: #15242f; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 13em; }
.hero .lede { margin-top: 28px; }
.hero-mark {
  position: absolute; z-index: 0;
  right: max(-90px, calc((100vw - var(--wrap)) / 2 - 150px));
  top: 50%; transform: translateY(-50%);
  width: clamp(320px, 44vw, 600px);
  opacity: 0.2; pointer-events: none;
}
@media (min-width: 1000px) { .hero-mark { opacity: 0.55; } .hero h1, .hero .lede { max-width: 620px; } }

/* ---------- Sections ---------- */
section { padding: clamp(60px, 8vw, 104px) 0; }
.section-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head .lede { margin-top: 18px; }
.ruled { border-top: 1px solid var(--rule); }

/* "Who decides" trio */
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.trio > div { padding: 30px 28px 6px 0; }
.trio > div + div { padding-left: 28px; border-left: 1px solid var(--rule); }
.trio .not { font-family: var(--serif); font-style: italic; color: var(--accent-ink); font-size: 1rem; }
.trio h3 { margin: 4px 0 10px; font-size: 1.55rem; }
.trio p { color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 820px) {
  .trio > div, .trio > div + div { padding: 24px 0; border-left: 0; }
  .trio > div + div { border-top: 1px solid var(--rule-soft); }
}

/* Agenda — the articles of the compact */
.articles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 80px); border-top: 1px solid var(--rule); }
.articles li { display: grid; grid-template-columns: 64px 1fr; gap: 6px 14px; padding: 30px 0; border-bottom: 1px solid var(--rule); align-content: start; }
.articles .num { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--accent); grid-row: span 2; }
.articles h3 { align-self: end; }
.articles p { grid-column: 2; color: var(--ink-soft); font-size: 0.98rem; }
@media (max-width: 760px) { .articles { grid-template-columns: 1fr; } .articles li { grid-template-columns: 50px 1fr; } }

/* Dark band */
.band { background: var(--bg-band); color: var(--ink-on-band); }
.band .eyebrow { color: var(--gold); }
.band .lede, .band p { color: var(--ink-on-band-soft); }
.band h2 em { color: var(--gold); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { padding: 20px 0; border-top: 1px solid rgba(189, 159, 113, 0.35); }
.steps li:last-child { border-bottom: 1px solid rgba(189, 159, 113, 0.35); }
.steps strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.25rem; color: var(--ink-on-band); margin-bottom: 4px; }

/* Closing call */
.closing { text-align: center; }
.closing .mark { width: 76px; margin: 0 auto 26px; }
.closing h2 { max-width: 17em; margin: 0 auto; }
.closing .lede { margin: 20px auto 0; }
.closing .btn-row { justify-content: center; }

/* ---------- Donor page ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card { background: var(--bg-raised); border: 1px solid var(--rule); padding: 30px 28px 32px; }
.card .num { font-family: var(--serif); color: var(--accent); font-size: 1.5rem; }
.card h3 { margin: 10px 0 10px; }
.card p { color: var(--ink-soft); font-size: 0.98rem; }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--accent); padding: 9px 16px; margin-bottom: 28px;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.facts { margin: 0; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 220px 1fr; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--serif); font-size: 1.15rem; }
.facts dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 700px) { .facts div { grid-template-columns: 1fr; } }

/* Sign-up form */
.signup { max-width: 760px; margin: 36px auto 0; text-align: left; }
.signup-fields { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 14px; align-items: end; }
.signup label span { display: block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; }
.signup label i { font-style: normal; font-weight: 400; letter-spacing: 0.04em; text-transform: none; color: var(--ink-soft); }
.signup input {
  width: 100%; height: 54px; padding: 0 16px;
  font: inherit; color: var(--ink);
  background: var(--bg-raised); border: 1px solid var(--rule); border-radius: 0;
}
.signup input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.signup .btn { height: 54px; padding: 0 28px; cursor: pointer; font-family: var(--sans); }
.signup .btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.signup-note { margin-top: 16px; font-size: 0.86rem; color: var(--ink-soft); text-align: center; }
.signup-msg { margin-top: 12px; min-height: 1.6em; text-align: center; font-weight: 500; }
.signup-msg.error { color: #a4442f; }
:root[data-theme="dark"] .signup-msg.error { color: #f0a08c; }
.signup-msg.ok { color: var(--accent-ink); }
.signup.done .signup-fields, .signup.done .signup-note { display: none; }
@media (max-width: 700px) { .signup-fields { grid-template-columns: 1fr; } }

.prose p + p { margin-top: 1.1em; }
.prose p { color: var(--ink-soft); font-size: 1.06rem; }
.pull { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.35; border-left: 2px solid var(--accent); padding-left: 24px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 44px 0 52px; font-size: 0.86rem; color: var(--ink-soft); }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 24px 56px; align-items: start; }
.site-footer img { height: 56px; width: auto; }
.site-footer p + p { margin-top: 10px; }
.site-footer nav { display: flex; gap: 22px; margin-bottom: 14px; }
.site-footer nav a { text-decoration: none; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.74rem; color: var(--ink); }
.site-footer nav a:hover { color: var(--accent-ink); }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

@media (max-width: 560px) {
  .brand img { height: 42px; }
  .nav a.hide-sm { display: none; }
  .site-header .wrap { min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
