/* ---------- Fonts ---------- */

/* Fraunces (free, OFL) for the wordmark and headings: fixed at Bold 700, Soft 50, and Wonky on.
   Optical size stays variable, so big headings get the high-contrast display cut automatically. */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces/Fraunces-Bold-Soft50.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* Gelasio is a free (OFL) font designed to match Georgia's proportions.
   It only downloads on devices without Georgia, such as Android phones. */
@font-face { font-family: "Gelasio"; src: url("../fonts/gelasio/gelasio-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Gelasio"; src: url("../fonts/gelasio/gelasio-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Gelasio"; src: url("../fonts/gelasio/gelasio-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Gelasio"; src: url("../fonts/gelasio/gelasio-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* ---------- Brand ---------- */

:root {
  --blue: #2e5c70;        /* from the logo mockup */
  --blue-deep: #234a5b;
  --blue-tint: #e6eef1;
  --red: #b5432f;         /* brick red: main call to action and occasional accent */
  --red-hover: #9c3624;
  --red-tint: #f6e4df;
  --ink: #1d2a31;
  --ink-soft: #4a5a62;
  --paper: #f7f4ee;
  --white: #ffffff;
  --line: #d8d2c6;

  --serif: Georgia, Gelasio, "Times New Roman", serif;
  --display: "Fraunces", Georgia, Gelasio, serif;

  --header-h: 3.5rem;
  --radius: 6px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.site-header :focus-visible, .hero :focus-visible, .section--blue :focus-visible,
.action-bar :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.75rem; }
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 7vw, 3rem);
  color: var(--blue);
}
h3 { font-size: 1.3rem; font-weight: 700; }

p { margin: 0 0 1rem; }

.skip-link {
  position: absolute; left: 0.5rem; top: -3rem;
  background: var(--white); color: var(--ink); padding: 0.5rem 0.75rem; z-index: 100;
}
.skip-link:focus { top: 0.5rem; }

.container { width: min(100% - 2.5rem, 68rem); margin-inline: auto; }
.container--narrow { max-width: 42rem; }

.section { padding: 3.5rem 0; }
.section--white { background: var(--white); }
.section--blue { background: var(--blue); color: var(--white); }
.section--blue h2 { color: var(--white); }
.section--blue a:not(.button) { color: var(--white); }

.lead { font-size: 1.25rem; }

/* Brick red accent on selected section headings */
#meet-nate h2, #issues h2 { color: var(--red); }
.hint { color: var(--ink-soft); font-style: italic; }

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

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.6rem 1.4rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  text-decoration: none; text-align: center; line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.button--red { background: var(--red); color: var(--white); }
.button--red:hover { background: var(--red-hover); color: var(--white); }
/* On blue backgrounds, red buttons flip to white with red text so they stand out from the blue */
.site-header .button--red, .hero .button--red, .section--blue .button--red, .action-bar .button--red {
  background: var(--white); color: var(--red);
}
.site-header .button--red:hover, .hero .button--red:hover, .section--blue .button--red:hover, .action-bar .button--red:hover {
  background: var(--red-tint); color: var(--red-hover);
}
.button--blue { background: var(--blue); color: var(--white); }
.button--blue:hover { background: var(--blue-deep); color: var(--white); }
.button--outline-light { border-color: rgba(255,255,255,0.85); color: var(--white); }
.button--outline-light:hover { background: var(--white); color: var(--blue); }
.button--text {
  background: none; border: 0; padding: 0.5rem 0; min-height: auto;
  color: var(--blue); text-decoration: underline; font-weight: 700;
}

.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.button-row .button { flex: 1 1 12rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 1px 0 rgba(0,0,0,0.12);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  width: min(100% - 2.5rem, 68rem); margin-inline: auto;
}
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1;
  color: var(--white); text-decoration: none;
}
.wordmark:hover { color: var(--white); }

.menu-toggle {
  font: 700 1rem var(--serif);
  color: var(--white); background: none;
  border: 2px solid rgba(255,255,255,0.7); border-radius: var(--radius);
  padding: 0.4rem 0.9rem; min-height: 2.5rem; cursor: pointer;
}
.menu-toggle[aria-expanded="true"] { background: var(--white); color: var(--blue); }

.nav-links {
  list-style: none; margin: 0; padding: 0.5rem 1.25rem 1rem;
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--blue);
  border-top: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.nav-links:not(.is-open) { display: none; }
html:not(.js) .menu-toggle { display: none; }
.nav-links a {
  display: block; padding: 0.8rem 0;
  color: var(--white); text-decoration: none; font-size: 1.15rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.nav-links li:last-child a { border-bottom: 0; }
.nav-links__cta { display: none; }

/* ---------- Mobile action bar ---------- */

.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--blue-deep);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
}
.action-bar .button { min-height: 2.9rem; padding: 0.5rem; }

/* ---------- Hero ---------- */

.hero { background: var(--blue); color: var(--white); padding: 2rem 0 3rem; }
.hero__inner {
  width: min(100% - 2.5rem, 68rem); margin-inline: auto;
  display: grid; gap: 1.75rem;
  grid-template-areas: "text" "photo" "intro";
}
.hero__text { grid-area: text; text-align: center; }  /* centered on phones; left-aligned on desktop below */
.hero__photo { grid-area: photo; margin: 0; }
.hero__intro { grid-area: intro; }

.hero__logo { margin: 0 0 1rem; }
.hero__logo img { width: 100%; max-width: 34rem; margin-inline: auto; }
.hero__tagline {
  font-size: clamp(1.25rem, 5vw, 1.6rem); font-style: italic; line-height: 1.35;
  margin: 0;
}
.hero__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 70%;
  border-radius: var(--radius);
}
.hero__intro p { font-size: 1.15rem; margin: 0; }

/* ---------- Meet Nate ---------- */

.photo { margin: 0.5rem 0 1.75rem; }
.photo img { width: 100%; border-radius: var(--radius); }
.photo figcaption { font-size: 0.95rem; color: var(--ink-soft); font-style: italic; margin-top: 0.5rem; }

.roles { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.roles li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.roles li::marker { color: var(--red); }

/* ---------- Priorities ---------- */

.priorities { list-style: none; counter-reset: priority; padding: 0; margin: 2rem 0 0; }
.priorities > li {
  counter-increment: priority;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.priorities > li::before {
  content: counter(priority);
  display: block;
  font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1;
  color: var(--blue);
  margin-bottom: 0.5rem;
}
.priorities h3 { font-size: 1.4rem; color: var(--blue-deep); }
.priorities p:last-child { margin-bottom: 0; }

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

.issues { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.issues details { border-bottom: 1px solid var(--line); }
.issues summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0;
  font-size: 1.2rem; font-weight: 700; color: var(--red);
}
.issues summary::-webkit-details-marker { display: none; }
.issues summary::after {
  content: "+"; flex: none;
  width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--red-tint); color: var(--red);
  font-size: 1.4rem; font-weight: 400; line-height: 1;
}
.issues details[open] summary::after { content: "–"; }
.issues summary:hover { color: var(--red-hover); }
.issues__body { padding: 0 0 1.25rem; }

/* ---------- Endorsements ---------- */

#endorsements h3 { margin-top: 2.25rem; color: var(--blue-deep); }
.leaders, .neighbors { list-style: none; margin: 0; padding: 0; }
.leaders {
  display: grid; gap: 0.25rem 2rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
.leaders li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.leaders strong { display: block; }
.leaders span { color: var(--ink-soft); font-size: 1rem; }

.count { font-weight: 400; color: var(--ink-soft); font-size: 1rem; white-space: nowrap; }
.neighbors { columns: 2; column-gap: 1.5rem; }
.neighbors li { padding: 0.2rem 0; break-inside: avoid; }
.empty { color: var(--ink-soft); font-style: italic; }
.neighbors.is-empty { columns: 1; }

.endorse-cta {
  margin-top: 2.5rem; padding: 1.5rem;
  background: var(--blue-tint); border-radius: var(--radius);
  text-align: center;
}
.endorse-cta p { font-size: 1.2rem; margin-bottom: 1rem; }

/* ---------- Get involved ---------- */

.button-row--stack .button { flex-basis: 100%; }
.yard-sign { margin: 1.75rem 0 0; }
/* White frame so the sign's blue top edge doesn't blend into the blue section */
.yard-sign img {
  width: 100%; background: var(--white); padding: 0.4rem;
  border-radius: var(--radius); box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.yard-sign figcaption { margin-top: 0.75rem; font-style: italic; text-align: center; }
.contact { margin-top: 2rem; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--blue-deep); color: rgba(255,255,255,0.85);
  padding: 2rem 0; font-size: 0.95rem; text-align: center;
  /* room for the mobile action bar */
  padding-bottom: calc(2rem + 4.5rem + env(safe-area-inset-bottom));
}
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: inherit; }
.site-footer__paid {
  display: inline-block; border: 1px solid rgba(255,255,255,0.6);
  padding: 0.3rem 0.8rem; margin-bottom: 0.75rem !important;
}

/* ---------- Larger screens ---------- */

@media (min-width: 600px) {
  .neighbors { columns: 3; }
  .button-row--stack .button { flex-basis: 12rem; }
}

@media (min-width: 860px) {
  .site-footer { padding-bottom: 2rem; }
  .action-bar { display: none; }

  .menu-toggle { display: none; }
  .nav-links:not(.is-open), .nav-links {
    display: flex; align-items: center; gap: 1.5rem;
    position: static; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .nav-links a { padding: 0.25rem 0; font-size: 1rem; border: 0; }
  .nav-links a:not(.button):hover { text-decoration: underline; }
  .nav-links__cta { display: block; }
  .nav-links__cta .button { display: inline-flex; min-height: 2.4rem; padding: 0.35rem 1rem; }

  .section { padding: 5rem 0; }

  .hero { padding: 4rem 0 4.5rem; }
  .hero__inner {
    grid-template-columns: 1fr 24rem;
    grid-template-areas: "text photo" "intro photo";
    grid-template-rows: auto 1fr;
    column-gap: 4rem; row-gap: 2rem;
    align-items: start;
  }
  .hero__text { align-self: end; text-align: left; }
  .hero__logo img { margin-inline: 0; }

  .neighbors { columns: 4; }
}

/* ---------- 404 page ---------- */

.not-found { min-height: 100vh; display: grid; align-items: center; text-align: center; }
.not-found img { width: 100%; max-width: 26rem; margin: 0 auto 2.5rem; }
.not-found h1 { font-family: var(--display); font-size: clamp(2rem, 7vw, 2.75rem); }
