/* ==========================================================================
   50 States for Ukraine — replication of https://www.50statesforukraine.com
   Every value below is measured from the live site (see NOTES.md extraction
   sheets). Do not round: sizes like 47px / 37px / 34px are the real values.
   ========================================================================== */

/* --- Webfonts: the same faces the live site serves ---------------------- */
@font-face {
  font-family: 'aether';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/aether-400.woff2') format('woff2');
}
@font-face {
  font-family: 'aether';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/aether-700.woff2') format('woff2');
}
@font-face {
  font-family: 'helvetica-w01-bold';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/helvetica-bold.woff2') format('woff2');
}
@font-face {
  font-family: 'helvetica-w01-light';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/helvetica-light.woff2') format('woff2');
}
@font-face {
  font-family: 'avenir-lt-w01_35-light';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/avenir-35-light.woff2') format('woff2');
}
@font-face {
  font-family: 'madefor-text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/madefor-text.woff2') format('woff2');
}

/* --- Design tokens (Layer 3 + 4 extraction) ----------------------------- */
:root {
  --c-page: #ffffff;
  --c-bg: #fafafa;
  --c-cream: #f9f8e7;
  --c-ink: #000000;
  --c-ink-2: #3f3f3f;

  --c-hero: #3d3d55;
  --c-band: #324158;
  --c-navy: #152859;
  --c-blue: #008afc;
  --c-blue-glass: rgba(29, 103, 205, 0.89);
  --c-gold: rgba(255, 212, 6, 0.82);
  --c-white: #ffffff;
  --c-offwhite: #fafafa;

  --font-display: 'aether', Arial, sans-serif;
  --font-helv-bold: 'helvetica-w01-bold', 'Helvetica Neue', Arial, sans-serif;
  --font-helv-light: 'helvetica-w01-light', 'Helvetica Neue', Arial, sans-serif;
  --font-madefor: 'madefor-text', 'Helvetica Neue', Arial, sans-serif;
  --font-avenir: 'avenir-lt-w01_35-light', 'Helvetica Neue', Arial, sans-serif;

  --r-pill: 60px;
  --r-pill-sm: 30px;
  --r-glass: 30px;

  --page-max: 1440px;
  --content-max: 980px;
}

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

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

body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-ink);
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

/* --- Header: 1440x70, #FAFAFA, logo 47x51 at x=122 --------------------- */
.site-header {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 51;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  padding: 0 122px;
  gap: 10px;
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.site-header__logo img {
  width: 47px;
  height: 51px;
  object-fit: contain;
}
.site-header__wordmark {
  display: inline-block;
  position: relative;
  top: 2px;
  font-size: 17px;
  line-height: 1;
  letter-spacing: normal;
  white-space: nowrap;
}
.site-header__wordmark::first-line { line-height: 1; }
.site-nav {
  display: flex;
  align-items: center;
  margin: 3px 88px 0 auto;
}
.site-nav__link {
  display: block;
  flex: 0 0 auto;
  padding: 0;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  transition: opacity 0.25s ease;
}
.site-nav__link:nth-child(1) { width: 73px; }
.site-nav__link:nth-child(2) { width: 96px; }
.site-nav__link:nth-child(3) { width: 151px; }
.site-nav__link:nth-child(4) { width: 157px; }
.site-nav__link:nth-child(5) { width: 124px; }
.site-nav__link:nth-child(6) { width: 114px; }
.site-nav__link:hover { opacity: 0.6; }
.site-nav__toggle { display: none; }

/* --- Hero: full-bleed 1440x467 image, then a 234px #3D3D55 stat band --- */
.hero__visual { position: relative; }
.hero__image { width: 100%; }
.hero__image img { width: 100%; height: auto; }

/* Glass box over the map: 440px wide at x=500, 155px down, radius 30. */
.hero__glass {
  position: absolute;
  top: 155px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  padding: 16px 0;
  border-radius: var(--r-glass);
  background: var(--c-blue-glass);
  text-align: center;
}
.hero__title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-white);
  margin: 0;
}
.hero__title em { font-style: normal; letter-spacing: normal; color: #ffd406; }

.hero__band {
  background: var(--c-hero);
  padding: 29px 0 31.61px;
}
.stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 0 auto;
}
.stat {
  width: 284px;
  text-align: center;
}
.stat__value {
  display: block;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--c-white);
}
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: -0.01em;
  color: var(--c-offwhite);
}

/* --- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: scale(0.98); }
.btn--gold { background: var(--c-gold); color: var(--c-white); }
.btn--gold:hover { filter: brightness(1.03); }
.btn--navy { background: var(--c-navy); color: var(--c-white); }
.btn--blue { background: var(--c-blue); color: var(--c-white); }
.btn--wide { width: 190px; height: 45px; font-family: var(--font-madefor); font-size: 15px; font-weight: 400; letter-spacing: normal; }

.hero__cta { display: flex; justify-content: center; margin-top: 37px; }
.btn--hero {
  width: 142px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: normal;
}

/* --- "These cars save lives": 50/50 split, left #FAFAFA ----------------- */
.split { display: flex; align-items: stretch; }
.split__text {
  /* Flex-basis is content-box sized. Match the measured live split at 1440px. */
  flex: 0 0 616.76px;
  background: var(--c-bg);
  padding: 50px 0 0 101.77px;
}
.split__media { flex: 1 1 auto; background: var(--c-bg); }
.split__media img { width: 100%; height: 478px; object-fit: cover; }

.h-display {
  font-size: 47px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: normal;
  /* Live text box is 539px, centered at x=360 on the 1440px reference. */
  width: 539px;
  margin: 0 0 23px -11px;
  text-align: center;
}
.body-lg {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  width: 502px;
  margin: 0 0 0 7px;
}
.split__cta { display: flex; justify-content: center;  width: 718.53px; margin: 45px 0 0 -101.77px; padding-bottom: 98.63px; }

/* --- Blue-grey bands --------------------------------------------------- */
.band {
  background: var(--c-band);
  color: var(--c-white);
  text-align: center;
}
.band--goal { padding: 61px 40px 54px; }
.band--start { padding: 57px 40px 67px; }
.band__title {
  font-size: 37px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 25px;
}
.band__title--sm { font-size: 34px; letter-spacing: -0.02em; margin-bottom: 33px; }
.band__body {
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 auto;
  /* Live box is 764px and the second line measures 764.13 — allow the slack. */
  max-width: 766px;
}
.band--start .band__body { text-align: left; max-width: 816px; }
#missing-states { margin-top: 4px; }
.band__cta { margin-top: 48px; }
.btn--wide-lg { width: 258px; }

/* --- Battalion grid: 4 cols of 223px, 29px gaps, 980px content width ---- */
.battalions { background: var(--c-page); padding: 50px 0 46px; }
.battalions__inner { width: var(--content-max); margin: 0 auto; }
.h-section {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  /* 940 of the 980 container: the live site centres this heading on 700, not 720. */
  width: 940px;
  margin: 0 0 46px;
}
.battalion-grid {
  display: grid;
  grid-template-columns: repeat(4, 223px);
  column-gap: 29.33px;
  row-gap: 47px;
}
.battalion {
  width: 223px;
  text-align: center;
}
.battalion__crest {
  width: 223px;
  height: 223px;
  object-fit: contain;
}
.battalion__name {
  font-family: var(--font-helv-bold);
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  margin: 15px 0 0;
}
.battalion__status {
  font-family: var(--font-helv-light);
  font-weight: 400;
  font-size: 15px;
  line-height: 18px;
  margin: 5px 0 0;
}
.battalion__cta { margin-top: 17px; }
.battalions__join { display: flex; justify-content: center; margin-top: 42px; }

/* --- Leaderboard ------------------------------------------------------- */
.leaderboard { background: var(--c-page); padding: 60px 0 51px; }
.leaderboard__inner { width: var(--content-max); margin: 0 auto; }
.leaderboard__title { font-size: 34px; font-weight: 700; line-height: normal; text-align: center; letter-spacing: -0.02em; margin: 0 0 14px; }
.leaderboard__sub { font-size: 16px; line-height: 1.8; letter-spacing: -0.01em; text-align: center; margin: 0 0 24px; }
/* The live site embeds this widget in a fixed 1051px-tall iframe, so reserve the
   same box: the widget's own content is a little shorter than the frame. */
.leaderboard__widget { max-width: 860px; min-height: 1051px; margin: 0 auto; }

.sotu__title { font-size: 34px; font-weight: 700; line-height: 1; text-align: center; letter-spacing: -0.02em; margin: 48px 0 27px; }
.sotu__sub { font-size: 16px; line-height: 1.8; letter-spacing: -0.01em; text-align: center; width: 591px; margin: 0 auto 13px; }
.sotu__map { width: 830px; max-width: 100%; margin: 0 auto; }

/* --- News: 64px heading + hairline rule, then the feed embed ----------- */
.news { background: var(--c-bg); padding: 67px 0 39px; }
.news__inner { width: 1204px; max-width: calc(100% - 80px); margin: 0 auto; }
.news__head {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 27px;
}
.news__rule { height: 1px; background: rgba(0, 0, 0, 0.25); border: 0; margin: 0 0 49px; }
.news__embed { display: block; width: 852px; max-width: 100%; height: 871px; margin: 0 auto; border: 0; }

/* --- Partners: cream band, 3 logos ------------------------------------ */
.partners { background: var(--c-cream); padding: 41px 0 76px; text-align: center; }
.partners__title { font-size: 56px; font-weight: 700; line-height: normal; letter-spacing: -0.02em; margin: 0 0 36px; }
.partners__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 313px;
}
.partners__row img:nth-child(1) { width: 153px; height: 151px; object-fit: contain; }
.partners__row img:nth-child(2) { width: 177px; height: 83px; object-fit: contain; }
.partners__row img:nth-child(3) { width: 158px; height: 48px; object-fit: contain; }

/* --- Social icons ----------------------------------------------------- */
.social { background: var(--c-bg); padding: 47px 0 61px; text-align: center; }
.social__title { font-size: 30px; font-weight: 700; line-height: normal; letter-spacing: -0.03em; width: 507px; margin: 0 auto 32px; text-align: start; }
.social__row { display: flex; justify-content: center; gap: 40px; }
.social__row a { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.social__row a:hover { transform: translateY(-4px); }
.social__row img { width: 128px; height: 128px; }

/* --- Contact: field photo background, 809px card ---------------------- */
.contact {
  position: relative;
  min-height: 955px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.contact__card {
  position: relative;
  width: 809px;
  background: var(--c-bg);
  /* Left 107 / right 113 is what the live 809px card actually uses. */
  padding: 62px 113px 87px 107px;
  text-align: center;
}
.contact__title { font-size: 38px; font-weight: 700; line-height: normal; letter-spacing: -0.02em; width: 559px; margin: 0 auto 25px; }
.contact__lede { font-size: 18px; line-height: 1.8; width: 430px; margin: 0 auto 46px; }
.form__row { display: flex; gap: 49px; text-align: left; }
.form__field { flex: 1 1 0; text-align: left; }
.form__field--email { width: 270px; }
.form__field--full { flex: 0 0 510px; }
.form__label {
  display: block;
  font-family: var(--font-avenir);
  font-size: 14px;
  line-height: 14px;
  padding: 0 20px 0 1px;
  margin-bottom: 9px;
}
.form__row + .form__field { margin-top: 54px; }
.form__field--message { margin-top: 37px; }
.form__textarea::placeholder { color: #6f6f6f; }
.form__input {
  width: 100%;
  height: 40px;
  padding: 3px 3px 3px 7px;
  border: 0;
  border-bottom: 1px solid #000;
  border-radius: 0;
  background: transparent;
  font-family: var(--font-avenir);
  font-size: 14px;
  color: var(--c-ink);
}
.form__input:focus { outline: 0; border-bottom-color: var(--c-blue); }
.form__textarea {
  display: block;
  width: 510px;
  max-width: 100%;
  height: 126px;
  padding: 10.5px 10px 3px 7px;
  border: 0;
  border-bottom: 1px solid #000;
  background: transparent;
  font-family: var(--font-avenir);
  font-size: 14px;
  resize: vertical;
}
.form__textarea:focus { outline: 0; border-bottom-color: var(--c-blue); }
.form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 40px;
}
.form__submit {
  width: 270px;
  height: 50px;
  border-radius: var(--r-pill-sm);
  background: var(--c-blue);
  color: var(--c-offwhite);
  font-family: var(--font-avenir);
  font-size: 17px;
  line-height: 1;
}
.form__submit:hover { background: #0078dd; }

/* --- Footer: full-bleed banner image + 40px #3F3F3F strip ------------- */
.site-footer { line-height: 0; background: #3f3f3f; padding-bottom: 40px; }
.site-footer img { width: 100%; height: auto; }

/* --- Skip link -------------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 0; }

/* --- Focus visibility ------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--c-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Responsive. The reference site serves a fixed 980px layout to non-mobile
   user agents; below are the sensible collapses for narrower viewports.
   ========================================================================== */
@media (max-width: 1330px) {
  .site-header { padding: 0 40px; }
  .site-nav { margin-right: 0; }
  .split__text { flex: 1 1 55%; padding-left: 40px; }
  .split__cta { width: auto; margin-top: 60px; padding: 0 0 60px; justify-content: flex-start; }
  .partners__row { gap: 12vw; }
  .news__inner { width: calc(100% - 80px); }
}

@media (max-width: 1080px) {
  .battalion-grid { grid-template-columns: repeat(3, 223px); justify-content: center; }
  .battalions__inner,
  .leaderboard__inner { width: calc(100% - 60px); }
  .site-nav { display: none; margin: 0; }
  .site-nav.is-open {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--c-bg);
    padding: 8px 24px 24px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    z-index: 40;
  }
  .site-nav.is-open .site-nav__link { width: 100%; line-height: 44px; text-align: left; }
  .site-header { position: sticky; justify-content: space-between; }
  .site-nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
  }
  .site-nav__toggle span { display: block; height: 2px; background: var(--c-ink); }
  .contact__card { width: calc(100% - 40px); padding: 48px 32px; }
  .contact__lede { margin-bottom: 40px; }
}

@media (max-width: 860px) {
  .stats { flex-wrap: wrap; row-gap: 24px; }
  .stat { width: 50%; }
  .split { flex-direction: column; }
  .split__text { flex-basis: auto; padding: 40px 24px 0; }
  .h-display { width: 100%; margin-left: 0; font-size: 34px; }
  .split__media img { height: 320px; }
  .band__title { font-size: 28px; }
  .band__title--sm { font-size: 26px; }
  .h-section { font-size: 26px; }
  .news__head { font-size: 40px; }
  .partners__title { font-size: 40px; }
  .partners__row { flex-direction: column; gap: 32px; }
  .social__row { flex-wrap: wrap; gap: 24px; }
  .social__row img { width: 72px; height: 72px; }
  .social__title { font-size: 24px; }
  .contact__title { width: 100%; font-size: 28px; }
  .form__row { flex-direction: column; gap: 28px; }
  .form__field--full,
  .form__textarea { flex: 1 1 auto; width: 100%; }
  .form__row + .form__field { margin-top: 28px; }
  .form__actions { justify-content: stretch; }
  .form__submit { width: 100%; }
  .battalion-grid { grid-template-columns: repeat(2, 1fr); column-gap: 16px; justify-content: center; }
  .battalion,
  .battalion__crest { width: 100%; height: auto; }
  .btn--wide { width: 100%; }
  .stat__value { font-size: 40px; }
}
