/* Cyvl site. Pure white and pure black, square buttons, one container. The typeface is picked in the nav
   for now (Inter by default); --font is set from there. */

:root {
  --paper: #FFFFFF;
  --ink: #000000;
  --soft: #6B6B6B;
  --mute: #C9C9C6;
  --wash: #F3F3F1;
  --line: #E6E6E3;
  --night: #000000;
  --hiviz: #DAFF00;
  --night-soft: #A1A1A1;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 3.5vw, 56px);
  --max: 1520px;
  --nav-h: 84px;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.5 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; letter-spacing: -0.035em; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--hiviz); color: #000; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.display { font-size: clamp(48px, 7.4vw, 128px); line-height: .96; letter-spacing: -0.045em; }
.h2 { font-size: clamp(36px, 4.6vw, 76px); line-height: 1.02; letter-spacing: -0.04em; }
.h3 { font-size: clamp(28px, 2.8vw, 44px); line-height: 1.08; letter-spacing: -0.03em; }
.lede { font-size: clamp(18px, 1.4vw, 21px); line-height: 1.45; color: var(--soft); max-width: 30em; }
.eyebrow { font-size: clamp(17px, 1.3vw, 19px); font-weight: 500; color: var(--soft); letter-spacing: -0.005em; margin-bottom: 22px; }

/* ---------- buttons: square, filled ---------- */

.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  padding: 17px 26px; border-radius: 0; background: var(--ink); color: var(--paper);
  font-size: 16px; font-weight: 500; letter-spacing: -0.005em; overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease);
}
/* Hover: hi-vis fills in from the left and the label turns black as it passes. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hiviz);
  transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease);
}
.btn:hover, .btn:focus-visible { color: #000; }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-ghost { background: transparent; color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.btn-ghost::before { background: currentColor; opacity: .08; }
.arrow { width: 16px; height: 16px; flex: none; }

.link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease);
  padding-bottom: 2px;
}
.link:hover, .link.is-active { background-size: 100% 1px; }

/* ---------- nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  transition: transform .6s var(--ease), box-shadow .4s;
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav-in {
  height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
}
.nav-logo { justify-self: start; display: block; }
.nav-logo img { height: 22px; width: auto; }
.nav-links { display: flex; gap: clamp(24px, 3vw, 44px); font-size: 15px; }
.nav-right { justify-self: end; display: flex; align-items: center; gap: clamp(14px, 1.6vw, 24px); font-size: 15px; }
.nav-signin { font-weight: 500; }
.btn-sm { padding: 12px 18px; font-size: 15px; gap: 10px; }
.btn-sm .arrow { width: 14px; height: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Americans served: lives in the footer */
.served { display: flex; align-items: baseline; gap: 8px; margin-top: clamp(28px, 3vw, 40px); font-size: 17px; color: var(--night-soft); }
.served-num { color: #fff; font-variant-numeric: tabular-nums; display: inline-flex; overflow: hidden; height: 1.3em; font-weight: 500; }
.served-num .d { display: inline-block; }

.nav-menu-btn { display: none; justify-self: end; font-size: 15px; font-weight: 500; }
.menu {
  position: fixed; inset: 0; z-index: 49; background: var(--paper);
  padding: calc(var(--nav-h) + 24px) var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease); visibility: hidden;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; }
.menu-links a { display: block; font-size: 44px; line-height: 1.15; letter-spacing: -0.04em; font-weight: 500; opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.menu-open .menu-links a { opacity: 1; transform: none; }
.menu-open .menu-links a:nth-child(2) { transition-delay: .05s; }
.menu-open .menu-links a:nth-child(3) { transition-delay: .1s; }
.menu-foot { display: grid; gap: 18px; font-size: 17px; justify-items: start; }
.menu-foot .btn-block { margin: 0; padding: 22px 26px; font-size: 20px; }

@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .nav-in { grid-template-columns: 1fr auto; }
  .nav-links, .nav-right { display: none; }
  .nav-menu-btn { display: block; }
}

/* ---------- media slots: real picks or labeled placeholders ---------- */

.media { position: relative; margin: 0; overflow: hidden; background: var(--wash); }
.media > .media-el { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media .ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(14px, 1.6vw, 24px); color: var(--soft); font-size: 15px; line-height: 1.35;
  background:
    linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%) -150% 0 / 60% 100% no-repeat,
    var(--wash);
  animation: sheen 7s var(--ease) infinite;
}
@keyframes sheen { 0%, 35% { background-position: -150% 0, 0 0; } 100% { background-position: 250% 0, 0 0; } }
.ph-kind { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.ph-kind svg { width: 14px; height: 14px; }
.ph-label { max-width: 26em; }
.media-thumb .ph { padding: 0; align-items: center; justify-content: center; animation: none; }
.media-thumb .ph-label, .media-thumb .ph-kind span { display: none; }
.media-thumb { width: 56px; height: 56px; }
.media-logo .ph { align-items: center; justify-content: center; text-align: center; gap: 6px; animation: none; background: var(--wash); }
.media-logo .ph-kind { display: none; }
.media-logo .ph-label { color: var(--ink); font-size: 17px; letter-spacing: -0.02em; }
.media-logo > .media-el { object-fit: contain; padding: 14%; background: var(--paper); }

.media-ctrl {
  position: absolute; left: clamp(12px, 1.4vw, 20px); bottom: clamp(12px, 1.4vw, 20px); z-index: 4;
  width: 40px; height: 40px; display: grid; place-items: center; color: #fff;
  background: rgba(0,0,0,.38); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .3s;
}
.media-ctrl:hover { background: rgba(0,0,0,.6); }
.media-ctrl svg { width: 14px; height: 14px; }

/* ---------- home: hero ---------- */

.hero { padding: var(--nav-h) var(--gutter) var(--gutter); }
.hero-frame { position: relative; height: calc(100svh - var(--nav-h) - var(--gutter)); min-height: 520px; overflow: hidden; }
.hero-frame > .media { position: absolute; inset: 0; }
.hero-frame.has-media::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, rgba(0,0,0,.32), rgba(0,0,0,.08) 70%); pointer-events: none; }
.hero-copy {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(28px, 3vw, 40px); text-align: center; padding: 0 var(--gutter);
}
.hero-copy .display { max-width: 12ch; }
.has-media .hero-copy { color: #fff; }
.has-media .hero-copy .btn { background: var(--paper); color: var(--ink); }
.skip {
  position: absolute; right: clamp(14px, 2vw, 28px); bottom: clamp(14px, 2vw, 28px); z-index: 3;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 15px; font-weight: 500;
  background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink);
  transition: background .4s var(--ease), color .4s var(--ease);
}
.skip:hover { background: var(--ink); color: var(--paper); }
.has-media .skip { background: rgba(0,0,0,.28); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.has-media .skip:hover { background: #fff; color: var(--ink); }
.hero-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 2px; background: rgba(255,255,255,.25); display: none; }
.has-media .hero-progress { display: block; }
.hero-progress i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.hero-frame .media-ctrl { display: none; }

/* Home hero: the line is written on the wall in the first shot, then cleared by the truck. */
.hero-scene { position: absolute; inset: 0; overflow: hidden; will-change: transform; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #EDE6DC; }
.is-scene::after { display: none; }
.wall-text {
  position: absolute; left: var(--tx, 50%); top: var(--ty, 38%); width: var(--tw, 64%);
  transform: translate(-50%, -50%); margin: 0; text-align: center; pointer-events: none;
  font-size: var(--tf, 56px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 500;
  color: #2A2521; mix-blend-mode: multiply; text-wrap: balance;
}
.wall-text .ww { display: inline-block; white-space: nowrap; }
.wall-text .ch { display: inline-block; opacity: 0; will-change: transform, opacity, filter; }
.no-motion .wall-text .ch { opacity: 1; }
/* When the truck parks, the video narrows to a window on the sensor and the pitch sits in the white below */
.hero-scene { background: #fff; }
.hero-box {
  position: absolute; left: 0; right: 0; bottom: 0; top: 50%; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(24px, 2.6vw, 40px);
  padding: clamp(24px, 4vh, 56px) var(--gutter); color: var(--ink); text-align: center;
  opacity: 0; pointer-events: none;
}
.hero-box.is-in { opacity: 1; pointer-events: auto; }
.hb-title { max-width: 30ch; font-size: clamp(26px, 2.7vw, 48px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 500; text-wrap: balance; }
.hb-actions { display: flex; justify-content: center; gap: 12px; }
@media (max-width: 480px) { .hb-actions { gap: 8px; } .hb-actions .btn { padding: 15px 16px; gap: 10px; } }
.btn-white { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hero-frame:has(.hero-box.is-in) .hero-progress { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hero-box { transition: none; } }
.hero-frame .ph, .full .ph { justify-content: flex-start; gap: 6px; }

/* ---------- color changes: a card rises and widens (after realfood.gov) ---------- */

.card { position: relative; isolation: isolate; overflow: clip; }
.card > .card-bg {
  position: absolute; left: 0; right: 0; top: 0; bottom: -15%; z-index: -1;
  border-radius: 12px 12px 0 0; transform-origin: 50% 0; will-change: transform;
}
.card-dark { background: var(--paper); color: #fff; }
.card-dark > .card-bg { background: var(--night); }
.card-light { background: var(--night); color: var(--ink); }
.card-light > .card-bg { background: var(--paper); }

/* ---------- home: trusted ---------- */
/* Six city cards, 3 by 2. Hover (or tap) brings up the city's photo, its population, and what changed. */

.trusted { padding: clamp(96px, 12vw, 180px) 0 clamp(72px, 9vw, 140px); text-align: center; }
.trusted .eyebrow { margin-bottom: clamp(32px, 4vw, 52px); color: var(--soft); font-size: 17px; }
.trusted .more { margin: clamp(32px, 4vw, 52px) auto 0; max-width: 30em; color: var(--soft); font-size: 17px; }
.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 16px); max-width: 1180px; margin: 0 auto; text-align: left; }
.cc {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; isolation: isolate; cursor: default; outline: none;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .5s var(--ease);
}
.cc > .media { position: absolute; inset: 0; z-index: -2; background: transparent; opacity: 0; transform: scale(1.08); transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.cc > .media .ph { display: none; }
.cc::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s var(--ease);
  background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.6) 55%, rgba(0,0,0,.4)); }
.cc-in { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(18px, 1.8vw, 28px); }
.cc-name { display: flex; align-items: center; gap: 10px; font-size: clamp(28px, 2.6vw, 42px); line-height: 1; letter-spacing: -0.04em; font-weight: 500; transition: color .5s var(--ease); }
.cm-state { font-size: 15px; line-height: 1; font-weight: 500; letter-spacing: .04em; color: var(--soft); padding: 4px 6px 3px; box-shadow: inset 0 0 0 1px var(--line); transition: color .5s var(--ease), box-shadow .5s var(--ease); }
.cc-more { display: grid; grid-template-rows: 0fr; color: #fff; transition: grid-template-rows .6s var(--ease); }
.cc-more > div { overflow: hidden; min-height: 0; }
.cc-pop { margin-top: 14px; font-size: 17px; font-weight: 500; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.cc-out { margin-top: 4px; font-size: 17px; line-height: 1.35; max-width: 24em; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease) .05s, transform .6s var(--ease) .05s; }
.cc:is(:hover, :focus-visible, .is-open) { box-shadow: inset 0 0 0 1px transparent; }
.cc:is(:hover, :focus-visible, .is-open) > .media { opacity: 1; transform: none; }
.cc:is(:hover, :focus-visible, .is-open)::after { opacity: 1; }
.cc:is(:hover, :focus-visible, .is-open) .cc-name { color: #fff; }
.cc:is(:hover, :focus-visible, .is-open) .cm-state { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.85); }
.cc:is(:hover, :focus-visible, .is-open) .cc-more { grid-template-rows: 1fr; }
.cc:is(:hover, :focus-visible, .is-open) :is(.cc-pop, .cc-out) { opacity: 1; transform: none; }
@media (max-width: 960px) { .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cc-grid { grid-template-columns: 1fr; } }

/* ---------- home: before and after (ycombinator.com) ---------- */
/* Names scroll normally. The two pictures sit fixed at the sides and cut, with no animation, to the
   name nearest 56% down the screen, so fast scrolling can never queue or skip a transition. Only the
   first picture fades in and the last fades out, as you enter and leave. */

/* Top and bottom room so the sections around it are off screen while a picture shows. Each name gets
   about a quarter of a screen of scrolling, so the pictures hold long enough to read. */
.ba { position: relative; display: flex; justify-content: center; padding: 32vh 80px 30vh; overflow: hidden; }
.ba-panel {
  position: fixed; top: 50%; z-index: 10; width: 30%; height: 0; transform: translateY(-50%);
  display: flex; flex-direction: column; pointer-events: none;
}
.ba-before { left: 4%; }
.ba-after { right: 4%; }
.ba-card {
  position: absolute; left: 50%; top: 50%; width: 100%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; opacity: 0; z-index: 1; pointer-events: none;
}
.ba-card.is-on { opacity: 1; z-index: 20; pointer-events: auto; }
.ba-card.is-fade { transition: opacity .3s ease-in-out; }
.ba-label { margin-bottom: 8px; font-size: clamp(17px, 1.3vw, 20px); letter-spacing: -0.01em; }
.ba-label.soft { color: var(--soft); }
.ba-card .media { width: 100%; aspect-ratio: 1; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.ba-desc {
  position: absolute; left: 50%; top: 100%; width: 90%; transform: translateX(-50%); margin-top: 12px;
  text-align: center; font-size: 15px; line-height: 1.5; color: var(--ink); opacity: .9;
}
.ba-desc a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; color: var(--soft); white-space: nowrap; }
.ba-list { position: relative; display: flex; flex-direction: column; min-width: 300px; margin: 0; padding: 0; list-style: none; text-align: center; }
.ba-name {
  display: flex; flex-direction: column; align-items: center; width: 100%; padding: 10vh 0;
  font-size: 40px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; color: var(--soft); opacity: .15;
  margin: 0 auto;
  transition: all .5s cubic-bezier(.4, 0, .2, 1);
}
.ba-name.is-on { transform: scale(1.08); font-weight: 500; color: var(--ink); opacity: 1; }
.ba-reel { display: none; }
@media (min-width: 1280px) {
  .ba-panel { width: 32%; }
  .ba-before { left: 5%; } .ba-after { right: 5%; }
  .ba-list { min-width: 350px; }
  .ba-name { font-size: 48px; }
}
@media (min-width: 1536px) {
  .ba-panel { width: 34%; }
  .ba-before { left: 6%; } .ba-after { right: 6%; }
  .ba-list { min-width: 400px; }
  .ba-name { font-size: 56px; }
}
/* The close, once the last city has passed */
/* The closing line sits on the intersection loop, full bleed */
.ba-close .display { max-width: 16ch; margin: 0 auto; }
.ba-close.has-media::after { background: rgba(0,0,0,.42); }
/* Below 1024px: a row of cards, each playing Before then Now on its own clock */
@media (max-width: 1023px) {
  .ba { display: block; padding: 0 0 clamp(72px, 12vw, 120px); }
  .ba-panel, .ba-list { display: none; }
  .ba-reel { display: block; }
  .ba-reel .eyebrow { text-align: center; }
  .ba-track {
    display: flex; gap: 20px; padding: 0 32px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ba-track::-webkit-scrollbar { display: none; }
  .ba-slide {
    position: relative; flex: none; width: 88vw; max-width: 380px; aspect-ratio: 4 / 5;
    border-radius: 12px; overflow: hidden; scroll-snap-align: center; background: var(--wash);
  }
  .ba-slide .media { position: absolute; inset: 0; }
  .ba-slide .ba-now { opacity: 0; transition: opacity .7s ease-in-out; }
  .ba-slide.is-now .ba-now { opacity: 1; }
  .ba-slide .media .ph { padding-bottom: 150px; }
  .ba-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.1) 60%, rgba(0,0,0,.5) 85%, rgba(0,0,0,.7) 100%); }
  .ba-copy { position: absolute; inset: auto 0 0; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 22px 20px; color: #fff; }
  .ba-city { font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
  .ba-texts { position: relative; min-height: 44px; }
  .ba-texts p { font-size: 15px; line-height: 1.4; transition: opacity .5s ease-out, transform .5s ease-out; }
  .ba-texts a { text-decoration: underline; text-underline-offset: 3px; }
  .ba-t-now { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(8px); }
  .is-now .ba-t-before { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(-8px); }
  .is-now .ba-t-now { position: static; opacity: 1; transform: none; }
  .ba-bars { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 4px; font-size: 15px; color: rgba(255,255,255,.85); }
  .ba-bars i { position: relative; height: 2px; border-radius: 2px; overflow: hidden; background: rgba(255,255,255,.3); }
  .ba-bars b { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
}
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  .ba-slide .ba-now, .ba-texts p { transition: none; }
}

/* ---------- home: the problem ---------- */

.problem { padding: clamp(120px, 22vh, 240px) 0 clamp(140px, 26vh, 280px); }
.problem-in { display: grid; gap: clamp(36px, 6vh, 72px); justify-items: center; text-align: center; }
.problem-line { font-size: clamp(36px, 5vw, 84px); line-height: 1; letter-spacing: -0.045em; max-width: 17ch; }
/* Two real series side by side, drawn on when they arrive. Two reds: spending, and roads in poor shape. */
.charts { width: min(760px, 100%); display: grid; gap: clamp(20px, 3vw, 48px); text-align: left; }
.problem-in .eyebrow { margin-bottom: calc(-1 * clamp(18px, 4vh, 48px)); color: var(--night-soft); }
.better-head .eyebrow { margin-bottom: clamp(12px, 1.6vw, 20px); }
.chart { margin: 0; }
.chart figcaption { font-size: 17px; color: #fff; margin-bottom: 10px; letter-spacing: -0.01em; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: #3A3A3A; stroke-width: 1; }
.chart .grid { stroke: #1C1C1C; stroke-width: 1; }
.chart .tick { fill: #8A8A8A; font: 15px var(--font); letter-spacing: 0; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .val { font: 500 17px var(--font); letter-spacing: -0.01em; }
.c-spend .line { stroke: #FF5A4E; }
.c-spend .dot, .c-spend .val { fill: #FF5A4E; }
.chart .dot.end { stroke: #000; stroke-width: 3; }
.problem-stat { max-width: 40em; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; letter-spacing: -0.015em; color: #D6D6D6; }
.problem-stat b { color: #FF5A4E; font-weight: 500; }
.src { margin-left: 6px; font-size: 15px; font-weight: 400; color: var(--night-soft); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }
.src:hover { color: #fff; }
.down-arrow { width: 22px; height: 22px; color: var(--night-soft); animation: drift 3.6s var(--ease) infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(6px); opacity: 1; } }
@media (max-width: 860px) { .charts { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- home: how leading cities do it ---------- */

.better-stage { height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--nav-h) + 8px); padding-bottom: 28px; }
.better-stage > .wrap { width: 100%; }
.better-head { text-align: center; margin-bottom: clamp(22px, 4vh, 44px); }
.better-main { width: min(100%, calc((100svh - var(--nav-h) - 300px) * 16 / 9)); margin: 0 auto; }
.segs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.seg { display: grid; gap: 8px; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--mute); transition: color .5s var(--ease); }
.seg.is-active, .seg.is-done { color: var(--ink); }
.seg i { display: block; height: 2px; background: var(--line); overflow: hidden; }
.seg i b { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.better-frame { position: relative; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; background: var(--wash); }
.better-frame .media { position: absolute; inset: 0; box-shadow: 28px 0 56px -16px rgba(0,0,0,.32); will-change: transform; }
.js .better-frame .media + .media { transform: translateX(-130%); }
.better-frame .media:nth-child(2) .ph { background-color: #EAEAE6; }
.better-frame .media:nth-child(3) .ph { background-color: #E1E1DC; }
.better-frame .media:not(.is-filled)::after {
  content: attr(data-step); position: absolute; right: 4%; bottom: -6%; z-index: 1; pointer-events: none;
  font-size: clamp(120px, 18vw, 300px); line-height: 1; letter-spacing: -0.06em; font-weight: 500; color: rgba(0,0,0,.07);
}
.captions { position: relative; height: 3.2em; margin-top: 20px; }
.captions p { position: absolute; inset: 0; font-size: clamp(19px, 1.6vw, 24px); letter-spacing: -0.02em; line-height: 1.3; opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.captions p.is-active { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .better-main { width: min(100%, calc((100svh - var(--nav-h) - 320px) * 4 / 3)); }
  .better-frame { aspect-ratio: 4 / 3; }
  .captions { height: 4.2em; }
}

/* ---------- big call to action ---------- */

.cta { padding: clamp(120px, 16vw, 240px) 0; text-align: center; }
.cta .display { max-width: 13ch; margin: 0 auto clamp(36px, 4vw, 56px); }
.cta .lede { margin: -16px auto 40px; }
/* 404: the closing call to action, filling the first screen */
.notfound { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 48px) 0 96px; }
.notfound .wrap { width: 100%; }
.notfound .eyebrow { margin-bottom: clamp(20px, 2.4vw, 32px); }

/* ---------- footer ---------- */

.footer { padding: clamp(96px, 12vw, 160px) 0 36px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: start; }
.footer-logo img { height: 28px; width: auto; }
.footer-line { margin-top: 32px; font-size: clamp(40px, 5.6vw, 96px); line-height: .98; letter-spacing: -0.045em; font-weight: 500; }
.footer-line .footer-sub { color: var(--night-soft); display: block; }
.footer-links { display: grid; gap: 14px; justify-items: start; font-size: 19px; }
.footer-links .btn { margin-top: 18px; }
/* Bottom line: legal on the left, where we are in the middle, the count on the right */
.footer-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px 32px; margin-top: clamp(96px, 12vw, 180px); padding-top: 28px; border-top: 1px solid #222; color: var(--night-soft); font-size: 15px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom a { color: var(--night-soft); }
.footer-bottom a:hover { color: #fff; }
.footer-offices { text-align: center; }
.footer-bottom .served { justify-self: end; margin: 0; font-size: 15px; }
.socials { display: flex; gap: 18px; margin-top: clamp(28px, 3vw, 40px); }
.socials a { color: #fff; opacity: .8; transition: opacity .3s; }
.socials a:hover { opacity: 1; }
.socials svg { width: 18px; height: 18px; }
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { grid-template-columns: 1fr; }
  .footer-offices { text-align: left; }
  .footer-bottom .served { justify-self: start; }
}

/* ---------- inner pages ---------- */

/* Legal documents, moved over from the old site as they were */
.legal { padding: calc(var(--nav-h) + clamp(56px, 8vw, 120px)) 0 clamp(96px, 10vw, 160px); }
.legal .wrap { max-width: 820px; }
.legal h1 { margin-top: 16px; }
.legal-prose { margin-top: clamp(40px, 5vw, 64px); font-size: 17px; line-height: 1.65; }
.legal-prose h2 { font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; margin: 48px 0 14px; }
.legal-prose h3 { font-size: 19px; font-weight: 500; margin: 32px 0 10px; }
.legal-prose p, .legal-prose ul, .legal-prose ol { margin: 0 0 16px; }
.legal-prose ul, .legal-prose ol { padding-left: 1.4em; }
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose li { margin: 6px 0; }
.legal-prose a { text-decoration: underline; text-underline-offset: 3px; }
.legal-prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; display: block; overflow-x: auto; }
.legal-prose th, .legal-prose td { border: 1px solid #ddd; padding: 8px 10px; text-align: left; vertical-align: top; }

.page-hero { padding: calc(var(--nav-h) + clamp(72px, 12vw, 180px)) 0 clamp(64px, 8vw, 120px); }
.page-hero .lede { margin-top: 28px; }

/* Half and half: the picture runs to the edge of the screen on its side. Pictures keep a landscape
   frame (4:3, never taller than the screen) so wide photos aren't cut down to a sliver. */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.split + .split { margin-top: clamp(16px, 2vw, 32px); }
.split-media { position: relative; aspect-ratio: 4 / 3; max-height: calc(100svh - var(--nav-h) - 32px); width: 100%; overflow: hidden; }
.split-media > .media { position: absolute; inset: -6% 0; }
/* The year printed in the corner, like a film camera's date imprint */
.stamp {
  position: absolute; right: clamp(14px, 2vw, 24px); bottom: clamp(12px, 1.8vw, 20px); z-index: 2;
  font: 500 clamp(17px, 1.6vw, 22px)/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em;
  color: #FF9A3C; text-shadow: 0 0 6px rgba(255, 120, 30, .75), 0 0 1px rgba(255, 200, 120, .9);
}
.split-text { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 7vw, 120px) clamp(24px, 6vw, 112px); }
.split-text .h2 { max-width: 13ch; }
.split-text .lede { margin-top: 24px; max-width: 26em; }
.split.flip .split-media { order: 2; }
.num { display: block; font-size: clamp(72px, 9vw, 160px); line-height: .85; letter-spacing: -0.06em; font-weight: 400; margin-bottom: clamp(24px, 3vw, 44px); font-variant-numeric: tabular-nums; }
.facts { margin-top: 36px; display: grid; gap: 0; max-width: 28em; }
.facts li { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 17px; }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts li span { color: var(--soft); text-align: right; }
/* Three officials: one wide on top, two below, so each landscape photo keeps its subject in frame */
.triptych { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 55fr 45fr; gap: 4px; }
.triptych .media { position: relative; inset: auto; height: 100%; }
.triptych .media:first-child { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .split-media { order: 0; }
  .split-text { padding: 40px var(--gutter) 72px; }
  .triptych { aspect-ratio: 4 / 3.4; }
}

.full { position: relative; height: min(100svh, 62.5vw); min-height: 520px; overflow: hidden; }
.full > .media { position: absolute; inset: 0; }
.full-copy { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 40px; padding: 0 var(--gutter); }
.full-copy .mega { font-size: clamp(80px, 15vw, 260px); line-height: .85; letter-spacing: -0.06em; font-weight: 500; }
.full.has-media::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0,0,0,.25); }
.full.has-media .full-copy { color: #fff; }
.full.has-media .btn { background: var(--paper); color: var(--ink); }

/* About: the opening note */
.letter { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 48px) 0 96px; }
.letter .down-arrow { position: absolute; left: 50%; bottom: clamp(24px, 4vh, 40px); margin-left: -11px; }
.letter-text { font-size: clamp(30px, 3.6vw, 60px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 500; max-width: 22ch; }
.letter-text .w { opacity: .14; }
.sign { display: flex; align-items: center; gap: 20px; margin-top: clamp(40px, 5vw, 72px); }
.sign p { color: var(--soft); line-height: 1.4; }
.sign p b { color: var(--ink); font-weight: 500; display: block; }
.value-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; max-width: 30em; }
.value-grid li { display: grid; justify-items: start; gap: 14px; padding: 18px 0 0; border-top: 1px solid var(--ink); }
.value-grid svg { width: 32px; height: 32px; }
.value-grid b { font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.values { margin-top: 36px; display: grid; max-width: 30em; }
.values li { display: grid; grid-template-columns: 9em 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.values li:last-child { border-bottom: 1px solid var(--line); }
.values b { font-weight: 500; }
.values span { color: var(--soft); }
@media (max-width: 520px) { .values li { grid-template-columns: 1fr; gap: 2px; } }

/* Careers hero reuses the home hero frame */

/* ---------- motion helpers ---------- */

/* Each word rises out of its own mask. The mask reaches past the ascenders, descenders, and side bearings
   so no letter is ever clipped, whichever typeface is picked. */
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .16em .06em .26em; margin: -.16em -.06em -.26em; }
.split-words .w > span { display: inline-block; will-change: transform; }
/* Starting states for arrivals, held from the first paint (the js class is set in <head>). */
@media (prefers-reduced-motion: no-preference) {
  .js [data-split]:not(.split-words) { opacity: 0; }
  .js [data-split] .w > span { transform: translateY(130%); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); }
  .js .split-media, .js .triptych { clip-path: inset(100% 0 0 0); }
  .js .split-media > .media, .js .triptych > .media { scale: 1.2; }
}

/* Dev-only link to the image board */
.dev-images {
  position: fixed; right: 0; top: 50%; z-index: 60; padding: 10px 14px; font-size: 15px; font-weight: 500;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg);
  background: var(--ink); color: var(--paper); box-shadow: 0 10px 30px -12px rgba(0,0,0,.4);
  transition: opacity .4s;
}
.dev-images.is-away { opacity: 0; pointer-events: none; }
.dev-images:hover { background: #333; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .letter-text .w { opacity: 1; }
}

/* ---------- book a demo: a sheet on phones, a panel on larger screens ---------- */

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .45s var(--ease);
}
.modal-panel {
  position: relative; width: min(540px, 100%); max-height: calc(100svh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 12px; padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 40px 120px -40px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(18px) scale(.98);
  transition: opacity .45s var(--ease), transform .6s var(--ease);
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-panel { opacity: 1; transform: none; }
.modal-x {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; color: var(--soft); transition: background .3s, color .3s;
}
.modal-x:hover { background: var(--wash); color: var(--ink); }
.modal-x svg { width: 16px; height: 16px; }
.modal-title { font-size: clamp(30px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; padding-right: 40px; }
.modal-lede { margin-top: 10px; color: var(--soft); font-size: 17px; line-height: 1.45; }
.demo-form { display: grid; gap: 22px; }
.demo-form[hidden], .demo-done[hidden] { display: none; }
.demo-form .modal-lede { margin-bottom: 4px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 15px; color: var(--soft); }
.field > span em { font-style: normal; color: var(--mute); margin-left: 6px; }
.field input, .field textarea {
  width: 100%; font: 18px/1.4 var(--font); letter-spacing: -0.01em; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 8px 0 10px; outline: none; transition: border-color .3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: none; min-height: 3.4em; }
.field input:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--mute); }
.field.is-bad input { border-bottom-color: #B42318; }
.field .err { font-size: 15px; color: #B42318; display: none; }
.field.is-bad .err { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn-block { width: 100%; justify-content: center; padding: 19px 26px; margin-top: 6px; font-size: 17px; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn .spin { width: 16px; height: 16px; display: none; animation: spin .9s linear infinite; }
.btn[aria-busy="true"] .spin { display: block; }
.btn[aria-busy="true"] .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { font-size: 15px; color: #B42318; }
.fine { font-size: 15px; color: var(--soft); text-align: center; }
.fine a { text-decoration: underline; text-underline-offset: 3px; }

.demo-done { display: grid; justify-items: start; gap: 0; outline: none; }
.demo-done .check { width: 64px; height: 64px; margin-bottom: 28px; }
.demo-done .check circle { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 189; stroke-dashoffset: 189; }
.demo-done .check path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.demo-done.is-in .check circle { animation: draw-in .9s var(--ease) forwards; }
.demo-done.is-in .check path { animation: draw-in .6s var(--ease) .55s forwards; }
@keyframes draw-in { to { stroke-dashoffset: 0; } }
.demo-done > :not(.check) { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.demo-done.is-in > :not(.check) { opacity: 1; transform: none; }
.demo-done.is-in .modal-title { transition-delay: .35s; }
.demo-done.is-in .modal-lede { transition-delay: .45s; }
.demo-done.is-in .btn { transition-delay: .55s; }
.demo-done .btn { margin-top: 32px; }
.demo-form.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .35s var(--ease), transform .45s var(--ease); }

@media (max-width: 640px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal-panel {
    width: 100%; max-height: 92svh; border-radius: 12px 12px 0 0;
    padding: 28px 20px calc(24px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: opacity .3s var(--ease), transform .6s var(--ease);
  }
  .modal-panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -12px auto 18px; }
  .demo-form { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-done .check circle, .demo-done .check path { stroke-dashoffset: 0; }
  .demo-done > :not(.check) { opacity: 1; transform: none; }
}
