/* Brian Johnson for District 65 — site styles
   Palette: Evanston blue and white, with a Chicago-flag-style six-pointed star. */

@font-face {
  font-family: "Libre Franklin";
  src: url("../fonts/LibreFranklin-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #0b2c63;
  --navy-deep: #071e45;
  --navy-star: #123a7c;
  --blue: #1a5cb8;
  --sky: #a9d3f2;
  --mist: #eef5fc;
  --white: #ffffff;
  --ink: #14233b;
  --muted: #4a5b75;
  --line: #d3e0ee;

  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--sans);
  color: var(--navy);
  line-height: 1.1;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }
img { max-width: 100%; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--white); }
.on-dark .signup-panel :focus-visible { outline-color: var(--blue); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.star { display: block; fill: currentColor; }

.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--white);
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.on-dark .eyebrow { color: var(--sky); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--sky); color: var(--navy); }
.btn-outline { border-color: rgba(255, 255, 255, 0.65); color: var(--white); }
.btn-outline:hover { border-color: var(--white); background: var(--white); color: var(--navy); }

.text-link {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}
.text-link::after { content: " \2192"; }
.text-link:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.8rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--navy);
  font-family: var(--sans);
  text-decoration: none;
}
.brand .star { width: 2.4rem; height: 2.4rem; color: var(--blue); flex: none; }
.brand-name { display: block; font-size: 1.2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.brand-office { display: block; font-size: 0.75rem; font-weight: 600; line-height: 1.3; color: var(--muted); }
.brand:hover { color: var(--navy); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.975rem;
  font-weight: 600;
}
.site-nav a:not(.btn) {
  display: block;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--blue); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--navy); }
.site-nav .btn { padding: 0.6rem 1.1rem; font-size: 0.95rem; }

/* Flag band: white field, two blue bars, four stars — a nod to the Chicago flag */
.flag-band {
  padding-block: 0.65rem;
  background: var(--white);
}
.flag-band-inner {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4.5rem);
  padding-block: 0.8rem;
  border-block: 0.6rem solid var(--sky);
  color: var(--blue);
}
.flag-band .star { width: clamp(1.5rem, 3vw, 2.25rem); height: clamp(1.5rem, 3vw, 2.25rem); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.hero-star {
  position: absolute;
  top: 50%;
  left: 62%;
  width: min(74rem, 130vw);
  height: min(74rem, 130vw);
  transform: translate(-50%, -50%);
  color: var(--navy-star);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero h1 {
  color: var(--white);
  font-size: clamp(3.5rem, 9.5vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.hero h1 span { display: block; }
.tagline {
  margin: 1.5rem 0 1rem;
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--sky);
}
.hero-lede { max-width: 34rem; margin-bottom: 2rem; font-size: 1.2rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Photo placeholders: replace each with a real <img> */
.photo-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}
.photo-ph .star { width: 30%; height: auto; aspect-ratio: 1; }
.photo-ph.wide { aspect-ratio: 4 / 3; }
.hero .photo-ph { border: 0.5rem solid var(--white); box-shadow: 0 1.5rem 3rem rgba(7, 30, 69, 0.45); }

/* Sections */
.section { padding-block: var(--section); }
.section-mist { background: var(--mist); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.message {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
}
.message-lead {
  font-size: clamp(1.3rem, 2.4vw, 1.625rem);
  line-height: 1.5;
  color: var(--navy);
}
.signoff { font-style: italic; color: var(--muted); }

/* Priorities */
.priority-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 3.5rem) clamp(2rem, 6vw, 5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.priority { padding-top: 1.25rem; border-top: 3px solid var(--navy); }
.priority-num {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.priority-num .star { width: 1.1rem; height: 1.1rem; }
.priority h3 { margin-bottom: 0.75rem; font-size: 1.625rem; }

/* About preview */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}
.split h2 { margin-bottom: 1.25rem; }

/* Sign-up */
.signup {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.signup-star {
  position: absolute;
  left: -14rem;
  bottom: -14rem;
  width: 44rem;
  height: 44rem;
  color: var(--navy-star);
}
.signup-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}
.signup h2 { margin-bottom: 1.25rem; color: var(--white); }
.election {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--sky);
  font-family: var(--sans);
  line-height: 1.35;
}
.election small { display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
.election strong { font-size: 1.25rem; }

.signup-panel {
  min-height: 18rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--sans);
}
.form-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }

/* EmailOctopus form. The embed injects its own styles after this file, so these
   rules use extra selectors to win. Colors and fonts go through its variables. */
.eo-embed [data-form] {
  --background-color: var(--white);
  --border-color: transparent;
  --text-colour: var(--ink);
  --font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
}
.eo-embed [data-form] .emailoctopus-form {
  --base-font-size: 1.0625rem;
  --field-colour: var(--white);
  --field-border-colour: #7b8ca6;
  --button-colour: var(--blue);
  --button-text-colour: var(--white);
}
.eo-embed .inline-container[data-form] { max-width: none !important; padding: 0; }
.eo-embed [data-form] .eo-form-wrapper { min-width: 0; }
.eo-embed [data-form] .form-container { max-width: none; }
.eo-embed [data-form] [eo-block="title"] { margin-bottom: 0 !important; font-size: 1.375rem; }
.eo-embed [data-form] h1 {
  color: var(--navy);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: left;
}
/* Hides EmailOctopus's sample sentence. Remove this rule to show real text set there. */
.eo-embed [data-form] [eo-block="text"] { display: none; }
.eo-embed [data-form] .emailoctopus-form [eo-form-fields-container] { width: 100%; }
.eo-embed [data-form] .main-form .emailoctopus-form-row {
  width: 100%;
  min-width: 0;
  margin: 0 0 0.75rem !important;
}
.eo-embed [data-form] .emailoctopus-form input.form-control {
  height: 3rem;
  border-width: 1.5px;
  border-radius: 3px;
  color: var(--ink);
}
.eo-embed [data-form] .emailoctopus-form input.form-control:focus {
  border-color: var(--blue);
  box-shadow: none;
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}
.eo-embed [data-form] .emailoctopus-form input[type="submit"] {
  width: 100%;
  min-height: 3rem;
  margin: 0.25rem 0 0.75rem !important;
  border-radius: 3px;
  font-weight: 700;
}
.eo-embed [data-form] .emailoctopus-form input[type="submit"]:hover {
  background-color: var(--navy);
  border-color: var(--navy);
}
.eo-embed [data-form] .emailoctopus-form input[type="submit"]:focus {
  box-shadow: none;
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.eo-embed [data-form] .emailoctopus-error-message:not(:empty),
.eo-embed [data-form] .emailoctopus-success-message:not(:empty) {
  margin-bottom: 0.75rem;
  font-weight: 600;
  text-align: left;
}
/* Shown only if the embed still hasn't appeared after a few seconds */
.eo-fallback {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  visibility: hidden;
  animation: eo-fallback-show 0s linear 5s forwards;
}
.eo-embed:has(.inline-container) .eo-fallback { display: none; }
@keyframes eo-fallback-show { to { visibility: visible; } }

/* Sub-page header */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.page-head-star {
  position: absolute;
  top: 50%;
  right: -8rem;
  width: 36rem;
  height: 36rem;
  transform: translateY(-50%);
  color: var(--navy-star);
}
.page-head-inner { position: relative; padding-block: clamp(3rem, 7vw, 5rem); }
.page-head h1 {
  max-width: 48rem;
  color: var(--white);
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.025em;
}
.page-head-lede { max-width: 42rem; margin: 1.25rem 0 0; font-size: 1.25rem; }

/* Long-form layout (platform + biography) */
.longform {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 44rem);
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 5rem);
}
.toc { position: sticky; top: 7rem; align-self: start; font-family: var(--sans); }
.toc-title { margin: 0 0 0.75rem; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.toc li { border-top: 1px solid var(--line); }
.toc a { display: block; padding-block: 0.7rem; color: var(--navy); text-decoration: none; }
.toc a:hover { color: var(--blue); text-decoration: underline; }

.plank + .plank { margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.plank h2 { margin-bottom: 1.25rem; font-size: clamp(1.875rem, 4vw, 2.5rem); }
.lead { font-size: 1.3rem; line-height: 1.5; color: var(--navy); }
.plank h3 { margin: 2rem 0 0.75rem; font-size: 1.125rem; }

.star-list { margin: 0 0 1.5rem; padding: 0; list-style: none; }
.star-list li { position: relative; padding-left: 1.75rem; margin-bottom: 0.65rem; }
.star-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 1.05rem;
  height: 1.05rem;
  background: url("../img/star.svg") center / contain no-repeat;
}

.bio-photo { position: sticky; top: 7rem; align-self: start; }
.pullquote {
  margin: 2.5rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 4px solid var(--blue);
  color: var(--navy);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-style: italic;
  line-height: 1.35;
}
.pullquote p { margin: 0; }
.photo-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 2.5rem 0; }

/* Closing call to action */
.cta { background: var(--blue); color: var(--white); }
.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.cta h2 { max-width: 34rem; color: var(--white); font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

/* Footer */
.site-footer { background: var(--navy-deep); color: #d6e4f5; font-family: var(--sans); font-size: 0.925rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 3rem;
  padding-block: 2.25rem 1.25rem;
}
.site-footer .brand, .site-footer .brand:hover { color: var(--white); }
.site-footer .brand .star { color: var(--sky); }
.site-footer .brand-office { color: #d6e4f5; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer-nav a { color: var(--white); font-weight: 600; text-decoration: none; }
.footer-nav a:hover { color: var(--sky); text-decoration: underline; }
.disclosure { padding-block: 1rem 2rem; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.disclosure p { margin: 0; font-size: 0.85rem; }

/* Responsive */
@media (max-width: 860px) {
  html { scroll-padding-top: 1rem; }
  .site-header { position: static; }
  .hero-inner, .message, .split, .signup-inner, .longform { grid-template-columns: minmax(0, 1fr); }
  .hero-star { left: 70%; top: 35%; }
  .hero-photo, .split .photo-ph, .bio-photo { max-width: 22rem; }
  .toc, .bio-photo { position: static; }
}
@media (max-width: 620px) {
  body { font-size: 1.0625rem; }
  .priority-grid { grid-template-columns: minmax(0, 1fr); }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: space-between; gap: 0.25rem 0.75rem; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .page-head-star { right: -16rem; opacity: 0.8; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
