/* ==========================================================================
   Chicagoland MedLaunch: shared styles for every page
   Mobile first: base styles are for phones, media queries add larger layouts.
   Breakpoints: 30em (480px), 48em (768px), 56em (896px), 64em (1024px)

   Design rules used throughout this file:
   - Colors: only the five brand colors below. No tints or see-through overlays.
   - Spacing: only the steps of the spacing scale (--space-*). A few header
     values are tighter on purpose so everything fits on one row at 360px;
     those are marked.
   - Type: four clear sizes. Hero headline, section headings, small headings,
     body text.
   - Motion: one signature moment (the hero skyline rising) plus feedback on
     things you touch (buttons, menu, "What we build" items, the header).
     Only transform and opacity animate, except the "What we build" examples,
     which open with a height change because they push content down.
   - With JavaScript off everything is shown, and with "reduce motion" on
     nothing moves (see "Reduced motion" at the end of this file).
   ========================================================================== */

/* ---------- Brand tokens ---------- */
:root {
  --red: #C8102E;   /* logo red: main buttons, call-to-action band, small accents */
  --navy: #14213D;  /* all text, dark sections, the skyline */
  --white: #FFFFFF; /* page background */
  --lake: #6CACE4;  /* Chicago flag light blue: only the thin "lake" line under skylines */
  --mist: #EEF1F5;  /* light background for one section, and light hover states */

  --font-display: "Big Shoulders Display", "Arial Narrow", Arial, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing scale (1rem = 17px on phones, 18px on larger screens) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-3xl: 7rem;

  /* Type scale (the hero headline is set on h1 below) */
  --text-h2: clamp(1.875rem, 1.45rem + 1.5vw, 2.625rem);  /* 32px phone, 47px desktop */
  --text-h3: clamp(1.3rem, 1.2rem + 0.35vw, 1.5rem);      /* 22px phone, 27px desktop */
  --text-lead: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem); /* 18px phone, 22px desktop */
  --text-small: 0.9375rem;
  --text-xs: 0.875rem;

  --max-width: 1120px;
  --gutter: 16px;
  --measure: 33em; /* about 65 characters per line */

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1); /* soft ease-out used by every animation */
  --masthead-trim: 0.35rem; /* how much shorter the white header bar gets after scrolling */

  /* The one color outside the five: warm light for skyline windows when they
     light up. Only ever used for windows, and only while they're lit. */
  --window-light: #FFF1C7;
}

@media (min-width: 48em) {
  :root { --gutter: 24px; }
}

@media (min-width: 64em) {
  :root { --gutter: 32px; }
}

/* ---------- Fonts (self-hosted, assets/fonts) ----------
   Big Shoulders Display 800 for headings, Public Sans for everything else.
   The Public Sans file is a variable font, so one file covers both weights
   we use (400 and 600). Both are preloaded in each page's <head>. Text shows
   right away in a fallback font and swaps when the font arrives. */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("../fonts/big-shoulders-display-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: 106.25%; /* 17px on phones */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 8rem; /* keeps on-page link targets clear of the sticky header */
  scroll-padding-bottom: 4rem; /* when Tab moves focus near the bottom edge, the browser scrolls it fully into view */
}

@media (min-width: 48em) {
  html { font-size: 112.5%; } /* 18px on larger screens */
}

/* Smooth scrolling for on-page links like #main (off for reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  overflow-wrap: break-word;
}

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

/* <picture> only picks WebP or PNG; the <img> inside is what gets laid out
   (the <source> line takes no space, so flex and grid gaps stay the same) */
picture {
  display: contents;
}

picture > source {
  display: none;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

/* Hero headline. On phones it's sized to the screen width so "Free tools
   for the / people who take / care of Chicagoland." always breaks into the
   same three lines (0.125 = font size per pixel of text width). If the
   headline text changes, check it on a 360px-wide screen. */
h1 {
  font-size: min(calc((100vw - 2 * var(--gutter)) * 0.125), 3.5rem);
  line-height: 0.98;
}

@media (min-width: 48em) {
  h1 { font-size: clamp(3.5rem, 2rem + 3.6vw, 5rem); } /* up to 90px */
}

h2 {
  font-size: var(--text-h2);
  line-height: 1.04;
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.1;
}

/* text-wrap: pretty avoids leaving one word alone on the last line of a
   paragraph or list item */
p {
  max-width: var(--measure);
}

p,
li {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

/* Links inside paragraphs keep a normal underline so they're easy to spot */
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.lead {
  font-size: var(--text-lead);
  max-width: 30em;
}

/* ---------- Sliding underlines ----------
   .link-slide: standalone links (footer, lists). No underline at rest; one
   slides in from the left on hover or keyboard focus.
   .text-link: "See more" style links. A red underline at rest; a navy one
   slides in over it on hover. */
.link-slide {
  position: relative;
  text-decoration: none;
}

.link-slide::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: var(--underline-offset, 0);
  left: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s var(--ease-out);
}

.link-slide:hover::after,
.link-slide:focus-visible::after {
  transform: scaleX(1);
}

.text-link {
  position: relative;
  display: inline-block;
  padding-block: var(--space-2xs);
  font-weight: 600;
  text-decoration: none;
}

.text-link::before,
.text-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.4rem;
  left: 0;
  height: 2px;
}

.text-link::before {
  background: var(--red);
}

.text-link::after {
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s var(--ease-out);
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
}

/* ---------- Accessibility helpers ---------- */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.topbar :focus-visible,
.footer-main :focus-visible,
.cta-band :focus-visible,
.skip-link:focus-visible {
  outline-color: var(--white);
}

main:focus {
  outline: none; /* main only receives focus from the skip link */
}

.skip-link {
  position: absolute;
  top: 0;
  left: var(--gutter);
  z-index: 100;
  padding: var(--space-xs) var(--space-s);
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin-inline: auto;
}

/* Sections don't all get the same space on purpose:
   .section--tight  for short statements (the promises, "Who we work with")
   .section         the default
   .section--roomy  for the one section that should breathe ("What we build") */
.section {
  padding-block: clamp(var(--space-xl), 7vw, var(--space-2xl));
}

.section--tight {
  padding-block: clamp(var(--space-l), 4vw, var(--space-xl));
}

.section--roomy {
  padding-block: clamp(var(--space-2xl), 10vw, var(--space-3xl));
}

.section--mist {
  background: var(--mist);
}

.section--flush-top {
  padding-top: 0; /* continues straight on from the page intro above it */
}

/* Heading on the left, content on the right (on wider screens) */
.split {
  display: grid;
  gap: var(--space-m);
}

@media (min-width: 56em) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
    column-gap: clamp(var(--space-l), 5vw, var(--space-2xl));
    align-items: start;
  }
}

/* ---------- Buttons ----------
   On hover a button lifts 2px and its color deepens: a layer (::before)
   in another brand color fades in behind the text (red becomes navy, white
   and outlined buttons become mist). On click it presses down slightly.
   --hover-bg sets the hover color for each kind of button. */
.button {
  position: relative;
  isolation: isolate; /* keeps the ::before layer behind the text */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: var(--space-xs) var(--space-m);
  border: 2px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.button::before,
.js .menu-toggle::before {
  content: "";
  position: absolute;
  inset: -2px; /* covers the 2px border too */
  z-index: -1;
  border-radius: inherit;
  background: var(--hover-bg, var(--navy));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}

@media (hover: hover) {
  .button:hover,
  .js .menu-toggle:hover {
    transform: translateY(-2px);
  }

  .button:hover::before,
  .js .menu-toggle:hover::before {
    opacity: 1;
  }
}

/* Keyboard focus gets the same lift and color as hover */
.button:focus-visible,
.js .menu-toggle:focus-visible {
  transform: translateY(-2px);
}

.button:focus-visible::before,
.js .menu-toggle:focus-visible::before {
  opacity: 1;
}

/* Pressing moves the button down, like pushing a real button */
.button:active,
.js .menu-toggle:active {
  transform: translateY(2px);
}

/* Red buttons: on hover or focus, a small white plus slides in before the
   words (the words slide over a little to make room; the button's size
   never changes). The text sits in a .button__label span. */
.button__label {
  position: relative;
  display: inline-block;
  transition: transform 0.2s var(--ease-out);
}

.button--primary .button__label::before,
.button--primary .button__label::after {
  content: "";
  position: absolute;
  top: 50%;
  background: var(--white);
  opacity: 0;
  transform: translateX(-0.3em);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.button--primary .button__label::before { /* horizontal bar */
  left: -0.95em;
  width: 0.55em;
  height: 0.14em;
  margin-top: -0.07em;
}

.button--primary .button__label::after { /* vertical bar */
  left: -0.745em;
  width: 0.14em;
  height: 0.55em;
  margin-top: -0.275em;
}

@media (hover: hover) {
  .button--primary:hover .button__label {
    transform: translateX(0.4em);
  }

  .button--primary:hover .button__label::before,
  .button--primary:hover .button__label::after {
    opacity: 1;
    transform: none;
  }
}

.button--primary:focus-visible .button__label {
  transform: translateX(0.4em);
}

.button--primary:focus-visible .button__label::before,
.button--primary:focus-visible .button__label::after {
  opacity: 1;
  transform: none;
}

.button--primary {
  --hover-bg: var(--navy);
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.button--secondary {
  --hover-bg: var(--mist);
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.button--light {
  --hover-bg: var(--mist);
  background: var(--white);
  border-color: var(--white);
  color: var(--red);
}

/* Header-sized button. The side padding is a little tighter than the
   spacing scale so the phone header fits on one row at 360px. */
.button--small {
  min-height: 2.75rem; /* still at least 44px tall */
  padding: var(--space-2xs) 0.6rem;
  font-size: var(--text-xs);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-l);
}

@media (max-width: 29.99em) {
  .button-row .button {
    width: 100%;
  }
}

/* ---------- Red plus list marker (instead of bullets) ----------
   .plus-list on a <ul> puts the plus before each item; .plus-item puts it
   before a single element (like the "what we could make" lines). */
.plus-list,
.plus-item {
  --plus-y: 0.775em; /* vertical center of the first line of text */
}

.plus-list {
  padding: 0;
  list-style: none;
}

.plus-list > li,
.plus-item {
  position: relative;
  padding-left: var(--space-l);
}

.plus-list > li::before,
.plus-list > li::after,
.plus-item::before,
.plus-item::after {
  content: "";
  position: absolute;
  background: var(--red);
  forced-color-adjust: none;
  /* --plus-open: 45deg makes an "x" (open accordion items)
     --plus-turn: 90deg is the little turn on hover or focus (still a plus)
     --plus-shift moves it sideways (Join us job list) */
  transform: translateX(var(--plus-shift, 0px)) rotate(calc(var(--plus-open, 0deg) + var(--plus-turn, 0deg)));
  transition: transform 0.3s var(--ease-out);
}

@media (hover: hover) {
  .plus-list > li:hover,
  .plus-item:hover {
    --plus-turn: 90deg;
  }
}

.plus-list > li:focus-within,
.pair:focus-within .plus-item {
  --plus-turn: 90deg;
}

.plus-list > li::before,
.plus-item::before { /* horizontal bar */
  top: calc(var(--plus-y) - 2px);
  left: 0;
  width: 14px;
  height: 4px;
}

.plus-list > li::after,
.plus-item::after { /* vertical bar */
  top: calc(var(--plus-y) - 7px);
  left: 5px;
  width: 4px;
  height: 14px;
}

/* ==========================================================================
   "Now accepting members" bar
   A thin navy bar at the very top of every page, above the header. It
   scrolls away with the page like normal content: no close button, no
   animation. (join.html shows it without the "Apply" link.)
   ========================================================================== */
.topbar {
  background: var(--navy);
  color: var(--white);
  font-size: var(--text-xs);
}

.topbar p {
  max-width: none;
  padding-block: var(--space-2xs);
}

.topbar a {
  display: inline-block;
  margin-block: calc(-1 * var(--space-2xs)); /* bigger tap area without making the bar taller */
  padding-block: var(--space-2xs);
  font-weight: 600;
}

/* ==========================================================================
   Shared header
   The header sticks to the top of the screen. After you scroll down a bit,
   main.js adds .is-compact: the white bar gets a little shorter, with a mist
   line under it. Scrolling back up removes .is-compact.
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: transform 0.3s var(--ease-out);
}

.masthead {
  position: relative;
}

/* The white bar and its bottom line are separate layers so they can slide */
.masthead::before,
.masthead::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.masthead::before { /* white background */
  top: 0;
  bottom: 0;
  z-index: -1;
  background: var(--white);
}

.masthead::after { /* mist bottom line, only shown when compact */
  bottom: 0;
  height: 2px;
  background: var(--mist);
  opacity: 0;
}

/* Compact: move the header up a little, then pull the white layer up by
   the same amount so the bar ends up shorter with even padding above and
   below the logo and buttons. */
.site-header.is-compact {
  transform: translateY(calc(-1 * var(--masthead-trim)));
}

.site-header.is-compact .masthead::before,
.site-header.is-compact .masthead::after {
  transform: translateY(calc(-1 * var(--masthead-trim)));
}

.site-header.is-compact .masthead::after {
  opacity: 1;
}

/* Phones: logo, wordmark, Menu and "Work with us" all fit on one row at 360px */
.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2xs);
  padding-block: var(--space-xs);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-right: auto;
  color: var(--navy);
  text-decoration: none;
}

.brand img {
  flex: none;
  width: 40px;
  height: 40px;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Stacked wordmark (two lines) until there is room for one line */
.brand__name > span {
  display: block;
}

/* ---------- Menu button ----------
   Only shown on smaller screens, and only when JavaScript runs. When the menu
   opens, the word "Menu" fades out and two bars rotate into an "x". The word
   stays in the page for screen readers, which also hear "expanded". */
.menu-toggle {
  display: none;
}

.js .menu-toggle {
  --hover-bg: var(--mist);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: var(--space-2xs) 0.6rem; /* tight on purpose, see .button--small */
  border: 2px solid var(--navy);
  border-radius: 2px;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.js .menu-toggle[aria-expanded="true"] {
  background: var(--navy);
  color: var(--white);
}

.js .menu-toggle[aria-expanded="true"]::before {
  visibility: hidden; /* no mist hover layer on the dark "open" button */
}

.menu-toggle__label {
  display: block;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.menu-toggle__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1rem;
  height: 2px;
  margin: -1px 0 0 -0.55rem;
}

.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.3);
  transition: transform 0.25s var(--ease-out), opacity 0.2s var(--ease-out);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__label {
  opacity: 0;
  transform: scale(0.85);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  opacity: 1;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  opacity: 1;
  transform: rotate(-45deg);
}

/* ---------- Main nav on smaller screens ----------
   Without JavaScript: a plain list under the header row.
   With JavaScript: a panel that drops down over the page. main.js adds
   .is-shown (display it), then .is-open (slide and fade it in). Each item
   fades in a moment after the one above it (--i is its position). */
.site-nav {
  flex-basis: 100%;
  order: 10;
}

.js .site-nav {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--navy);
  background: var(--white);
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.2s var(--ease-out), transform 0.25s var(--ease-out);
}

.js .site-nav.is-shown {
  display: block;
}

.js .site-nav.is-open {
  opacity: 1;
  transform: none;
}

.site-nav ul {
  margin-top: var(--space-2xs);
  padding: 0;
  border-top: 2px solid var(--navy);
  list-style: none;
}

.js .site-nav ul {
  width: min(100% - 2 * var(--gutter), var(--max-width));
  margin: 0 auto;
}

.site-nav li + li {
  border-top: 1px solid var(--mist);
}

.js .site-nav li {
  opacity: 0;
  transform: translateY(-0.375rem);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.js .site-nav.is-open li {
  opacity: 1;
  transform: none;
  transition-delay: calc(60ms + var(--i, 0) * 40ms);
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* The page you're on gets a red underline */
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.35em;
}

.header-cta[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
}

@media (min-width: 30em) {
  .brand { gap: var(--space-xs); }
  .brand img { width: 44px; height: 44px; }
  .brand__name { font-size: 1.1rem; }

  .button--small,
  .js .menu-toggle {
    padding-inline: var(--space-xs);
    font-size: var(--text-small);
  }
}

/* ---------- Wide screens: full nav in the header row ---------- */
@media (min-width: 64em) {
  .masthead__inner {
    flex-wrap: nowrap;
    gap: var(--space-l);
  }

  .brand__name {
    font-size: 1.3rem;
    line-height: 1;
  }

  .brand__name > span {
    display: inline;
  }

  .js .menu-toggle {
    display: none;
  }

  .site-nav,
  .js .site-nav {
    display: block;
    position: static;
    flex-basis: auto;
    order: 0;
    padding: 0;
    border: 0;
    background: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav ul,
  .js .site-nav ul {
    display: flex;
    gap: var(--space-m);
    width: auto;
    margin: 0;
    border: 0;
  }

  .site-nav li + li {
    border: 0;
  }

  .js .site-nav li {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Underline slides in on hover; the current page keeps a red one */
  .site-nav a {
    position: relative;
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    text-decoration: none;
  }

  .site-nav a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0.4rem;
    left: 0;
    height: 2px;
    background: var(--navy);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s var(--ease-out);
  }

  .site-nav a:hover::after,
  .site-nav a:focus-visible::after {
    transform: scaleX(1);
  }

  .site-nav a[aria-current="page"]::after {
    height: 3px;
    background: var(--red);
    transform: scaleX(1);
  }
}

/* ==========================================================================
   Skyline (inline SVG, colored with CSS "color")
   Each building is a <g class="building" style="--i:N">, numbered left to
   right, so the hero can raise them one after another.
   ========================================================================== */
.skyline {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 210;
}

/* ==========================================================================
   Home page
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(var(--space-l), 4.5vw, var(--space-xl));
}

.hero__inner {
  display: grid;
  grid-template-areas:
    "logo"
    "text";
  gap: var(--space-m);
  padding-bottom: clamp(var(--space-l), 5vw, var(--space-xl));
}

.hero__text {
  grid-area: text;
}

.hero__lead {
  margin-top: var(--space-m);
}

.hero__logo {
  grid-area: logo;
  width: clamp(72px, 20vw, 140px);
  height: auto;
}

.hero__skyline {
  color: var(--navy);
}

.hero__skyline .skyline {
  max-width: 1440px;
  margin-inline: auto;
}

/* The 4px lake line is its own layer so it can draw in from the left */
.hero__skyline::after {
  content: "";
  display: block;
  height: 4px;
  background: var(--lake);
}

/* The signature moment, played once: buildings rise from the lake line left
   to right (about 1.2s in all), then the lake line draws in. main.js adds
   .is-playing on load if the skyline is on screen; on phones and short
   screens, where it starts below the fold, it adds .is-waiting (hidden) and
   switches to .is-playing the first time you scroll to it.
   Without JavaScript the skyline is just shown. */
.hero__skyline .building {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.hero__skyline::after {
  transform-origin: left center;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__skyline.is-waiting .building {
    transform: scaleY(0);
  }

  .hero__skyline.is-waiting::after {
    transform: scaleX(0);
  }

  .hero__skyline.is-playing .building {
    animation: building-rise 0.5s var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 35ms); /* 21 buildings: last starts at 0.7s, ends at 1.2s */
  }

  .hero__skyline.is-playing::after {
    animation: line-draw 0.5s var(--ease-out) 1.05s both;
  }
}

@keyframes building-rise {
  from { transform: scaleY(0); }
  to { transform: none; }
}

@keyframes line-draw {
  from { transform: scaleX(0); }
  to { transform: none; }
}

@media (min-width: 56em) {
  .hero__inner {
    grid-template-areas: "text logo";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(var(--space-l), 5vw, var(--space-2xl));
  }

  .hero__logo {
    width: clamp(220px, 22vw, 280px);
  }
}

/* ---------- Three promises ---------- */
.promises {
  display: grid;
  gap: var(--space-m);
}

.promise h3 {
  margin-bottom: var(--space-2xs);
}

@media (min-width: 48em) {
  .promises {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(var(--space-l), 4vw, var(--space-xl));
  }
}

/* ---------- How we work ----------
   Three steps: big red numbers, a short step name, one sentence, joined by
   thin lake-blue lines like a route on a map. No boxes. Phones and tablets:
   the number sits to the left of each step and the line runs down to the
   next one. Wider screens: one row, the number on top, the line runs across.
   The numbers come from a CSS counter, so steps renumber themselves.
   main.js lights the steps up in order the first time the section scrolls
   into view (see "How we work: lighting up the route" below). */
.process {
  --num: 3.25rem;          /* size of the big numbers */
  --step-gap: var(--space-l);
  display: grid;
  gap: var(--step-gap);
  margin-top: var(--space-l);
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.process__step {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  align-content: start; /* keep number, name and sentence at the top of each step */
  column-gap: var(--space-s);
  counter-increment: step;
}

.process__step h3,
.process__step p {
  grid-column: 2;
}

.process__step h3 {
  margin-bottom: var(--space-2xs);
}

.process__number {
  position: relative;
  grid-row: 1 / span 2;
  justify-self: start;
  margin-top: 0.08em; /* lines the top of the number up with the top of the step name (measured) */
  color: var(--red);
  font-family: var(--font-display);
  font-size: var(--num);
  font-weight: 800;
  line-height: 0.8;
  transform-origin: left bottom;
  transition: transform 0.25s var(--ease-out);
}

.process__number::before {
  content: counter(step);
}

/* The route line to the next step (phones: down; wider screens: across) */
.process__step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(var(--num) * 0.95);
  bottom: calc(-1 * var(--step-gap) + 0.35rem);
  left: calc(var(--num) * 0.2 - 1.5px);
  width: 3px;
  background: var(--lake);
  transform-origin: top center;
}

/* Hovering a step brings its number forward a little */
@media (hover: hover) {
  .process__step:hover .process__number {
    transform: scale(1.08);
  }
}

@media (min-width: 56em) {
  .process {
    --num: clamp(3.5rem, 2rem + 3vw, 4.5rem);
    --step-gap: clamp(var(--space-l), 4vw, var(--space-xl));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: var(--space-xl);
  }

  .process__step {
    grid-template-columns: minmax(0, 1fr);
  }

  .process__step h3,
  .process__step p {
    grid-column: 1;
  }

  .process__number {
    grid-row: auto;
    margin-top: 0;
    margin-bottom: var(--space-s);
  }

  .process__step:not(:last-child)::after {
    top: calc(var(--num) * 0.4 - 1.5px);
    right: calc(-1 * var(--step-gap) + 0.5rem);
    bottom: auto;
    left: calc(var(--num) * 0.7);
    width: auto;
    height: 3px;
    transform-origin: left center;
  }
}

/* ---------- What we build preview ---------- */
.section-intro {
  margin-top: var(--space-s);
}

.build-list {
  --plus-y: calc(var(--text-h3) * 0.55); /* centers the plus on the first line of each h3 */
  display: grid;
  gap: var(--space-l);
  margin-block: var(--space-xl);
}

.build-list h3 {
  margin-bottom: var(--space-2xs);
}

@media (min-width: 48em) {
  .build-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl) clamp(var(--space-l), 5vw, var(--space-2xl));
    align-items: start;
  }
}

.build-more {
  margin-top: var(--space-2xs);
}

/* ==========================================================================
   Expandable list items (reusable: add data-accordion to a .plus-list and an
   .accordion-panel to each item)
   Without JavaScript the panels are simply shown. main.js turns each item's
   heading into a button, closes the panels and adds .accordion-ready. Opening
   an item turns its red plus into an "x" and smoothly opens its panel.
   Only one item is open at a time.
   ========================================================================== */
.accordion-panel p {
  padding-top: var(--space-xs);
  font-size: var(--text-small);
}

.accordion-toggle {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

/* Make the whole item tappable, not just the title */
.accordion-toggle::after {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-2xs));
}

@media (hover: hover) {
  .accordion-toggle:hover {
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
  }
}

/* Before main.js has set the list up, its panels are already hidden (the
   .js class is added in the <head>, before the page first appears), so the
   page doesn't draw them open and then jump when they close. */
.js [data-accordion]:not(.accordion-ready) .accordion-panel {
  display: none;
}

/* Closed: the panel takes no space and is hidden from screen readers.
   The visibility change waits until the closing animation has finished.
   (.accordion-animate is added just after load, so panels start closed
   without animating shut.) */
.accordion-ready .accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
}

.accordion-animate .accordion-panel {
  transition:
    grid-template-rows 0.35s var(--ease-out),
    opacity 0.3s var(--ease-out),
    visibility 0s linear 0.35s;
}

/* The open panel sits above the whole-item tap area, so its text can be
   selected and links inside an answer can be clicked */
.accordion-panel {
  position: relative;
  z-index: 1;
}

.accordion-panel__inner { /* added by main.js around the panel's content */
  min-height: 0;
  overflow: hidden;
}

.accordion-ready .is-open > .accordion-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.plus-list > li.is-open {
  --plus-open: 45deg; /* the plus becomes an "x" */
}

/* ---------- Call-to-action band ---------- */
.cta-band {
  padding-block: clamp(var(--space-xl), 7vw, var(--space-2xl));
  background: var(--red);
  color: var(--white);
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-m) var(--space-xl);
}

.cta-band .lead {
  margin-top: var(--space-xs);
}

/* ==========================================================================
   Content pages (What we build, Projects, About, FAQ)
   ========================================================================== */

/* ---------- Page intro: the h1 and lead paragraph at the top of a page ---------- */
.page-intro {
  padding-block: clamp(var(--space-2xl), 9vw, var(--space-3xl)) clamp(var(--space-l), 5vw, var(--space-2xl));
}

.page-intro .lead {
  margin-top: var(--space-m);
}

/* ---------- Page ending (heading, one line, a button) ---------- */
.page-end .lead {
  margin-top: var(--space-xs);
}

.button-row--with-link {
  align-items: center;
  column-gap: var(--space-l);
}

/* ---------- Partner logos ----------
   Logos keep their own colors and proportions: never stretched or cropped.
   Each logo is at most --logo-size × its own --logo-scale tall (the scale is
   set on each <img> in the HTML). Wide logos get a smaller scale and compact
   ones a bigger scale, so they all look about the same size. If a box is
   too narrow, the logo shrinks to fit instead of getting cut off. */
.partner-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(var(--logo-size, 4rem) * var(--logo-scale, 1));
}

/* Logo row: two per row on phones and tablets, one row on wider screens */
.logo-row {
  --logo-size: 4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: var(--space-l) var(--space-m);
  margin-top: var(--space-l);
  padding: 0;
  list-style: none;
}

@media (min-width: 56em) {
  .logo-row {
    --logo-size: clamp(3.5rem, 0.5rem + 5.4vw, 5.5rem);
    display: flex;
    justify-content: space-between;
    gap: var(--space-l);
  }

  .logo-row > li {
    flex: 0 1 auto;
  }
}

/* ---------- Partner logos band (right above the footer on every page) ----------
   Quieter than a normal section: thin lake line on top, smaller heading,
   less padding. The logos use the same sizes as everywhere else
   (--logo-size × each logo's --logo-scale). Centered on purpose.
   Phones and tablets: two per row, with an odd last logo centered on its
   own row. Wider screens: one centered row with even spacing. */
.partner-band {
  position: relative;
  padding-block: calc(clamp(var(--space-l), 4vw, var(--space-xl)) + 3px) clamp(var(--space-l), 4vw, var(--space-xl));
  background: var(--white);
  text-align: center;
}

.partner-band__title {
  font-size: var(--text-h3);
}

.logo-row--centered {
  justify-items: center;
  margin-top: var(--space-m);
}

.logo-row--centered > li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Each logo links to that partner's card on the Projects page. A logo that
   doesn't include the organization's name (Downers Grove Township) gets the
   name written under it. */
.partner-band__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3xs);
  max-width: 100%;
  color: var(--navy);
  text-decoration: none;
}

.partner-band__caption {
  max-width: 7.5em; /* two short lines, about as wide as the emblem */
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.partner-band__link .partner-logo {
  transition: transform 0.3s var(--ease-out);
}

@media (hover: hover) {
  .partner-band__link:hover .partner-logo {
    transform: translateY(-4px);
  }
}

.partner-band__link:focus-visible .partner-logo {
  transform: translateY(-4px);
}

.partner-band__more {
  margin-top: var(--space-m);
  max-width: none;
}

/* Less white space between the band and the footer skyline */
.partner-band + .site-footer .footer-skyline {
  padding-top: var(--space-l);
}

@media (min-width: 56em) {
  .logo-row--centered {
    justify-content: center;
    gap: clamp(var(--space-l), 3.5vw, var(--space-xl));
  }
}

/* ---------- Problem / what we could make (What we build page) ----------
   A two-column list with thin rules: the problem on the left, what we could
   make on the right (stacked on phones, where the red plus marks the answer). */
.pairs {
  margin-top: var(--space-l);
}

.pairs__head {
  display: none;
}

.pairs__list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--navy);
  list-style: none;
}

.pair {
  display: grid;
  gap: var(--space-xs);
  padding-block: var(--space-m);
  border-top: 1px solid var(--navy);
}

.pair__problem {
  font-weight: 600;
}

@media (min-width: 48em) {
  .pairs__head,
  .pair {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: var(--space-xl);
  }

  .pairs__head {
    display: grid;
    padding-bottom: var(--space-xs);
    font-size: var(--text-xs);
    font-weight: 600;
  }

  .pairs__head span:last-child {
    padding-left: var(--space-l); /* lines up with the text after the red plus */
  }
}

/* ---------- What we build: the four kinds of work ----------
   A simple two-column grid on wider screens (one column on phones). Each
   group has a thin rule on top, a short heading, one sentence, and a list
   of examples with the red plus. No boxes. */
.page-intro__more {
  margin-top: var(--space-s);
}

.make-grid {
  display: grid;
  gap: var(--space-l);
  margin-top: var(--space-l);
}

.make-group {
  padding-top: var(--space-m);
  border-top: 1px solid var(--navy);
}

.make-group h3 {
  margin-bottom: var(--space-2xs);
}

.make-group__list {
  display: grid;
  gap: var(--space-2xs);
  margin-top: var(--space-s);
}

.make-note {
  margin-top: var(--space-xl);
}

@media (min-width: 48em) {
  .make-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xl) clamp(var(--space-l), 5vw, var(--space-2xl));
  }
}

/* ---------- What we build: what you can expect ----------
   Four short points, each a bold lead-in and one sentence. */
.expect-list {
  display: grid;
  gap: var(--space-s);
  margin-top: var(--space-l);
}

@media (min-width: 48em) {
  .expect-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-m) var(--space-xl);
  }
}

/* ---------- Partner list (Projects page) ----------
   Logo on the left, text on the right, thin rules between (stacked on phones). */
.partners {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--navy);
  list-style: none;
}

.partner {
  --logo-size: 4.5rem;
  display: grid;
  gap: var(--space-m);
  padding-block: var(--space-l);
  border-top: 1px solid var(--navy);
}

.partner__name {
  font-size: var(--text-h3);
  line-height: 1.1;
}

.partner__town {
  margin-top: var(--space-3xs);
  font-size: var(--text-small);
  font-weight: 600;
}

.partner__town + p {
  margin-top: var(--space-2xs);
}

/* "What we're making": a small bold navy subheading with a little extra
   space above it, then the description as regular text (kept to the usual
   reading width by the paragraph rule, so it doesn't stretch across) */
.partner__making-title {
  margin-top: var(--space-m);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.partner__making {
  margin-top: var(--space-3xs);
}

@media (min-width: 48em) {
  .partner {
    --logo-size: 6rem;
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: var(--space-xl);
    align-items: center;
  }
}

/* ---------- About page ---------- */

.beliefs {
  --plus-y: calc(var(--text-h3) * 0.55); /* centers the plus on each line */
  display: grid;
  gap: var(--space-s);
}

.beliefs > li {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  font-weight: 800;
  line-height: 1.1;
}

/* ---------- FAQ page ---------- */
.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-l);
  margin-top: var(--space-m);
}

.faq-list {
  --plus-y: calc(var(--space-s) + var(--text-h3) * 0.55); /* item padding + half the question's line */
  border-bottom: 1px solid var(--navy);
}

.faq-list > li {
  padding-block: var(--space-s);
  border-top: 1px solid var(--navy);
}

.faq-list .accordion-toggle::after {
  inset: 0; /* tap area = the whole question row, without overlapping its neighbors */
}

.faq-list .accordion-panel p {
  font-size: 1rem;
}

/* ---------- Numbered list (What happens next, How to apply) ----------
   Plain text with red numbers in the headline font. The numbers come from a
   CSS counter, so items renumber themselves. */
.numbered {
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.numbered > li {
  position: relative;
  padding-left: var(--space-l);
  counter-increment: item;
}

.numbered > li + li {
  margin-top: var(--space-s);
}

.numbered > li::before {
  content: counter(item);
  position: absolute;
  top: -0.05em;
  left: 0;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 1.5em;
  font-weight: 800;
  line-height: 1;
}

.numbered--large {
  font-size: var(--text-lead);
}

/* ---------- Bigger button (Apply now) ---------- */
.button--large {
  min-height: 3.5rem;
  padding-inline: var(--space-l);
  font-size: 1.125rem;
}

/* ---------- Long page title on phones ----------
   "Join Chicagoland MedLaunch" is too long for one line on a phone, so it
   breaks as "Join / Chicagoland MedLaunch" (the &nbsp; in the HTML keeps the
   name together). This size makes sure the name always fits on its line. */
@media (max-width: 47.99em) {
  .title-fit {
    font-size: min(calc((100vw - 2 * var(--gutter)) * 0.106), 3.5rem);
  }
}

/* ---------- Work with us: form on the left, "What happens next" on the right ----------
   On phones the box comes first, above the form. */
.request {
  display: grid;
  gap: var(--space-xl);
}

.next-steps {
  align-self: start;
  padding: var(--space-m);
  background: var(--mist);
}

.next-steps__title {
  margin-bottom: var(--space-s);
  font-size: var(--text-h3);
}

.next-steps__email {
  margin-top: var(--space-m);
  overflow-wrap: anywhere;
}

@media (min-width: 56em) {
  .request {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    column-gap: clamp(var(--space-l), 5vw, var(--space-2xl));
  }

  .next-steps {
    position: sticky;
    top: 6rem; /* stays in view under the sticky header while you fill out the form */
    grid-column: 2;
    grid-row: 1;
  }

  .request-form {
    grid-column: 1;
    grid-row: 1;
  }
}

/* ---------- Form fields ----------
   Every field has a visible label above it. Errors show under the field in
   red text, and the field's border turns red. */
.form-note {
  font-size: var(--text-small);
}

.form-field {
  margin: var(--space-m) 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form-label {
  display: block;
  margin-bottom: var(--space-2xs);
  padding: 0;
  font-weight: 600;
}

.form-required {
  color: var(--red);
}

.form-optional {
  font-weight: 400;
}

.form-input {
  display: block;
  width: 100%;
  max-width: 32rem;
  min-height: 3rem;
  padding: var(--space-xs) var(--space-s);
  border: 2px solid var(--navy);
  border-radius: 2px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
}

.form-input--area {
  max-width: none;
  min-height: 8rem;
  resize: vertical;
}

.form-input:focus-visible {
  outline-offset: 2px;
}

.form-input[aria-invalid="true"] {
  border-color: var(--red);
}

/* Checkboxes and radio buttons: the whole row is the tap target */
.choices {
  display: grid;
  gap: var(--space-3xs);
}

.choice {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 2.75rem;
  cursor: pointer;
}

/* Our own checkbox and radio look. They're still the real <input>s, so the
   keyboard, screen readers and form sending work as normal. A navy square
   (or circle) that fills red with a white plus (or dot) when checked. */
.choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 2px solid var(--navy);
  border-radius: 2px;
  background: var(--white) no-repeat center / 0.85rem;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.choice input[type="radio"] {
  border-radius: 50%;
}

.choice input:checked {
  border-color: var(--red);
  background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M4 1h2v3h3v2H6v3H4V6H1V4h3z' fill='white'/%3E%3C/svg%3E");
}

.choice input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Ccircle cx='5' cy='5' r='2.4' fill='white'/%3E%3C/svg%3E");
}

.choice input:focus-visible {
  outline-offset: 2px;
}

.choice input[aria-invalid="true"] {
  border-color: var(--red);
}

@media (prefers-reduced-motion: no-preference) {
  .choice input:checked {
    animation: check-in 0.18s var(--ease-out);
  }
}

@keyframes check-in {
  from { transform: scale(0.8); }
  to { transform: none; }
}

/* High-contrast mode: use the system's own checkboxes so they stay visible */
@media (forced-colors: active) {
  .choice input {
    -webkit-appearance: auto;
    appearance: auto;
  }
}

.field-error {
  margin-top: var(--space-2xs);
  color: var(--red);
  font-size: var(--text-small);
  font-weight: 600;
}

.form-submit {
  margin-top: var(--space-l);
}

.form-status:not(:empty) {
  margin-bottom: var(--space-s);
  color: var(--red);
  font-weight: 600;
}

.form-status a {
  overflow-wrap: anywhere;
}

/* Shown in place of the form after it's sent */
.form-success {
  align-self: start; /* only as tall as the message, not the box beside it */
  padding: var(--space-m);
  background: var(--mist);
  font-size: var(--text-lead);
  font-weight: 600;
}

/* ---------- Join us ---------- */
.roles {
  display: grid;
  gap: var(--space-s);
  margin-top: var(--space-l);
}

@media (min-width: 48em) {
  .roles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-xl);
  }
}

.roles__note {
  margin-top: var(--space-l);
}

.takes {
  display: grid;
  gap: var(--space-s);
}

/* Apply now at the top of the page: the button with one small line next to
   it (under it on phones, where the button is full width) */
.apply-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-m);
  margin-top: var(--space-l);
}

.apply-top__note {
  font-size: var(--text-small);
}

@media (max-width: 29.99em) {
  .apply-top .button {
    width: 100%;
  }
}

.apply-now {
  margin-top: var(--space-l);
}

.apply-now ~ p {
  margin-top: var(--space-s);
}

/* ---------- 404 page ----------
   Four links, then the skyline with the L train parked on the lake line.
   Nothing moves here. */
.lost__links {
  display: grid;
  gap: var(--space-s);
  margin-top: var(--space-l);
}

.lost-scene {
  position: relative;
  max-width: 40rem;
  margin-top: var(--space-2xl);
  padding-bottom: 3px; /* room for the lake line */
  color: var(--navy);
}

.lost-scene::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--lake);
}

.lost-scene .l-train--parked {
  position: absolute;
  bottom: 3px;
  left: 6%;
  width: 8rem;
  height: auto;
  transform: none;
}

/* ==========================================================================
   Shared footer
   ========================================================================== */
.footer-skyline {
  position: relative;
  padding-top: clamp(var(--space-xl), 7vw, var(--space-2xl));
  padding-bottom: 3px; /* room for the lake line */
  color: var(--navy);
}

@media (min-width: 48em) {
  .footer-skyline .skyline {
    max-width: 40rem;
    margin-left: auto;
  }
}

.footer-main {
  padding-block: clamp(var(--space-xl), 6vw, var(--space-2xl)) var(--space-l);
  background: var(--navy);
  color: var(--white);
}

.footer-grid {
  display: grid;
  gap: var(--space-l);
}

.brand--light {
  color: var(--white);
}

.brand--light .brand__name {
  font-size: 1.3rem;
  line-height: 1;
}

.brand--light .brand__name > span {
  display: inline;
}

.footer-about p {
  max-width: 28em;
  margin-top: var(--space-s);
  font-size: var(--text-small);
}

.footer-nav ul {
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: var(--space-m);
}

/* Links and the "Email us" label share the same padding so their first
   lines line up across the footer columns */
.footer-nav a,
.footer-contact a,
.footer-label {
  padding-block: var(--space-2xs);
}

.footer-nav a,
.footer-contact a {
  --underline-offset: 0.45rem; /* lines the sliding underline up under the text */
  display: inline-block;
}

.footer-label {
  font-weight: 600;
}

.footer-contact a {
  overflow-wrap: anywhere;
}

.footer-legal {
  margin-top: var(--space-xl);
  font-size: var(--text-xs);
}

@media (min-width: 56em) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: clamp(var(--space-l), 4vw, var(--space-2xl));
  }

  .footer-nav ul {
    columns: 1;
  }
}

/* ==========================================================================
   Brand interactions
   Everything here uses our own pieces: the skyline, the lake line, the red
   plus, red/navy/white and the headline font. Each effect is short and runs
   once. main.js only adds the "waiting" classes (.lake-pending, .is-pending)
   when motion is allowed, so with JavaScript off or "reduce motion" on,
   everything is simply shown in its finished state.
   ========================================================================== */

/* ---------- Page to page: a quick crossfade where browsers support it ---------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
}

/* ---------- Skyline windows (hero and footer) ----------
   main.js adds small window rectangles inside each building. They're
   invisible until lit, so the skyline still looks exactly like the logo.
   Hover a building (or tap it) and its windows light up for a few seconds.
   After the hero skyline rises, a few windows flicker on, one at a time. */
.skyline .window {
  fill: var(--window-light);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
}

.building.is-lit .window,
.skyline .window.is-on {
  opacity: 1;
}

.building.is-lit .window {
  transition-duration: 0.15s;
  transition-delay: var(--d, 0ms); /* each window has its own small random delay */
}

.skyline .window.is-flicker {
  animation: window-flicker 0.45s linear both;
}

@keyframes window-flicker {
  0% { opacity: 0; }
  25% { opacity: 1; }
  40% { opacity: 0.25; }
  60% { opacity: 1; }
  100% { opacity: 1; }
}

/* ---------- Lake lines ----------
   The thin lake-blue lines above the logo band and under the footer skyline
   draw themselves from left to right the first time they scroll into view. */
.footer-skyline::after,
.partner-band::before {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--lake);
  transform-origin: left center;
  transition: transform 0.6s var(--ease-out);
}

.footer-skyline::after {
  bottom: 0;
}

.partner-band::before {
  top: 0;
}

.footer-skyline.lake-pending::after,
.partner-band.lake-pending::before {
  transform: scaleX(0);
}

/* A little wave where the mouse crosses a lake line (desktop only; main.js
   adds the wave and moves it to the mouse). It flattens back into the line. */
.hero__skyline,
.partner-band,
.footer-skyline {
  position: relative;
}

.ripple {
  position: absolute;
  left: 0;
  width: 120px;
  height: 14px;
  overflow: visible;
  color: var(--lake);
  opacity: 0;
  pointer-events: none;
}

.ripple path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.hero__skyline .ripple { bottom: -5px; }
.footer-skyline .ripple { bottom: -5.5px; }
.partner-band .ripple { top: -5.5px; }

.ripple.is-rippling {
  animation: ripple 0.6s var(--ease-out) both;
}

@keyframes ripple {
  from { opacity: 1; transform: translateX(var(--x, 0px)) scaleY(1); }
  to { opacity: 0; transform: translateX(var(--x, 0px)) scaleY(0); }
}

/* ---------- How we work: lighting up the route ----------
   While waiting (.is-pending), the numbers are navy and the lines are
   undrawn. main.js then lights each step in order: its number turns red
   (a red copy fades in on top) and the line draws to the next step. */
.process.is-pending .process__number {
  color: var(--navy);
}

.process.is-pending .process__number::after {
  content: counter(step);
  position: absolute;
  inset: 0;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.process.is-pending .process__step.is-lit .process__number::after {
  opacity: 1;
}

.process.is-pending .process__step:not(:last-child)::after {
  transform: scaleY(0);
  transition: transform 0.35s var(--ease-out);
}

.process.is-pending .process__step.is-linked::after {
  transform: none;
}

@media (min-width: 56em) {
  .process.is-pending .process__step:not(:last-child)::after {
    transform: scaleX(0);
  }

  .process.is-pending .process__step.is-linked::after {
    transform: none;
  }
}

/* ---------- What we build: problem, then fix ----------
   With JavaScript, each fix waits behind a "What we'd make" button. Pressing
   it slides the fix in and pushes the red arrow across. Without JavaScript
   the button is hidden and every fix shows. */
.flip-toggle {
  display: none;
}

.js .flip-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.flip-arrow {
  flex: none;
  width: 1.1em;
  height: 0.75em;
  color: var(--red);
  transition: transform 0.3s var(--ease-out);
}

.flip-toggle[aria-expanded="true"] .flip-arrow {
  transform: translateX(0.4em);
}

.js .pair__fix {
  display: none;
}

.js .pair.is-flipped .pair__fix {
  display: block;
  margin-top: var(--space-2xs);
}

@media (prefers-reduced-motion: no-preference) {
  .js .pair.is-flipped .pair__fix {
    animation: fix-in 0.35s var(--ease-out) both;
  }

  .js .pair.is-flipped .flip-arrow {
    animation: arrow-push 0.35s var(--ease-out) both;
  }
}

@keyframes fix-in {
  from { opacity: 0; transform: translateX(-1rem); }
  to { opacity: 1; transform: none; }
}

@keyframes arrow-push {
  from { transform: translateX(-0.4em); }
  to { transform: translateX(0.4em); }
}

/* ---------- Join us: job list ----------
   Hovering a job slides its red plus to the right and turns the name red. */
@media (hover: hover) {
  .roles > li:hover {
    --plus-shift: 4px;
  }

  .roles > li:hover strong {
    color: var(--red);
  }
}

/* ---------- Projects: partner rows ----------
   Hovering a row slides a thin red line in from the left along its top
   edge and nudges the logo up a little. */
.partner::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}

.partner {
  position: relative;
}

.partner .partner-logo {
  transition: transform 0.3s var(--ease-out);
}

@media (hover: hover) {
  .partner:hover::before {
    transform: scaleX(1);
  }

  .partner:hover .partner-logo {
    transform: translateY(-4px);
  }
}

/* ---------- Partner logos band: logos appear left to right, once ---------- */
.logo-row--centered > li {
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.logo-row--centered.is-pending > li {
  opacity: 0;
  transform: translateX(-0.5rem);
}

/* ---------- Work with us form: progress line ----------
   A thin lake-blue line along the top of the form fills in as the required
   questions get answered (main.js sets --progress from 0 to 1). It stays
   in view under the header while you scroll through the form. */
.form-progress {
  position: sticky;
  top: 4.25rem;
  z-index: 2;
  height: 0;
}

.form-progress::before,
.form-progress span {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
}

.form-progress::before {
  background: var(--mist);
}

.form-progress span {
  background: var(--lake);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  transition: transform 0.3s var(--ease-out);
}

/* ---------- Work with us form: thank-you moment ----------
   A mini skyline draws itself above the message, then one window lights up. */
.thanks-skyline {
  display: block;
  width: min(100%, 20rem);
  height: auto;
  aspect-ratio: 1000 / 210;
  margin-bottom: var(--space-s);
  color: var(--navy);
}

.thanks-skyline .shape {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 6;
}

.thanks-skyline .thanks-window {
  fill: var(--window-light);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .thanks-skyline.is-drawing .shape {
    fill-opacity: 0;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: shape-draw 0.7s var(--ease-out) forwards, shape-fill 0.25s linear 0.6s forwards;
  }

  .thanks-skyline.is-drawing .thanks-window {
    animation: window-flicker 0.45s linear 0.95s both;
  }
}

@keyframes shape-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes shape-fill {
  to { fill-opacity: 1; }
}

/* ---------- The "L" train (the one Easter egg) ----------
   When the footer skyline comes fully into view, a little navy train rides
   once along the lake line, left to right, in about 4 seconds. */
.l-train-track {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1.25rem;
  overflow: hidden;
  pointer-events: none;
}

.l-train {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 8rem;
  height: auto;
  transform: translateX(-110%);
}

.l-train.is-running {
  animation: l-train 4s linear both;
}

@keyframes l-train {
  from { transform: translateX(-110%); }
  to { transform: translateX(var(--track-end, 100vw)); }
}

/* ==========================================================================
   Reduced motion
   If someone has turned on "reduce motion" on their phone or computer,
   nothing moves: animations and transitions finish instantly and buttons
   don't lift or press. (main.js also skips the skyline rise.)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .button:hover,
  .button:active,
  .button:focus-visible,
  .js .menu-toggle:hover,
  .js .menu-toggle:active,
  .js .menu-toggle:focus-visible,
  .button--primary .button__label,
  .process__step:hover .process__number,
  .partner:hover .partner-logo,
  .partner-band__link:hover .partner-logo,
  .partner-band__link:focus-visible .partner-logo,
  .flip-toggle[aria-expanded="true"] .flip-arrow {
    transform: none !important;
  }

  .button--primary .button__label::before,
  .button--primary .button__label::after {
    display: none;
  }

  .plus-list > li,
  .plus-item {
    --plus-turn: 0deg !important;
    --plus-shift: 0px !important;
  }

  @view-transition {
    navigation: none;
  }
}

/* ==========================================================================
   Print: show everything, no sticky header
   ========================================================================== */
@media print {
  .site-header {
    position: static;
    transform: none;
  }

  .accordion-ready .accordion-panel {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
  }
}
