/* ==========================================================================
   Clean Air Capitals — a program of the Inspired Air Fund
   Built on the "Waves" identity (Inspired_Air_Fund_Concepts_04.pdf) and the
   Clean Air Capitals design canvas.

   Display type: Jost (stand-in for Domus Titling, the brand display face,
   which has no webfont licence in the kit). Body: Red Hat Text.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Core */
  --navy:        #0b162a;   /* full-bleed dark bands */
  --navy-slate:  #2e3a52;   /* secondary dark from the palette */
  --ink:         #121217;   /* headings, footer ground */
  --page:        #f7f7f4;   /* default page surface, never pure white */
  --white:       #ffffff;
  --blue:        #5187ed;   /* brand blue — accents, waves, CTA */
  --blue-pale:   #c7d7fc;
  --blue-link:   #2f5fbf;

  /* Accent palette (used sparingly, per the brand deck) */
  --peach:       #f6dccd;
  --sand:        #fdf0c0;
  --sage:        #d5e7cc;
  --sky:         #dce7fd;

  /* Text */
  --text:        #2a2c33;
  --text-soft:   #3a3c44;
  --text-muted:  #6b6d75;
  --on-dark:     rgba(247, 247, 244, 0.86);
  --on-dark-dim: rgba(247, 247, 244, 0.70);

  /* Lines */
  --rule:        #dedede;
  --rule-warm:   #e4e4e0;

  /* Type */
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --body: "Red Hat Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --wrap: 1160px;
  --gutter: 40px;
  --band: 104px;   /* vertical rhythm of the full-bleed sections */

  --radius: 2px;   /* the identity is near-square; corners stay tight */
  --lift: 0 18px 40px -22px rgba(11, 22, 42, 0.45);
  --ease: 150ms ease;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--blue-link);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--blue); }

/* Prose links stay underlined so they read as links in running text. */
p a, .prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

button, input { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
p { margin: 0; }

::selection { background: var(--blue-pale); color: var(--ink); }

/* Visible, on-brand focus ring for keyboard users. */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 1px;
}
.dark :focus-visible { outline-color: var(--blue-pale); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--navy);
  color: var(--page);
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 20px;
  transition: top var(--ease);
}
.skip-link:focus { top: 16px; color: var(--page); }

.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;
}

/* --------------------------------------------------------------------------
   3. Type roles
   -------------------------------------------------------------------------- */
.eyebrow {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blue);
}

.h-display {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(44px, 7.4vw, 104px);
  letter-spacing: 0.02em;
  line-height: 1.0;
  text-transform: uppercase;
  text-wrap: balance;
}

.h-page {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 76px);
  letter-spacing: 0.03em;
  line-height: 1.04;
  text-transform: uppercase;
  text-wrap: balance;
}

.h-section {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.03em;
  line-height: 1.12;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.h-card {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 23px);
  letter-spacing: 0.04em;
  line-height: 1.22;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}

.lede {
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.62;
  text-wrap: pretty;
}

.prose {
  font-size: clamp(17px, 1.9vw, 20px);
  line-height: 1.68;
  color: var(--text);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 880px; }

.band { padding-block: var(--band); }

.band--dark {
  background: var(--navy);
  color: var(--page);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.band--paper {
  background: var(--white);
  border-top: 1px solid var(--rule-warm);
  border-bottom: 1px solid var(--rule-warm);
}
/* Two white bands in a row share one hairline instead of doubling it. */
.band--paper + .band--paper { border-top: none; }

/* Dotted wave motif — "undulating graceful dotted lines represent the clean air" */
.waves {
  position: absolute;
  left: -6%;
  width: 112%;
  /* Overrides the global img max-width, which would otherwise clamp this to
     100% and leave a bare strip at the right edge of the band. */
  max-width: none;
  pointer-events: none;
  z-index: -1;

  /* Dissolve the field where copy sits (left on wide screens) and let it run at
     full strength in the open area to the right. Keeps the motif reading as a
     wave flowing past the text instead of through it. */
  -webkit-mask-image: linear-gradient(100deg,
    transparent 0%, transparent 26%, rgba(0,0,0,0.35) 42%,
    rgba(0,0,0,0.8) 58%, #000 72%);
  mask-image: linear-gradient(100deg,
    transparent 0%, transparent 26%, rgba(0,0,0,0.35) 42%,
    rgba(0,0,0,0.8) 58%, #000 72%);
}
.waves--hero   { bottom: -40px; height: 460px; opacity: 0.9; }
.waves--band   { top: -60px;    height: 340px; opacity: 0.65; }
.waves--footer { bottom: -30px; height: 260px; opacity: 0.5; }

/* A soft navy scrim directly behind the copy. It sits above the wave field but
   below the text, so any dots that do reach the type are knocked well back. */
.band--dark > .wrap { position: relative; }
.band--dark > .wrap::before {
  content: "";
  position: absolute;
  inset: -56px -72px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(115% 105% at 0% 45%,
    rgba(11, 22, 42, 0.97) 0%,
    rgba(11, 22, 42, 0.93) 40%,
    rgba(11, 22, 42, 0.62) 64%,
    rgba(11, 22, 42, 0) 86%);
}

/* --------------------------------------------------------------------------
   5. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 247, 244, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* The Clean Air Capitals lockup: civic disc with dotted air lines and a
   skyline, plus the two-line wordmark. Circle and skyline take currentColor so
   one inline mark serves paper and navy; the air lines keep their brand blues,
   which are reserved for air and never recoloured. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo__mark {
  width: 46px;
  height: 46px;
  flex: none;
}
.logo__wave2 { stroke: var(--blue); opacity: 0.5; }
.logo__word {
  font-family: var(--display);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.13em;
  line-height: 1.14;
}
.logo__word span { display: block; }

.logo--light { color: var(--page); }
.logo--light:hover { color: var(--page); }
.logo--light .logo__wave2 { stroke: var(--blue-pale); opacity: 0.55; }
.logo--sm { gap: 12px; }
.logo--sm .logo__mark { width: 40px; height: 40px; }
.logo--sm .logo__word { font-size: 17px; }

.nav { display: flex; align-items: center; gap: 34px; }

.nav__link {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--blue);
}

.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn--dark { background: var(--navy); color: var(--page); }
.btn--dark:hover { background: var(--blue-link); color: var(--page); }
.btn--blue { background: var(--blue); color: var(--navy); border-color: var(--blue); }
.btn--blue:hover { background: var(--blue-pale); color: var(--navy); border-color: var(--blue-pale); }

/* Mobile menu toggle — hidden until the nav collapses. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 44px;
}
.nav-toggle__bars {
  position: relative;
  width: 18px;
  height: 12px;
  flex: none;
}
.nav-toggle__bars i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle__bars i:nth-child(1) { top: 0; }
.nav-toggle__bars i:nth-child(2) { top: 5px; }
.nav-toggle__bars i:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule);
  background: var(--page);
  padding: 8px var(--gutter) 24px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-warm);
}
.mobile-nav a[aria-current="page"] { color: var(--blue-link); }
.mobile-nav .btn { margin-top: 22px; width: 100%; text-align: center; padding: 16px 22px; }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
/* Bottom padding is deliberately deep: it reserves a clear band for the wave
   field so the motif sits under the copy rather than running through it. */
.hero { padding: 104px 0 200px; }
.hero .waves--hero { height: 300px; bottom: -30px; }
.hero__eyebrow { margin-bottom: 32px; }
.hero__title { margin: 0; max-width: 15ch; }
.hero__lede {
  margin-top: 34px;
  max-width: 62ch;
  color: var(--on-dark);
}

.page-hero { padding: 96px 0 88px; }
.page-hero__lede {
  margin-top: 26px;
  max-width: 58ch;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.6;
  color: var(--on-dark);
}
.page-hero__housed {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid rgba(199, 215, 252, 0.28);
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--blue-pale);
}
/* Inherit the pale blue rather than the default link colour, which is far too
   dark to read on navy. */
.page-hero__housed a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(199, 215, 252, 0.5);
  transition: color var(--ease), text-decoration-color var(--ease);
}
.page-hero__housed a:hover {
  color: var(--white);
  text-decoration-color: var(--white);
}

/* --------------------------------------------------------------------------
   7. Why classrooms
   -------------------------------------------------------------------------- */
/* Evidence cards — the claims from the paragraph above, in the accent palette. */
.evidence {
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.evidence li {
  background: var(--tint, var(--sky));
  padding: 26px 24px 30px;
  border-radius: var(--radius);
}
.evidence h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
}
.evidence p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy-slate);
  text-wrap: pretty;
}

/* Citation links: inherit the card's ink so contrast holds on every tint, and
   carry a quiet underline rather than the usual link blue. */
.evidence a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(11, 22, 42, 0.38);
  transition: color var(--ease), text-decoration-color var(--ease);
}
.evidence a:hover {
  color: var(--navy);
  text-decoration-color: var(--navy);
}

/* --------------------------------------------------------------------------
   8. Offer grid (What a participating city gets)
   -------------------------------------------------------------------------- */
/* Each card carries its own top rule and there is no container frame, so the
   five-into-three-columns row leaves open space rather than an outlined empty
   cell. Works at any column count. */
.offer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  column-gap: 48px;
  row-gap: 8px;
}
.offer__item {
  border-top: 1px solid var(--rule-warm);
  padding: 28px 0 44px;
}
.offer__num {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 18px;
}
.offer__item h3 { margin-bottom: 14px; }
.offer__item p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   9. Call to action / signup
   -------------------------------------------------------------------------- */
.cta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 56px;
  align-items: end;
}
.cta h2 { margin-bottom: 18px; font-size: clamp(28px, 3.6vw, 38px); }
.cta p { color: var(--on-dark); max-width: 46ch; font-size: clamp(17px, 1.9vw, 19px); }

.signup__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.signup input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  background: transparent;
  border: 1px solid rgba(199, 215, 252, 0.5);
  border-radius: var(--radius);
  color: var(--page);
  font-size: 17px;
  padding: 15px 18px;
  transition: border-color var(--ease);
}
.signup input[type="email"]::placeholder { color: rgba(247, 247, 244, 0.45); }
.signup input[type="email"]:hover { border-color: rgba(199, 215, 252, 0.8); }
.signup button { padding: 16px 26px; border: none; }
.signup__note {
  margin-top: 20px;
  font-size: 16px;
  color: var(--on-dark-dim);
}
.signup__note a { color: var(--blue-pale); }
.signup__note a:hover { color: var(--white); }

.signup__status {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.5;
  min-height: 0;
}
.signup__status:empty { margin-top: 0; }
.signup__status[data-state="ok"] { color: var(--blue-pale); }
.signup__status[data-state="error"] { color: #f6b8a4; }

/* Honeypot — off-screen, never shown to a human. */
.signup__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   10. Team
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 56px 40px;
}

.person h3 { margin-bottom: 14px; font-size: clamp(20px, 2.4vw, 24px); }
.person__bio {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-soft);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-dim);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 48px;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
}
.site-footer a { color: var(--blue-pale); }
.site-footer a:hover { color: var(--white); }
.site-footer__meta { font-size: 15px; line-height: 1.7; }
.site-footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.site-footer__legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(247, 247, 244, 0.12);
  font-size: 14px;
  color: rgba(247, 247, 244, 0.5);
  position: relative;
}

/* --------------------------------------------------------------------------
   12. 404
   -------------------------------------------------------------------------- */
.notfound {
  min-height: 62vh;
  display: grid;
  align-content: center;
  padding: 120px 0;
}
.notfound p { margin-top: 24px; max-width: 46ch; color: var(--on-dark); }
.notfound__actions { margin-top: 40px; display: flex; gap: 14px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   13. Motion — restrained, and fully optional
   -------------------------------------------------------------------------- */
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-6%, 0, 0); }
}
.waves { animation: drift 90s linear infinite alternate; }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .waves { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --gutter: 32px; --band: 88px; }
  .offer { column-gap: 36px; }
}

/* Nav collapses to the toggle. */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 80px 0 170px; }
  .team-grid { gap: 44px 32px; }
}

@media (max-width: 640px) {
  :root { --gutter: 22px; --band: 68px; }
  body { font-size: 16px; }

  .site-header__inner { padding: 16px var(--gutter); }
  .logo { gap: 10px; }
  .logo__mark { width: 36px; height: 36px; }
  .logo__word { font-size: 15px; letter-spacing: 0.11em; }

  .hero { padding: 64px 0 150px; }
  .hero .waves--hero { height: 200px; bottom: -20px; }
  .hero__eyebrow { margin-bottom: 24px; }
  .hero__title { max-width: none; }
  .hero__lede { margin-top: 26px; }

  .page-hero { padding: 64px 0 60px; }

  .waves--hero { height: 320px; bottom: -30px; }
  .waves--band { height: 240px; }

  .evidence { margin-top: 44px; gap: 14px; }
  .evidence li { padding: 22px 20px 24px; }

  .offer { row-gap: 0; }
  .offer__item { padding: 24px 0 32px; }
  .offer__num { margin-bottom: 14px; }

  .cta { gap: 40px; }
  .signup__row { flex-direction: column; }
  /* Stacked, the main axis is vertical — clear the 240px flex-basis so it
     stops being read as the input's height. */
  .signup input[type="email"] { flex: none; }
  .signup input[type="email"],
  .signup button { width: 100%; }

  .team-grid { grid-template-columns: 1fr; gap: 44px; max-width: 420px; }

  .site-footer { padding: 44px 0 36px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; gap: 24px; }
  .site-footer__legal { margin-top: 32px; }

  .notfound { padding: 80px 0; min-height: 50vh; }
}


/* --------------------------------------------------------------------------
   15. Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .mobile-nav, .waves, .signup, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band--dark, .site-footer { background: #fff !important; color: #000 !important; }
  .band--dark *, .site-footer * { color: #000 !important; }
  .band { padding-block: 24pt; }
  a { color: #000; }
  a[href^="http"]::after,
  a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
