/* Open letter sign-up page, in the Bill Reeside for Congress look:
   navy and red on white, Montserrat Black headlines, Oswald labels. The red band under the
   hero is the debate stage; Bill stands on it. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-var.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1E4079;
  --navy-deep: #142C55;
  --red: #9F0F13;
  --red-deep: #7C0B0E;
  --ink: #15213A;
  --muted: #47536B;
  --line: #C4CDDC;
  --wash: #EEF2F8;
  --paper: #FFFFFF;
  --selected-wash: #FBEDED;
  --radius: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Montserrat", "Helvetica Neue", Helvetica, sans-serif;
  --label: "Oswald", "Arial Narrow", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--navy) var(--wash);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  caret-color: var(--red);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--navy); color: #fff; }

a { color: var(--navy); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.letter a:not([class]):hover, .sign a:not([class]):hover, .masthead-link:hover { color: var(--red); } /* plain text links on light areas only */

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }

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

[hidden] { display: none !important; } /* classes that set display must not un-hide */

.sr, .trap {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.ribbon {
  position: sticky; top: 0; z-index: 15;
  background: #FFF1B8; color: #4A3A00;
  font-family: var(--label); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em; text-align: center;
  padding: 6px 16px;
  border-bottom: 1px solid #E8D27A;
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 72rem; margin: 0 auto;
  padding: 12px 16px;
}
.masthead-logo img { height: 58px; width: auto; }
.masthead-link {
  display: none;
  font-family: var(--label); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.95rem; text-decoration: none;
}

/* ---------- Hero: the stage ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  border-bottom: 18px solid var(--red);
}
.hero-inner {
  position: relative;
  max-width: 72rem; margin: 0 auto;
  padding: 36px 16px 0;
  display: grid;
  grid-template-columns: 1fr;
}
.hero-copy { position: relative; z-index: 2; padding-bottom: 8px; }

.invited {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--label); font-weight: 500; letter-spacing: 0.04em; font-size: 0.95rem;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.35rem, 10.5vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.012em;
  text-wrap: balance;
  max-width: 13ch;
}

.lede {
  margin: 20px 0 0;
  max-width: 34ch;
  font-size: 1.125rem;
  line-height: 1.5;
  color: #fff;
}

.hero-cta {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 24px 0 0;
  min-height: 54px; padding: 0 26px;
  border-radius: var(--radius);
  background: var(--red); color: #fff;
  font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; font-size: 1rem;
  text-decoration: none;
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.hero-cta:hover { background: var(--red-deep); color: #fff; transform: translateY(-1px); }

/* He stands on the red band and runs off the right edge: big enough to read as a person,
   not a stamp. The negative top margin tucks him behind the copy so the hero stays short. */
.hero-bill {
  justify-self: end;
  width: auto;
  height: 470px;
  margin: -26px -30px 0 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
  position: relative; z-index: 1;
}

/* ---------- The letter ---------- */
.letter {
  max-width: 40rem; margin: 0 auto;
  padding: 44px 16px 40px;
}
h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--navy);
  font-size: clamp(1.7rem, 6.2vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.005em;
}
.letter-body { font-size: 1.125rem; line-height: 1.65; max-width: 65ch; }
.letter-body p { margin: 0 0 14px; }
.letter-to {
  font-family: var(--label); font-weight: 600; letter-spacing: 0.01em;
  color: var(--navy); font-size: 1.12rem;
}
.letter-draft {
  display: inline-block;
  margin-top: 6px !important;
  padding: 4px 10px;
  border: 1px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-family: var(--label); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.outlets { margin: 20px 0 0; }
.letter-body .outlets-lead {
  margin: 0 0 4px;
  font-family: var(--label); font-weight: 600; letter-spacing: 0.01em;
  color: var(--navy); font-size: 1rem;
}
.outlets-list {
  margin: 0; padding: 0; list-style: none;
  color: var(--muted); font-size: 0.97rem; line-height: 1.6;
}
.outlets-list li { display: inline; } /* one wrapped run, not thirteen rows */
.outlets-list li:not(:last-child)::after { content: ", "; }
.letter-body .count-note { margin: 18px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ---------- Sign ---------- */
.sign { background: var(--wash); border-top: 1px solid #DCE3EE; }
.sign-inner { max-width: 40rem; margin: 0 auto; padding: 44px 16px 56px; }
.form-note { margin: -6px 0 22px; color: var(--muted); font-size: 0.95rem; }
.req { color: var(--red); font-weight: 700; }
.opt {
  font-family: var(--display); font-weight: 500; text-transform: none; letter-spacing: 0;
  color: var(--muted); font-size: 0.85rem; margin-left: 4px;
}

.row.two { display: grid; grid-template-columns: 1fr; gap: 0 16px; }

.field { margin: 0 0 20px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }

label, legend {
  display: block;
  margin: 0 0 7px;
  font-family: var(--label); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.045em;
  font-size: 0.98rem; line-height: 1.3;
  color: var(--navy);
}
/* Questions read as sentences; only short labels are set in capitals. */
legend { padding: 0; text-transform: none; letter-spacing: 0.01em; font-size: 1.08rem; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea, .link-box input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: 500 1.0625rem/1.4 var(--display);
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
  appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 64, 121, 0.22);
}
[aria-invalid="true"] { border-color: var(--red) !important; }

.select { position: relative; }
.select::after {
  content: "";
  position: absolute; right: 16px; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy);
  transform: rotate(45deg);
  pointer-events: none;
}
select { padding-right: 44px; cursor: pointer; }

.hint { margin: 7px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
.choices .hint { margin: -2px 0 10px; }
.error { margin: 7px 0 0; color: var(--red); font-weight: 700; font-size: 0.95rem; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { margin: 0; position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; min-width: 76px; padding: 0 18px;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  text-transform: none; letter-spacing: 0;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.pill:hover span { border-color: var(--navy); }
.pill input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }

/* The signature: the one box that matters most. */
.signature {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start;
  margin: 8px 0 22px;
  padding: 16px;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
  text-transform: none; letter-spacing: 0;
  font-family: var(--display); font-weight: 500; font-size: 1rem; line-height: 1.5; color: var(--ink);
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.signature input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.signature-box {
  width: 34px; height: 34px;
  border: 2.5px solid var(--navy); border-radius: 7px;
  display: grid; place-items: center;
  color: transparent; background: var(--paper);
  transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), color 160ms var(--ease-out);
}
.signature-text strong { color: var(--navy); font-weight: 800; font-size: 1.1rem; }
.signature:has(input:checked) { border-color: var(--red); background: var(--selected-wash); }
.signature:has(input:checked) .signature-box { background: var(--red); border-color: var(--red); color: #fff; }
.signature:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 2px; }

.nudge {
  margin: -10px 0 22px;
  padding: 12px 14px;
  background: #FFF6DA;
  border: 1px solid #E3C766;
  border-radius: var(--radius);
  color: #4A3A00;
  font-size: 0.97rem;
  line-height: 1.45;
}

.consents .check {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start;
  margin: 0 0 12px;
  font-family: var(--display); font-weight: 500; font-size: 0.98rem; line-height: 1.45;
  text-transform: none; letter-spacing: 0; color: var(--ink);
  cursor: pointer;
}
.consents input[type="checkbox"] { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); cursor: pointer; }

.submit {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 60px; margin: 8px 0 0;
  border: 0; border-radius: var(--radius);
  background: var(--red); color: #fff;
  font: 900 1.1rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.07em;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(124, 11, 14, 0.28);
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.submit:hover { background: var(--red-deep); }
.submit:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(124, 11, 14, 0.28); }
.submit[disabled] { cursor: progress; background: #8E2A2D; }
.spinner {
  display: none;
  width: 20px; height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%;
  animation: spin 800ms linear infinite;
}
.submit[disabled] .spinner { display: inline-block; }

.status { min-height: 1.5em; margin: 12px 0 0; font-weight: 600; color: var(--muted); }
.status.is-error { color: var(--red); }
.privacy { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }

/* ---------- Done ---------- */
.done { outline: none; animation: rise 520ms var(--ease-out) both; }
.done h2 { font-size: clamp(2rem, 8vw, 3rem); }
.done h3 {
  margin: 28px 0 6px;
  font-family: var(--label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.045em;
  color: var(--navy); font-size: 1.2rem;
}
.done-lede { font-size: 1.15rem; margin: 0 0 10px; }
.done-confirm { margin: 0; padding: 14px 16px; background: var(--paper); border: 1px solid #D5DCE8; border-radius: var(--radius); }
.resend { margin: 12px 0 0; font-size: 0.95rem; }
.resend button { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.resend button[disabled] { color: var(--muted); text-decoration: none; cursor: progress; }
.resend-note { display: block; margin-top: 4px; color: var(--muted); }
.link-box { margin: 14px 0 12px; }
.link-box input { border-color: var(--navy); background: var(--paper); font-size: 0.98rem; font-weight: 600; color: var(--navy); }

.share { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 14px;
  border: 2px solid var(--navy); border-radius: var(--radius);
  background: var(--paper); color: var(--navy);
  font: 800 1rem/1 var(--display);
  text-decoration: none; cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.share-btn:hover { background: var(--navy); color: #fff; }
.share-btn.native { grid-column: 1 / -1; background: var(--navy); color: #fff; }
.share-btn.native:hover { background: var(--navy-deep); }
.no-boost { margin: 16px 0 0; color: var(--muted); font-size: 0.95rem; }
.again { margin: 26px 0 0; font-size: 0.95rem; }
.again button { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-deep); color: #DCE4F2;
  padding: 32px 16px 44px; text-align: center;
  font-size: 0.95rem;
}
.footer p { margin: 0 0 12px; }
.footer a { color: #fff; }
.footer a:hover { color: #fff; text-decoration-thickness: 3px; }
.footer .privacy { color: #C3CEE3; max-width: 40ch; margin: 0 auto; }
.disclaimer {
  display: inline-block;
  padding: 8px 16px;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0.35; transform: translateY(14px); clip-path: inset(0 0 12% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}

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

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .row.two { grid-template-columns: 1fr 1fr; }
  .share { grid-template-columns: repeat(3, 1fr); }
  .masthead-logo img { height: 66px; }
}

@media (min-width: 820px) {
  .masthead { padding: 14px 24px; }
  .masthead-link { display: inline-block; }
  .hero-inner {
    grid-template-columns: 1.35fr 1fr;
    align-items: end;
    padding: 64px 24px 0;
    min-height: 460px;
  }
  .hero-copy { padding-bottom: 56px; }
  .lede { font-size: 1.25rem; }
  .hero-bill { height: 660px; margin: 0 -24px 0 0; justify-self: center; }
  .letter { padding: 64px 24px 56px; }
  .sign-inner { padding: 60px 24px 72px; }
}
