/* ==========================================================================
   Greg for Vermont — campaign site styles
   Palette is fixed to the printed sign artwork so screen and yard sign match.
   No JavaScript, no external requests: everything here is self-hosted.
   ========================================================================== */

:root {
  /* Brand — sampled directly from sign.png */
  --navy: #0a1f63;
  --navy-deep: #071648;
  --red: #d81f26;
  --red-dark: #b3161c;
  --white: #ffffff;

  /* Supporting neutrals */
  --paper: #f4f6fb;
  --ink: #14192b;
  --ink-muted: #4a5568;
  --rule: #dde3f0;

  /* Type scale — fluid, so it reads well from 320px to ultrawide */
  --step-0: clamp(1.0625rem, 0.99rem + 0.36vw, 1.25rem);
  --step-1: clamp(1.25rem, 1.13rem + 0.6vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.31rem + 0.95vw, 2rem);
  --step-3: clamp(1.875rem, 1.55rem + 1.6vw, 2.75rem);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 9vw, 6.5rem);

  --shadow-sm: 0 1px 2px rgb(10 31 99 / 0.06), 0 2px 8px rgb(10 31 99 / 0.06);
  --shadow-md: 0 4px 12px rgb(10 31 99 / 0.08), 0 12px 32px rgb(10 31 99 / 0.10);

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--navy);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--red-dark);
}

/* Visible focus for keyboard users — never remove this. */
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  width: min(70rem, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  width: min(52rem, 100%);
}

.section {
  padding-block: var(--section-y);
}

.section--paper {
  background: var(--paper);
  border-block: 1px solid var(--rule);
}

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

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

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -110%);
  z-index: 10;
  background: var(--white);
  color: var(--navy);
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* Section eyebrow + heading pairing, used across the page. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  flex: none;
}

.section--navy .eyebrow {
  /* Red on navy is only ~3:1 — not accessible for text. Use white instead
     and let the rule carry the brand color. */
  color: var(--white);
}

.section-title {
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section--navy .section-title {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Hero — the sign artwork sits on its own background color (#0a1f63), so the
   image edges vanish and the lettering reads as native page content.
   -------------------------------------------------------------------------- */

.hero {
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem);
  text-align: center;
  overflow: hidden;
}

.hero__sign {
  width: min(46rem, 100%);
  margin: 0 auto;
}

.hero__rule {
  width: 5rem;
  height: 4px;
  margin: clamp(1.75rem, 4vw, 2.5rem) auto clamp(1.25rem, 3vw, 1.75rem);
  background: var(--red);
  border: 0;
  border-radius: 2px;
}

.hero__district {
  max-width: 40rem;
  margin-inline: auto;
  font-size: var(--step-1);
  font-weight: 600;
  color: #cfd8f2;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  justify-content: center;
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
}

/* Stacked buttons of different label lengths look ragged; match their widths. */
@media (max-width: 30rem) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    max-width: 19rem;
    margin-inline: auto;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem; /* comfortable 48px touch target */
  padding: 0.75rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.15s ease;
}

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

.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* On navy, red only reaches 2.98:1 against the background — just under the 3:1
   WCAG requires for identifying a UI component's boundary. A faint white ring
   lifts the edge to ~3.5:1 without changing the button's character. */
.hero .btn--primary,
.section--navy .btn--primary {
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.4);
}

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

.btn--ghost {
  background: transparent;
  border-color: rgb(255 255 255 / 0.55);
  color: var(--white);
}

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

/* --------------------------------------------------------------------------
   Statement — portrait alongside the candidate's own words
   -------------------------------------------------------------------------- */

.statement__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

@media (min-width: 56rem) {
  .statement__grid {
    grid-template-columns: minmax(15rem, 20rem) 1fr;
  }
}

.portrait {
  margin: 0;
}

.portrait__img {
  width: 100%;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}

.portrait__caption {
  margin-top: 1rem;
  padding-left: 0.875rem;
  border-left: 4px solid var(--red);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose p {
  max-width: var(--measure);
}

.statement__lead {
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--navy);
}

.signoff {
  display: block;
  margin-top: 1.75rem;
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
}

/* --------------------------------------------------------------------------
   Pull quote — a navy band between the white sections where the candidate
   speaks for himself. The color shift is the signal that this is someone
   else's voice.
   -------------------------------------------------------------------------- */

.quoteband {
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(3rem, 7vw, 4.5rem);
  text-align: center;
}

.pullquote {
  margin: 0;
}

/* Red rule as the opening mark, so it never competes with the real
   quotation glyphs in the text. */
.pullquote::before {
  content: "";
  display: block;
  width: 3.5rem;
  height: 4px;
  margin: 0 auto clamp(1.5rem, 3vw, 2rem);
  background: var(--red);
  border-radius: 2px;
}

.pullquote__body {
  margin: 0;
}

.pullquote__body p {
  margin: 0;
  margin-inline: auto;
  max-width: 30ch;
  font-size: clamp(1.375rem, 1.1rem + 1.35vw, 2.125rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.pullquote__attr {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cfd8f2;
}

.pullquote__attr cite {
  font-style: italic;
}

/* Inherits the attribution color rather than using --red: red on navy is only
   2.98:1, which would leave the separator all but invisible. */
.pullquote__date::before {
  content: "\00b7";
  margin-inline: 0.5em;
  font-weight: 800;
}

/* Stack the date under the byline when the line gets tight. */
@media (max-width: 26rem) {
  .pullquote__date {
    display: block;
  }

  .pullquote__date::before {
    content: none;
  }
}

/* --------------------------------------------------------------------------
   Issues
   -------------------------------------------------------------------------- */

.issues__list {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  margin: clamp(2.25rem, 5vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .issues__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.issue {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Red cap across the top of each card — brand accent, no text contrast risk. */
.issue::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--red);
}

.issue__num {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}

.issue__title {
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--navy);
  text-transform: uppercase;
}

.issue__body {
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   Roots / family photo
   -------------------------------------------------------------------------- */

.roots__figure {
  margin: clamp(2rem, 5vw, 2.75rem) 0 0;
}

.roots__img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.roots__caption {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Donate
   -------------------------------------------------------------------------- */

.donate__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  align-items: center;
  margin-top: clamp(2rem, 5vw, 2.75rem);
}

@media (min-width: 48rem) {
  .donate__grid {
    grid-template-columns: auto 1fr;
  }
}

.qr-card {
  justify-self: center;
  padding: 1rem;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.qr-card__img {
  width: clamp(11rem, 40vw, 15rem);
  height: auto;
}

.donate__copy > * + * {
  margin-top: 1rem;
}

.donate__actions {
  margin-block: 1.5rem;
}

.donate__note {
  color: #cfd8f2;
}

.donate__email {
  color: var(--white);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Footer — required campaign finance disclosure
   -------------------------------------------------------------------------- */

.footer {
  background: var(--navy-deep);
  color: #c3cdea;
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  font-size: 0.9375rem;
}

.footer__grid {
  display: grid;
  gap: 1.5rem 3rem;
}

@media (min-width: 40rem) {
  /* 12rem, not 14rem: at 14rem the fourth column (Follow) no longer fit on one
     row and dropped to a second line with dead space beside it. The longest
     cell is the email address, which sets the real floor here. */
  .footer__grid {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  }
}

.footer__name {
  margin: 0 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
  text-transform: uppercase;
}

.footer address {
  font-style: normal;
  line-height: 1.7;
}

.footer a {
  color: var(--white);
}

.footer a:hover {
  color: var(--white);
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.15em;
}

.footer__social {
  margin: 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  /* Vertical padding gets the tap target to ~44px without visibly changing
     the footer's rhythm. */
  padding-block: 0.6rem;
  font-weight: 600;
  text-decoration: none;
}

.social-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 0.15em;
  text-underline-offset: 0.2em;
}

.social-link__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex: none;
}

.footer__rule {
  height: 4px;
  margin: 0 0 2rem;
  background: var(--red);
  border: 0;
  border-radius: 2px;
  width: 4rem;
}

/* --------------------------------------------------------------------------
   Print — voters do print these
   -------------------------------------------------------------------------- */

@media print {
  .hero,
  .section--navy,
  .footer {
    background: #fff !important;
    color: #000 !important;
  }

  .hero__actions,
  .skip-link {
    display: none !important;
  }

  .section-title,
  .issue__title,
  .footer__name {
    color: #000 !important;
  }

  .issue {
    break-inside: avoid;
    box-shadow: none;
  }
}
