/* The First Mile — site styles
   Design: Annie Dore (Bee Spring Designs). Reference comp is 960px wide;
   sizes below are scaled up ~1.2× for a 1200px content width. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/montserrat-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --navy: #002445;
  --yellow: #fab914;
  --yellow-soft: #fbc743;
  --gray-bg: #ebebea;          /* bdbdba at 30% on white */
  --text: #333333;
  --text-muted: #5a5b5d;
  --label-muted: #81869c;
  --copy-muted: #9a9eaf;
  --white: #ffffff;

  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-label: "Poppins", "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --pad: clamp(1.25rem, 6vw, 5rem);
  --pad-edge: clamp(1.25rem, 3vw, 3rem);   /* header: hugs the window edges */
  --section-y: clamp(3rem, 7vw, 5.5rem);

  --text-base: 1.0625rem;      /* 17px */
  --display: clamp(2.5rem, 5.2vw, 3.75rem);
  --eyebrow: clamp(1rem, 1.6vw, 1.25rem);
  --h3: clamp(1.25rem, 1.9vw, 1.5rem);
  --pathway-h3: clamp(1.6rem, 2.7vw, 2.125rem);

  --radius: 999px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[id] { scroll-margin-top: 1rem; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: var(--white); padding: .5rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

/* Text blocks (kirbytext output) */
.text p { margin: 0 0 1em; }
.text p:last-child { margin-bottom: 0; }
.text a { text-decoration-thickness: 1px; text-underline-offset: .15em; }

/* Yellow rule on the left of a block (design motif) */
.rule-left { border-left: 2px solid var(--yellow); padding-left: clamp(1rem, 2vw, 1.75rem); }

/* Small uppercase heading with a short underline */
.eyebrow {
  display: inline-block;
  font-size: var(--eyebrow);
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--yellow);
  line-height: 1.2;
  padding-bottom: .3em;
  border-bottom: 1px solid currentColor;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}
.eyebrow--light { color: var(--white); }

/* Big light headline */
.display {
  font-size: var(--display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--navy);
}

/* Pill buttons */
.button {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  color: var(--navy);
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: .75em 1.4em .7em;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.button:hover, .button:focus-visible { background: var(--navy); color: var(--white); }
.button--light { color: var(--white); border-color: var(--white); }
.button--light:hover, .button--light:focus-visible { background: var(--white); color: var(--navy); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- Header ---------- */
.header { background: var(--white); position: relative; z-index: 20; }
.header__inner {
  max-width: none;
  padding-inline: var(--pad-edge);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  min-height: clamp(4.5rem, 9vw, 6.5rem);
  padding-block: 1rem;
}
.logo {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1;
  text-decoration: none;
  color: var(--navy);
  white-space: nowrap;
}
.logo__b { font-weight: 700; color: var(--yellow); }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.nav > a:not(.button) {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  padding: .5em 0;
}
.nav > a:not(.button):hover { color: var(--yellow); }
.nav .button { margin-left: .5rem; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: .5rem; margin: -.5rem;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0;
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: flex-start; gap: .25rem;
    background: var(--white);
    padding: .5rem var(--pad-edge) 1.5rem;
    box-shadow: 0 12px 24px rgba(0, 36, 69, .12);
  }
  .nav > a:not(.button) { padding: .75em 0; font-size: .9375rem; }
  .nav .button { margin: .75rem 0 0; }
  body.nav-open .nav { display: flex; }
  body.nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  body.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  /* Fixed height, not aspect-ratio: with aspect-ratio + max-height the browser
     transfers the height cap to the width and leaves white space on wide screens. */
  height: clamp(22rem, 48vw, 46rem);
}
.hero__image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
}
.hero__waves {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero__box {
  position: absolute; left: 0; bottom: 10%;
  width: min(48.5%, 620px);
  background: var(--yellow);
  border-top-right-radius: clamp(14px, 2.5vw, 28px);
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 3.5vw, 3rem) clamp(1.25rem, 3vw, 2.5rem) var(--pad);
}
.hero__headline {
  font-size: clamp(1.375rem, 3.5vw, 2.625rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--navy);
}
@media (max-width: 640px) {
  .hero { height: auto; }
  .hero__image { position: relative; aspect-ratio: 4 / 3; }
  .hero__box { position: relative; bottom: auto; width: 88%; margin-top: -3rem; }
}

/* ---------- Two-column sections ---------- */
.section__inner {
  display: grid;
  grid-template-columns: minmax(0, 17fr) minmax(0, 33fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 3rem);
  padding-block: var(--section-y);
}
.section__intro { min-width: 0; }
.section__body { min-width: 0; display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); align-content: start; }
.section__body .item { padding-top: .1em; }
.item__heading {
  font-size: var(--h3);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: .6em;
}
@media (max-width: 800px) {
  .section__inner { grid-template-columns: 1fr; }
}

/* ---------- About (intro) ---------- */
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 17fr) minmax(0, 33fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.about__media img {
  width: min(100%, 22rem);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
}
.about__text { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.about__lead {
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
  font-weight: 700;
  line-height: 1.55;
  color: var(--navy);
}
.about .text { color: var(--text); }
@media (max-width: 800px) {
  .about__inner { grid-template-columns: 1fr; }
  .about__media img { width: min(70%, 16rem); }
}

/* ---------- The Imperative (navy) ---------- */
.imperative { background: var(--navy); color: var(--white); }
.imperative .display { color: var(--white); }
.imperative .item__heading { color: var(--yellow); }
.imperative .text { color: var(--white); }
.imperative .text strong { font-weight: 800; }

/* ---------- How We Partner (white) ---------- */
.partner .text { color: var(--text-muted); }

/* ---------- Core Pathways (yellow) ---------- */
.pathways { background: var(--yellow); color: var(--navy); padding-block: var(--section-y); }
.pathways__intro {
  max-width: 62rem;
  font-weight: 600;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.pathways__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 6vw, 5.5rem);
}
.pathway {
  border-left: 2px solid var(--white);
  padding-left: clamp(1rem, 2vw, 1.75rem);
}
.pathway__heading {
  font-size: var(--pathway-h3);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin-bottom: .5em;
}
.pathway__lead { font-weight: 800; margin-bottom: .9em; }
.pathway .text { color: var(--navy); }

/* ---------- Contact (light gray) ---------- */
.contact { background: var(--gray-bg); }
.contact__text {
  font-weight: 400;
  color: var(--text);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 24rem;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.field { display: grid; gap: .5rem; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field label {
  font-family: var(--font-label);
  font-size: .875rem;
  font-weight: 600;
  color: var(--navy);
}
.field .optional { color: var(--label-muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--navy);
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 0;
  padding: .55em .75em;
  min-height: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 11rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--yellow); }

.form__alert {
  grid-column: 1 / -1;
  background: var(--white);
  border-left: 3px solid var(--yellow);
  padding: .75rem 1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--navy);
}
.form__alert ul { margin: 0; padding-left: 1.1em; }
.form__success {
  background: var(--white);
  border-left: 3px solid var(--yellow);
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  color: var(--navy);
}
@media (max-width: 560px) {
  .form__grid { grid-template-columns: 1fr; }
}

/* ---------- Footer (navy) ---------- */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
}
.footer__waves {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 17fr) minmax(0, 33fr);
  padding-block: clamp(3rem, 7vw, 5rem) clamp(3rem, 6vw, 4.5rem);
}
.footer__inner > * { grid-column: 2; }
.footer__headline {
  font-family: var(--font-label);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.footer__inner .button { justify-self: start; }
.footer__copyright {
  position: relative;
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--copy-muted);
  padding-bottom: 1rem;
}
@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__inner > * { grid-column: 1; }
}

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