/* ---- Aktiv Grotesk (self-hosted webfont) ---- */
@font-face {
  font-family: "aktiv-grotesk";
  src: url("/assets/fonts/aktiv-grotesk-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "aktiv-grotesk";
  src: url("/assets/fonts/aktiv-grotesk-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "aktiv-grotesk";
  src: url("/assets/fonts/aktiv-grotesk-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "aktiv-grotesk";
  src: url("/assets/fonts/aktiv-grotesk-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "aktiv-grotesk";
  src: url("/assets/fonts/aktiv-grotesk-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --cream: #f8f5f2;
  --footer-bg: #f6f2dd;
  --accent: #e37939; /* the campaign's orange */
  --ink: #0a0a0a;
  --black: #000;
  --white: #fff;
  --muted: #555;
  --line: #e2ddd6;
  --input-border: #abb0b2;
  --container: 1048px; /* ~1000px content column, matching the original */
  /* aktiv-grotesk is self-hosted (see @font-face above); system fonts show
     briefly during load, then the real face swaps in. */
  --font: "aktiv-grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 1.1875rem; /* 19px — the original's base body size */
  line-height: 1.5;
}

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

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 1.5rem);
}

/* Thin section dividers, matching the original */
.divider {
  border: none;
  border-top: 1px solid #bbb;
  margin: 0 0 clamp(2rem, 5vh, 3.5rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--black);
  padding: .75rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---- Header (transparent overlay on the hero) ---- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 5vw, 4rem);
}
.wordmark {
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  letter-spacing: normal;
  text-decoration: none;
  color: var(--white);
}
.lang-nav { display: flex; gap: 1.25rem; font-weight: 400; font-size: 1.25rem; }
.lang-nav a { text-decoration: none; opacity: .8; }
.lang-nav a.is-active { text-decoration: underline; text-underline-offset: 4px; opacity: 1; }
.lang-nav a:hover { opacity: 1; }

/* ---- Hero (freeway collage as a scroll-rate parallax background) ---- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 80vh; /* original hero is ~79% of viewport; next section peeks */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  padding: clamp(6rem, 14vh, 9rem) 0 clamp(3rem, 11vh, 7rem);
  background-color: var(--black); /* fallback while the image loads */
}
/* Separate layer so JS can translate it slower than the page scroll.
   Taller than the hero (top:-20%, height:140%) so the drift never shows an edge. */
.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 140%;
  z-index: 0;
  will-change: transform;
  background-image:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.14) 24%,
      rgba(0, 0, 0, 0.14) 58%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    url("/assets/collage.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-headline {
  font-weight: 700;
  font-size: clamp(2.3rem, 4.6vw, 3.1rem);
  line-height: 1.2;
  letter-spacing: normal;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  max-width: 15em; /* wraps to ~2 lines like the original (no tight 16ch clamp) */
}
.hero-ctas { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  color: var(--black);
  font-weight: 500;
  font-size: 1.1875rem;
  letter-spacing: 0.02em;
  padding: 1.1rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.btn-block { padding-right: 2.5rem; }
.btn-dark { background: var(--black); color: var(--white); }

/* ---- Sections ---- */
.section { padding: clamp(2.5rem, 8vh, 6rem) 0; }
.section-heading {
  font-weight: 700;
  font-size: clamp(2rem, 3.8vw, 2.72rem); /* ~43.5px (e.g. "Coalition Partners") */
  line-height: 1.2;
  letter-spacing: normal;
  margin: 0 0 2rem;
}
/* Small lead-in labels above a block ("The Cost of Freeways…", "Understanding Metro…") */
.lead-heading {
  font-weight: 500;
  font-size: 1.375rem; /* ~22px */
  line-height: 1.3;
  margin: 0 0 1.5rem;
}
.lead {
  font-size: 1.1875rem;
  line-height: 1.5;
  max-width: 62ch;
  margin: 0 0 1.5rem;
}
.lead a { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Figures / images ---- */
.figure { margin: 0; }
.figure img { width: 100%; border-radius: 4px; }
.figure figcaption {
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-top: 1rem;
  max-width: 60ch;
}

/* ---- Costs (pale-yellow cards, matching the original) ---- */
.cost-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2×2, matching the original */
  gap: 1.25rem;
}
.cost {
  background: var(--footer-bg);
  padding: 15px 20px;
}
.cost-emoji { font-size: 3rem; line-height: 1; margin-bottom: 1rem; }
.cost-title {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.78rem; /* ~28.5px */
  line-height: 1.2;
  margin: 0 0 .75rem;
}
.cost p { font-size: 1.1875rem; margin: 0; }

/* ---- Benefits list ---- */
.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 1rem;
}
.benefit-list li {
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.5;
  padding-left: 1.5rem;
  position: relative;
}
.benefit-list li::before {
  content: "•";
  position: absolute;
  left: 0;
}

/* ---- "$21 Billion could fund" — centered block with bold lead-ins ---- */
.fund { text-align: center; }
.fund-lead {
  font-size: 1.1875rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.fund-item {
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0 0 .35rem;
}

/* ---- Partners (large logos, flowing/wrapping like the original) ---- */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4.5rem);
}
.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 460px; /* cap the flex item so wide logos pair up (avoids intrinsic-width over-reservation) */
  transition: opacity .15s ease;
}
.partner img {
  height: auto;
  max-height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.partner:hover { opacity: .65; }

/* ---- Projects table (compact, borderless, orange Total row) ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.projects {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.95rem;
}
.projects th, .projects td {
  text-align: left;
  padding: 2px 6px;
  border: none;
  line-height: 1.9;
}
.projects th { font-weight: 700; }
.projects td:not(:first-child), .projects th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.projects .total-row td { color: var(--accent); }

/* ---- Video ---- */
.video { position: relative; padding-top: 56.25%; border-radius: 6px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Sign-up form (light, two-column: intro left, form card right) ---- */
.signup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.signup-heading {
  color: var(--accent);
  font-weight: 700;
  font-size: clamp(2.3rem, 4.6vw, 3.1rem); /* ~49.7px, like the hero */
  line-height: 1.2;
  margin: 0 0 1.5rem;
}
.signup-form {
  background: var(--white);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
/* Mailchimp embed, restyled to match the site (no Mailchimp default CSS loaded) */
#mc_embed_signup { background: transparent; font: inherit; width: auto; }
#mc_embed_signup h2 { display: none; }
#mc_embed_signup .indicates-required {
  font-size: .95rem;
  color: var(--muted);
  text-align: right;
  margin: 0 0 1.25rem;
}
#mc_embed_signup .mc-field-group { margin-bottom: 1.25rem; }
#mc_embed_signup .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
#mc_embed_signup .field-row .mc-field-group { margin-bottom: 0; }
#mc_embed_signup label { display: block; font-weight: 400; margin-bottom: .45rem; font-size: 1rem; line-height: 1.3; }
#mc_embed_signup input.text,
#mc_embed_signup input.email,
#mc_embed_signup select {
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--input-border);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}
#mc_embed_signup input:focus, #mc_embed_signup select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.asterisk { color: var(--accent); }
#mc_embed_signup #mce-responses { margin: .75rem 0 0; }
#mc_embed_signup .response { font-size: 1rem; padding: .4rem 0; }
#mc_embed_signup .button {
  -webkit-appearance: none;
  appearance: none;
  background: #aaa;
  color: var(--white);
  font: inherit;
  font-weight: 700;
  font-size: 1.1875rem;
  border: none;
  border-radius: 3px;
  padding: 1.1rem 1.75rem;
  margin-top: .75rem;
  cursor: pointer;
}
#mc_embed_signup .button:hover { opacity: .9; }

/* ---- Footer ---- */
.site-footer {
  background: var(--footer-bg);
  color: var(--ink);
  padding: clamp(2.5rem, 6vh, 4rem) 0;
  font-size: 1.1875rem;
  text-align: center;
}
.site-footer p { margin: 0.35rem 0; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 720px) {
  .signup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  #mc_embed_signup .field-row { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; justify-content: flex-start; }
  .hero { min-height: 90vh; }
  /* Keep English/Español as text on small screens (never a hamburger);
     let the toggle wrap under the wordmark if it can't fit on one line. */
  .site-header { flex-wrap: wrap; gap: 0.5rem 1.25rem; }
  .wordmark { font-size: 1.5rem; }
  .cost-list { grid-template-columns: 1fr; }
}
