/* ==========================================================================
   O'Nine — design tokens
   ========================================================================== */
:root {
  --paper: #ffffff;
  --mist: #f2f3f5;
  --line: #e1e4e9;
  --line-strong: #c9ced6;
  --ink: #0a1a2f;
  --ink-soft: #24344a;
  --slate: #5a667a;
  --sun: #ffc20e;
  --sun-soft: #fff1c2;

  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --text: "Funnel Sans", "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --section: clamp(96px, 13vw, 184px);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, ol, ul, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 999px;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 5.4vw, 80px);
  line-height: 1;
  letter-spacing: -0.035em;
}

/* Masked line reveals — the one motion language of the page */
.mask { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.rise { display: block; transform: translateY(105%); }
.is-ready .hero .rise { animation: rise 1.2s var(--ease) var(--d, 0s) forwards; }
.reveal .rise { transition: transform 1.1s var(--ease); }
.reveal .mask:nth-child(2) .rise { transition-delay: .08s; }
.reveal .mask:nth-child(3) .rise { transition-delay: .16s; }
.reveal .mask:nth-child(4) .rise { transition-delay: .24s; }
.reveal.in .rise { transform: none; }
@keyframes rise { to { transform: none; } }

.load { opacity: 0; transform: translateY(14px); }
.is-ready .load { animation: fadeUp 1s var(--ease) var(--d, 0s) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --h: 54px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: var(--h); padding: 0 28px;
  border-radius: 999px;
  font-weight: 500; font-size: 16px; letter-spacing: -0.005em;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease), border-color .5s var(--ease);
}
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn--small { --h: 42px; padding: 0 20px; font-size: 15px; }
.btn--wide { padding: 0 36px; }

.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink::before { background: var(--sun); }
.btn--ink:hover, .btn--ink:focus-visible { color: var(--ink); }

.btn--line { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--line::before { background: var(--ink); }
.btn--line:hover, .btn--line:focus-visible { color: var(--paper); }

/* ==========================================================================
   Brand
   ========================================================================== */
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand__logo { height: 32px; width: auto; aspect-ratio: 952 / 452; transition: transform .6s var(--ease); }
.brand:hover .brand__logo { transform: scale(1.04); }

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  will-change: transform;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), transform .5s var(--ease);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 1px 0 var(--line);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner { display: flex; align-items: center; height: 76px; gap: 32px; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a {
  position: relative; padding: 8px 14px; font-size: 15px; color: var(--ink-soft);
  border-radius: 999px; transition: background-color .3s var(--ease), color .3s;
}
.nav__links a:hover { background: var(--mist); color: var(--ink); }
.nav__links a.is-current { color: var(--ink); }
.nav__links a.is-current::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--ink);
}
.nav__toggle { display: none; width: 44px; height: 44px; margin-left: auto; position: relative; }
.nav__toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink);
  transition: transform .45s var(--ease), top .45s var(--ease);
}
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

.mobile-menu {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px var(--gutter) 28px; background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:not(.btn) {
  font-family: var(--display); font-size: 34px; letter-spacing: -0.03em; font-weight: 500;
  padding: 6px 0;
}
.mobile-menu .btn { margin-top: 16px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-top: clamp(120px, 15vh, 168px); padding-bottom: clamp(72px, 9vw, 120px); }
.hero__meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 15px; color: var(--slate);
  padding-bottom: clamp(28px, 4vw, 48px);
}
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-soft); }
.status__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; flex: none; }
.status__dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  box-shadow: 0 0 0 1.5px #1f9d55; opacity: 0;
  animation: ping 2.4s var(--ease) infinite;
}
.status__dot.is-off { background: var(--line-strong); }
.status__dot.is-off::after { display: none; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

.hero__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(48px, 9.2vw, 148px);
  line-height: .94;
  letter-spacing: -0.048em;
  margin-left: -.05em;
}
.hero__title .mask:nth-child(2) { color: var(--slate); }

.hero__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px;
  margin-top: clamp(36px, 5vw, 64px);
}
.hero__lede { max-width: 50ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; color: var(--ink-soft); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Overlap instrument */
.overlap {
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(22px, 3vw, 40px);
  background: var(--mist);
  border-radius: 28px;
}
.overlap__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px 40px; flex-wrap: wrap; }
.overlap__readout { display: flex; align-items: flex-end; gap: 18px; }
.overlap__hours {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(64px, 7vw, 108px); line-height: .8; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.overlap__unit { font-size: .45em; letter-spacing: -0.02em; margin-left: .06em; color: var(--slate); }
.overlap__caption { max-width: 26ch; font-size: 16px; line-height: 1.4; color: var(--ink-soft); padding-bottom: 4px; }
.overlap__caption span { color: var(--ink); font-weight: 500; }

/* City picker: segmented bar + "more cities" menu */
.picker { position: relative; }
.picker__bar {
  position: relative; display: flex; flex-wrap: wrap; gap: 4px;
  padding: 5px; background: var(--paper); border-radius: 999px;
}
.picker__pill {
  position: absolute; z-index: 0; top: 5px; left: 0; height: 38px; width: 0; border-radius: 999px;
  background: var(--ink);
  transition: transform .6s var(--ease), width .6s var(--ease), top .6s var(--ease);
}
.city {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  font-size: 14.5px; color: var(--ink-soft); white-space: nowrap;
  transition: color .45s var(--ease), background-color .3s;
}
.city[aria-pressed="true"] { color: var(--paper); }
.city:hover:not([aria-pressed="true"]) { color: var(--ink); background: var(--mist); }
.city--more { padding-right: 12px; }
.city--more svg { width: 14px; height: 14px; transition: transform .5s var(--ease); }
.city--more[aria-expanded="true"] svg { transform: rotate(180deg); }

.picker__menu {
  position: absolute; z-index: 20; top: calc(100% + 8px); right: 0;
  min-width: 260px; padding: 6px;
  background: var(--paper); border-radius: 18px;
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -12px rgba(10, 26, 47, .22);
  transform-origin: top right;
  animation: menuIn .38s var(--ease);
}
.picker__menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.picker__opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 14px; border-radius: 12px; text-align: left;
  font-size: 15px; color: var(--ink); cursor: pointer;
  transition: background-color .25s var(--ease);
}
.picker__opt small { margin-left: auto; padding-left: 12px; font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
.picker__opt:hover, .picker__opt.is-focus { background: var(--mist); }
.picker__opt[aria-selected="true"] { font-weight: 500; }
.picker__opt[aria-selected="true"]::after {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 1.5px var(--ink); flex: none;
}

/* Chart */
.overlap__chart { margin-top: clamp(36px, 4.4vw, 56px); }
.overlap__axis {
  position: relative; height: 20px; margin-bottom: 10px;
  font-size: 12.5px; color: var(--slate); font-variant-numeric: tabular-nums;
}
.overlap__axis span { position: absolute; top: 0; transform: translateX(-50%); }
.overlap__axis span:first-child { transform: none; }
.overlap__axis span:last-child { transform: translateX(-100%); }
.overlap__track {
  position: relative; padding-block: 8px 10px;
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 24));
  background-size: calc(100% - 1px) 100%; background-repeat: no-repeat;
  border-right: 1px solid var(--line);
}
.overlap__row { position: relative; z-index: 1; padding-block: 8px; }
.overlap__label {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; padding-left: 2px;
}
.overlap__label time { color: var(--slate); font-variant-numeric: tabular-nums; }

.overlap__lane { position: relative; height: 40px; }
.seg {
  position: absolute; top: 0; bottom: 0; left: var(--l); width: var(--w);
  border-radius: 10px; background: var(--ink);
  transition: left .8s var(--ease), width .8s var(--ease), opacity .4s;
}
.overlap__lane--away .seg { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }
.overlap__lane .seg { clip-path: inset(0 100% 0 0 round 10px); transition: left .8s var(--ease), width .8s var(--ease), opacity .4s, clip-path 1.2s var(--ease); }
.overlap.is-drawn .seg { clip-path: inset(0 0 0 0 round 10px); }
.overlap__lane--away .seg { transition-delay: 0s, 0s, 0s, .12s; }

.overlap__band {
  position: absolute; top: 0; bottom: 0; z-index: 0;
  left: var(--l, 0); width: var(--w, 0);
  background: var(--sun); border-radius: 12px;
  transition: left .8s var(--ease), width .8s var(--ease), opacity .4s;
}
.overlap__band.is-empty { opacity: 0; }

.overlap__now {
  position: absolute; z-index: 2; top: -4px; bottom: -4px; width: 0; left: var(--x, 50%);
  border-left: 1.5px dashed var(--ink);
  transition: left .8s var(--ease);
  pointer-events: none;
}
.overlap__now::before {
  content: ""; position: absolute; top: -4px; left: -5.25px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); box-shadow: 0 0 0 3px var(--mist);
}
.overlap__now span {
  position: absolute; top: 100%; left: 0; transform: translate(-50%, 6px);
  font-size: 11.5px; font-weight: 500; line-height: 1; white-space: nowrap;
  padding: 6px 9px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-variant-numeric: tabular-nums;
}

.overlap__key { display: none; }
.key { flex: none; width: 14px; height: 14px; border-radius: 4px; }
.key--home { background: var(--ink); }
.key--away { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink); }

.overlap__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; flex-wrap: wrap;
  margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line-strong);
}
.overlap__live { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); }
.overlap__facts { display: flex; gap: 12px 36px; flex-wrap: wrap; }
.overlap__facts div { display: grid; gap: 2px; align-content: start; }
.overlap__facts dt { font-size: 13px; color: var(--slate); }
.overlap__facts dd { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.overlap__note { margin-top: 18px; font-size: 13.5px; color: var(--slate); }

/* ==========================================================================
   About
   ========================================================================== */
.about__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px clamp(40px, 7vw, 120px);
  align-items: start;
}
.about__body { display: grid; gap: 22px; padding-top: 10px; max-width: 58ch; }
.about__body p { font-size: clamp(17px, 1.3vw, 19px); color: var(--ink-soft); }
.about__body p:first-child { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.45; color: var(--ink); letter-spacing: -0.01em; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--ink);
}
.stat { padding: 22px 24px 0 0; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 6px; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat dd {
  font-family: var(--display); font-weight: 500; font-size: clamp(48px, 5.6vw, 88px);
  line-height: 1; letter-spacing: -0.045em; font-variant-numeric: tabular-nums;
}
.stat dt { font-size: 15px; color: var(--slate); }
.stat__unit { font-size: .42em; letter-spacing: -0.01em; color: var(--slate); margin-left: .12em; }

/* ==========================================================================
   Services — index list with a detail panel
   ========================================================================== */
.services { background: var(--mist); }
.services__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px clamp(40px, 7vw, 120px); align-items: flex-end; }
.services__intro { max-width: 44ch; font-size: 18px; color: var(--ink-soft); }

.svc {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  grid-template-rows: repeat(6, auto);
  column-gap: clamp(40px, 7vw, 120px);
  margin-top: clamp(56px, 7vw, 96px);
}
.svc__item { display: contents; }
.svc__btn {
  grid-column: 1; grid-row: var(--r);
  display: flex; align-items: baseline; gap: 24px; width: 100%; text-align: left;
  padding: 22px 0; border-top: 1px solid var(--line-strong);
  position: relative;
}
.svc__item:last-child .svc__btn { border-bottom: 1px solid var(--line-strong); }
.svc__btn::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1.5px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease);
}
.svc__item.is-active .svc__btn::after { transform: scaleX(1); }
.svc__kind { flex: 0 0 88px; font-size: 14px; color: var(--slate); }
.svc__name {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(26px, 2.9vw, 44px); line-height: 1.1; letter-spacing: -0.03em;
  color: var(--slate);
  transition: color .5s var(--ease), transform .7s var(--ease);
}
.svc__btn:hover .svc__name { color: var(--ink-soft); }
.svc__item.is-active .svc__name { color: var(--ink); transform: translateX(10px); }

.svc__panel {
  grid-column: 2; grid-row: 1 / span 6; align-self: start;
  position: sticky; top: 120px;
  visibility: hidden; opacity: 0;
  transition: opacity .5s var(--ease), visibility 0s .5s;
}
.svc__item.is-active .svc__panel { visibility: visible; opacity: 1; transition: opacity .6s var(--ease) .1s, visibility 0s; }
.svc__inner {
  background: var(--paper); border-radius: 24px;
  padding: clamp(28px, 3vw, 44px);
  min-height: 340px;
  display: flex; flex-direction: column;
}
.svc__inner h3 {
  font-family: var(--display); font-weight: 500; font-size: 30px; letter-spacing: -0.025em; line-height: 1.1;
}
.svc__inner p { margin-top: 18px; font-size: 18px; color: var(--ink-soft); max-width: 42ch; }
.svc__item .svc__inner > * { transform: translateY(12px); opacity: 0; transition: transform .8s var(--ease), opacity .6s var(--ease); }
.svc__item.is-active .svc__inner > * { transform: none; opacity: 1; }
.svc__item.is-active .svc__inner > :nth-child(2) { transition-delay: .06s; }
.svc__item.is-active .svc__inner > :nth-child(3) { transition-delay: .12s; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 32px; }
.tags li { font-size: 14px; padding: 7px 14px; border-radius: 999px; background: var(--mist); color: var(--ink-soft); }

/* ==========================================================================
   Process
   ========================================================================== */
.process__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px clamp(40px, 7vw, 120px); align-items: start; }
.process__head { position: sticky; top: 130px; }
.process__aside { margin-top: 28px; max-width: 34ch; font-size: 18px; color: var(--ink-soft); }

.steps { position: relative; counter-reset: step; }
.steps__rail {
  position: absolute; left: 107px; top: 12px; bottom: 12px; width: 1px; background: var(--line-strong);
}
.steps__fill {
  position: absolute; inset: 0; background: var(--ink);
  transform: scaleY(0); transform-origin: top;
}
.step { display: grid; grid-template-columns: 84px 1fr; gap: 47px; padding-bottom: clamp(44px, 5vw, 72px); position: relative; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 102px; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background-color .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease);
}
.step.is-on::before { background: var(--sun); box-shadow: inset 0 0 0 1.5px var(--ink); transform: scale(1.3); }
.step__when { font-size: 15px; color: var(--slate); padding-top: 2px; font-variant-numeric: tabular-nums; }
.step h3 {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -0.025em; line-height: 1.15;
}
.step__n { font-size: .6em; color: var(--slate); font-variant-numeric: tabular-nums; }
.step p:not(.step__when) { margin-top: 12px; max-width: 46ch; color: var(--ink-soft); transition: color .5s; }
.step:not(.is-on) h3 { color: var(--slate); transition: color .5s; }
.step.is-on h3 { color: var(--ink); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { background: var(--mist); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px clamp(40px, 6vw, 100px); align-items: start; }
.contact__info { position: sticky; top: 130px; }
.contact__lede { margin-top: 28px; max-width: 44ch; font-size: 18px; color: var(--ink-soft); }
.contact__facts { margin-top: 48px; border-top: 1px solid var(--line-strong); }
.contact__facts > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line-strong); align-items: center; }
.contact__facts dt { font-size: 14.5px; color: var(--slate); }
.contact__facts dd { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 17px; }
.contact__email { font-family: var(--display); font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; font-weight: 500; }
.contact__email, .contact__social a, .footer a:not(.brand) {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease);
}
.contact__email:hover, .contact__social a:hover, .footer a:not(.brand):hover { background-size: 100% 1px; }
.contact__social { gap: 22px !important; }
.btn.is-busy { pointer-events: none; opacity: .7; }
.copy {
  position: relative; height: 30px; padding: 0 12px; border-radius: 999px; overflow: hidden;
  font-size: 13px; color: var(--ink-soft); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-strong);
}
.copy span { display: block; transition: transform .5s var(--ease); }
.copy__b { position: absolute; inset: 0; display: grid !important; place-items: center; transform: translateY(100%); background: var(--sun); color: var(--ink); }
.copy.is-done .copy__a { transform: translateY(-100%); }
.copy.is-done .copy__b { transform: none; }

/* Form */
.form {
  background: var(--paper); border-radius: 28px;
  padding: clamp(24px, 3.4vw, 52px);
}
.form__head h3 { font-family: var(--display); font-weight: 500; font-size: 30px; letter-spacing: -0.025em; }
.form__head p { margin-top: 8px; color: var(--slate); font-size: 15.5px; }
.form__group { margin-top: 40px; display: grid; gap: 22px; }
.form__group legend {
  display: flex; align-items: center; gap: 12px; margin-bottom: 22px; width: 100%;
  font-weight: 500; font-size: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.form__step {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 12.5px; background: var(--ink); color: var(--paper); font-variant-numeric: tabular-nums;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
.field { display: grid; gap: 8px; }
.field__label { font-size: 14.5px; color: var(--ink-soft); }
.field__label i { font-style: normal; color: var(--slate); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 13px 16px; border-radius: 12px;
  background: var(--mist); border: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus { outline: none; background: var(--paper); border-color: var(--ink); box-shadow: 0 0 0 4px var(--sun-soft); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #c2412d; background: #fdf3f1; }

.chips-field { display: grid; gap: 10px; }
.chips-field.is-invalid .field__label { color: #b0321f; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px;
  font-size: 14.5px; color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.chip:hover span { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.chip input:active + span { transform: scale(.97); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }

.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file__drop {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer;
  border-radius: 14px; border: 1.5px dashed var(--line-strong);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.file__drop:hover, .file.is-drag .file__drop { border-color: var(--ink); background: var(--mist); }
.file input:focus-visible + .file__drop { outline: 2px solid var(--ink); outline-offset: 3px; }
.file__drop svg { width: 22px; height: 22px; flex: none; }
.file__text { display: flex; flex-direction: column; font-size: 15px; line-height: 1.4; }
.file__text strong { font-weight: 500; }
.file__hint { color: var(--slate); font-size: 14px; }
.file__chosen {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 14px; background: var(--mist); font-size: 15px;
}
.file__chosen[hidden] { display: none; }
.file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__remove { font-size: 14px; color: var(--slate); text-decoration: underline; text-underline-offset: 3px; }
.file__remove:hover { color: var(--ink); }

.form__foot { margin-top: 36px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.form__legal { font-size: 13px; line-height: 1.5; color: var(--slate); max-width: 46ch; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__status { margin-top: 18px; font-size: 15px; min-height: 1.5em; }
.form__status.is-error { color: #b0321f; }
.form__status a { text-decoration: underline; text-underline-offset: 3px; }
.form__status.is-ok { color: #16713d; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding-top: clamp(72px, 9vw, 120px); padding-bottom: 32px; }
.footer__top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer__brand p { margin-top: 18px; max-width: 36ch; color: var(--slate); font-size: 15.5px; }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 15.5px; }
.footer__col h4 { font-weight: 500; font-size: 14px; color: var(--slate); margin-bottom: 6px; }
.footer__col p { color: var(--ink-soft); }
.footer__live { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; }
.footer__live .status__dot { margin-top: 8px; }
.brand--footer .brand__logo { height: 44px; }
.footer__base { margin-top: clamp(56px, 7vw, 96px); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--slate); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__foot { grid-template-columns: 1fr; gap: 28px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .nav.is-open { background: var(--paper); box-shadow: 0 1px 0 var(--line); }

  .services__head { display: grid; }
  .about__grid, .process__grid, .contact__grid { grid-template-columns: 1fr; }
  .process__head, .contact__info { position: static; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }

  /* Services become an accordion */
  .svc { display: block; }
  .svc__item { display: block; }
  .svc__btn { gap: 16px; }
  .svc__kind { flex-basis: 72px; }
  .svc__item.is-active .svc__name { transform: none; }
  .svc__panel {
    position: static; visibility: visible; opacity: 1;
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .7s var(--ease);
  }
  .svc__panel > .svc__inner { overflow: hidden; min-height: 0; padding: 0; background: none; border-radius: 0; }
  .svc__item.is-active .svc__panel { grid-template-rows: 1fr; transition: grid-template-rows .7s var(--ease); }
  .svc__inner h3 { display: none; }
  .svc__inner p { margin-top: 0; }
  .svc__inner > :first-child + p { padding-top: 0; }
  .tags { padding-top: 18px; padding-bottom: 28px; }
  .tags li { background: var(--paper); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero__meta { flex-direction: column; gap: 10px; }
  .hero__actions .btn { flex: 1; }
  .overlap { border-radius: 22px; margin-inline: calc(var(--gutter) * -0.5); }
  .overlap__readout { gap: 12px; }
  .overlap__head { gap: 24px; }
  .picker { width: calc(100% + var(--pad) * 2); margin-inline: calc(var(--pad) * -1); --pad: clamp(22px, 3vw, 40px); }
  .picker__bar {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x proximity; scrollbar-width: none;
    background: none; padding: 0 var(--pad); scroll-padding-inline: var(--pad);
  }
  .picker__bar::-webkit-scrollbar { display: none; }
  .picker__bar::after { content: ""; flex: 0 0 1px; }
  .picker__pill { top: 0; }
  .city { flex: none; scroll-snap-align: start; background: var(--paper); height: 40px; }
  .city[aria-pressed="true"] { background: transparent; }
  .picker__pill { height: 40px; }
  .picker__menu { left: var(--pad); right: var(--pad); min-width: 0; }

  .overlap__key { display: grid; gap: 10px; margin-top: 28px; font-size: 14px; color: var(--ink-soft); }
  .overlap__key li { display: flex; align-items: center; gap: 10px; }
  .overlap__key time { margin-left: auto; color: var(--slate); font-variant-numeric: tabular-nums; }
  .overlap__chart { margin-top: 24px; }
  .overlap__label { display: none; }
  .overlap__row { padding-block: 6px; }
  .overlap__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
  .overlap__facts dd { font-size: 14.5px; line-height: 1.35; }
  .overlap__live { font-size: 14.5px; align-items: flex-start; }
  .overlap__live .status__dot { margin-top: 7px; }
  .overlap__lane { height: 34px; }
  .seg, .overlap__band { border-radius: 8px; }
  .overlap__foot { margin-top: 44px; }
  .overlap__axis span:nth-child(even) { display: none; }
  .overlap__label { font-size: 13px; padding-left: 6px; flex-wrap: wrap; column-gap: 8px; row-gap: 0; }
  .form__row { grid-template-columns: 1fr; }
  .form__foot { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  .steps__rail { left: 5px; }
  .step { grid-template-columns: 1fr; gap: 6px; padding-left: 36px; }
  .step::before { left: 0; top: 6px; }
  .contact__facts > div { grid-template-columns: 1fr; gap: 6px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
  .footer__col:last-child { grid-column: 1 / -1; }
  .footer__base { flex-direction: row; flex-wrap: wrap; }
  .svc__name { font-size: 24px; }
  .svc__btn { padding: 18px 0; }
  .step h3 { font-size: 22px; }
  .hero { padding-top: 112px; }
  .hero__title { font-size: min(48px, 12.6vw); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .rise, .load { transform: none !important; opacity: 1 !important; }
}
