/*
 * woolpert.cloud landing page.
 *
 * Palette: Woolpert's brand black, blue, violet, cyan and deep indigo (the
 * same set the demo catalog uses), on a pale map-grey ground. The orange is
 * the accent from the WMT app itself and marks live vehicles only.
 *
 * Type: Overpass, an open descendant of the US highway sign alphabet, for
 * everything. Self-hosted from assets/fonts.
 */

@font-face {
  font-family: "Overpass";
  src: url("../fonts/overpass-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --land: #E9EDF4;
  --paper: #FFFFFF;
  --ink: #231F20;
  --ink-2: #575263;
  --line: #D9DEE8;
  --blue: #0D69FA;
  --blue-deep: #0A4FC4;
  --violet: #4802C9;
  --cyan: #14D3F2;
  --night: #0E0028;
  --signal: #FF6E40;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --edge: max(var(--gutter), calc((100vw - 77.5rem) / 2 + var(--gutter)));
  --header: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Overpass", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; }
img, svg { max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1rem 0.6rem;
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

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

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 0;
  border-radius: 10px;
  padding: 0.95rem 1.4rem 0.8rem;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn .icon { width: 1.05rem; height: 1.05rem; margin-top: -0.15rem; }

.btn-small { padding: 0.65rem 1rem 0.5rem; font-size: 0.9375rem; border-radius: 8px; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); }

.btn-outline { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--blue-deep); }

.btn-plain { background: var(--land); color: var(--ink); }
.btn-plain:hover { background: var(--line); }

.btn-light { background: #fff; color: var(--night); }
.btn-light:hover { background: var(--cyan); }

/* ------------------------------------------------------------- header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  height: var(--header);
  padding-inline: var(--edge);
  background: rgba(233, 237, 244, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(35, 31, 32, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { display: block; border-radius: 8px; }
.brand span { padding-top: 0.2rem; }

.site-nav { display: none; gap: 1.9rem; }
.site-nav a {
  font-size: 0.9688rem;
  font-weight: 600;
  text-decoration: none;
  padding-top: 0.2rem;
}
.site-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

.site-actions { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.site-signin { display: none; font-size: 0.9688rem; font-weight: 600; text-decoration: none; padding-top: 0.2rem; }
.site-signin:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

@media (min-width: 30rem) { .site-signin { display: block; } }
@media (min-width: 62rem) { .site-nav { display: flex; } }

/* --------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  background: var(--land);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding: clamp(2.75rem, 8vw, 4.5rem) var(--gutter) 2.25rem;
}

.hero h1 {
  font-size: clamp(2.7rem, 5.5vw, 4.9rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lede {
  margin-top: 1.5rem;
  max-width: 31rem;
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  color: var(--ink-2);
}

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.hero-map {
  display: block;
  width: 100%;
  height: 26rem;
  touch-action: manipulation;
}

.dispatch {
  position: relative;
  z-index: 1;
  max-width: 24rem;
  margin: -3.5rem var(--gutter) 2.5rem;
  padding: 1.15rem 1.15rem 1rem;
  background: var(--paper);
  border-radius: 18px;
  box-shadow: 0 30px 60px -24px rgba(14, 0, 40, 0.35), 0 0 0 1px rgba(14, 0, 40, 0.05);
  font-variant-numeric: tabular-nums;
}

/* The panel only reports on the live map, so it stays away without scripts. */
html:not(.js) .dispatch { display: none; }

.dispatch-title { font-size: 1.0625rem; font-weight: 800; }
.dispatch-status { font-size: 0.875rem; color: var(--ink-2); min-height: 1.4em; }

.dispatch-routes { list-style: none; display: grid; gap: 0.8rem; margin: 0.9rem 0 1.1rem; }
.dispatch-route {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.3rem 0.75rem;
  padding-left: 0.8rem;
  border-left: 4px solid var(--c);
  font-size: 0.9375rem;
  line-height: 1.3;
}
.dispatch-name { font-weight: 700; }
.dispatch-detail { font-size: 0.8438rem; color: var(--ink-2); }
.dispatch-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--land); overflow: hidden; }
.dispatch-bar i { display: block; height: 100%; width: 0; background: var(--c); transition: width 0.5s linear; }

.dispatch-actions { display: flex; gap: 0.5rem; }
.dispatch-actions .btn { flex: 1; }
.dispatch-hint { margin-top: 0.75rem; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }

@media (min-width: 62rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 35rem) minmax(0, 1fr);
    align-items: center;
    min-height: clamp(38rem, calc(100svh - var(--header)), 49rem);
    padding-inline: var(--edge);
  }
  .hero-copy { padding: 4rem 0; }
  .hero-map {
    position: absolute;
    inset: 0;
    height: 100%;
    /* Streets fade out under the copy. site.js sets the stops from the copy's
       real right edge; the percentages are the no-script fallback. */
    -webkit-mask-image: linear-gradient(90deg, transparent var(--fade-from, 22%), #000 var(--fade-to, 46%));
    mask-image: linear-gradient(90deg, transparent var(--fade-from, 22%), #000 var(--fade-to, 46%));
  }
  .dispatch {
    align-self: start;
    justify-self: end;
    width: 19.5rem;
    margin: 2.5rem 0 0;
  }
}

/* ------------------------------------------------------ the route map --- */

.rm-streets line { stroke: #fff; }
.rm-park { fill: #D8EADF; }
.rm-water { fill: #D3E2F7; }

.rm-route,
.rm-route-done {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rm-route { stroke: var(--c); }
/* The stretch a vehicle has already driven shows through in a tint. */
.rm-route-done { stroke: color-mix(in srgb, var(--c) 30%, #fff); }

.rm-stop circle { fill: #fff; stroke: #9AA3B5; transition: fill 0.3s ease, stroke 0.3s ease; }
.rm-stop text { fill: transparent; font-weight: 700; text-anchor: middle; transition: fill 0.3s ease; }
.rm-stop.is-routed circle { stroke: var(--c); }
.rm-stop.is-routed text { fill: var(--c); }
.rm-stop.is-done circle { fill: var(--c); }
.rm-stop.is-done text { fill: #fff; }

.rm-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: rm-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes rm-pop {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.rm-static .rm-pop { animation: none; }

.rm-depot rect { fill: var(--ink); }
.rm-depot path { fill: #fff; }

.rm-vehicle { filter: drop-shadow(0 2px 3px rgba(14, 0, 40, 0.3)); }
.rm-vehicle circle { fill: var(--signal); stroke: #fff; stroke-width: 3; }
.rm-vehicle path { fill: #fff; }

.rm-ghost { pointer-events: none; }
.rm-ghost circle { fill: rgba(255, 255, 255, 0.9); stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 3; }
.rm-ghost path { stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }

/* -------------------------------------------------------------- bands --- */

.band { padding-block: clamp(4.5rem, 9vw, 8rem); }
.band-land { background: var(--land); }
.band-night { background: var(--night); color: #fff; }

.band-title {
  max-width: 21ch;
  font-size: clamp(2rem, 3.7vw, 3.15rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* Two sentences that each keep to their own line. */
.band-title-pair { max-width: none; text-wrap: wrap; }
.band-title-pair span { display: block; text-wrap: balance; }

.band-lede {
  margin-top: 1.1rem;
  max-width: 36rem;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.band-night .band-lede { color: rgba(255, 255, 255, 0.76); }

.band-intro-split { display: grid; gap: 1.75rem; justify-items: start; }
@media (min-width: 56rem) {
  .band-intro-split { grid-template-columns: 1fr auto; align-items: end; }
}

/* --------------------------------------------------------------- apps --- */

.apps {
  display: grid;
  gap: 3.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.app-figure {
  position: relative;
  height: 30rem;
  border-radius: 24px;
  background: var(--land);
  overflow: hidden;
}

/* Each app is four rows: figure, heading, button, facts. On wide screens the
   two apps share those rows through subgrid, so headings, buttons and fact
   lists line up across the columns whatever the copy length. */
.app { display: grid; justify-items: start; }
.app-figure { justify-self: stretch; }

.app-head { margin-top: 1.9rem; }
.app-head h3 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
.app-summary { margin-top: 0.5rem; max-width: 30rem; font-size: 1.125rem; line-height: 1.5; }
.app-cta { margin-top: 1.5rem; }

.facts { justify-self: stretch; list-style: none; margin-top: 2rem; border-top: 1px solid var(--line); }
.facts li { padding: 0.95rem 0 0.85rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.facts strong { color: var(--ink); font-weight: 700; }

@media (min-width: 62rem) {
  .apps { grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); row-gap: 0; }
  .app { grid-row: span 4; grid-template-rows: subgrid; }
}
@media (min-width: 72rem) {
  /* The console column is wide enough to set its three facts side by side. */
  .app-console .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.75rem; border-top: 0; }
  .app-console .facts li { border-bottom: 0; border-top: 1px solid var(--line); }
}

/* Dispatch Console illustration */

.browser {
  position: absolute;
  inset: 2.25rem 2.25rem 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 14px 14px 0 0;
  box-shadow: 0 24px 60px -20px rgba(14, 0, 40, 0.3), 0 0 0 1px rgba(14, 0, 40, 0.06);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: none;
  height: 2.6rem;
  padding-inline: 1rem;
  border-bottom: 1px solid var(--line);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 9px; height: 9px; border-radius: 50%; background: #D5DAE4; }
.browser-url {
  padding: 0.3rem 0.9rem 0.15rem;
  border-radius: 999px;
  background: var(--land);
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--ink-2);
}

.console { flex: 1; display: grid; grid-template-columns: 1fr; min-height: 0; }
.console-side { display: none; padding: 1.1rem 1rem; border-right: 1px solid var(--line); }
.console-heading { margin-bottom: 0.7rem; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
.console-routes { list-style: none; display: grid; gap: 0.75rem; margin-bottom: 1.5rem; font-variant-numeric: tabular-nums; }
.console-map { display: block; width: 100%; height: 100%; min-height: 0; background: var(--land); }
.console-map .rm-vehicle circle { stroke-width: 2; }

.skeleton { display: grid; gap: 0.6rem; }
.skeleton span { display: block; height: 0.55rem; border-radius: 999px; background: var(--land); }

@media (min-width: 40rem) {
  .console { grid-template-columns: 13rem 1fr; }
  .console-side { display: block; }
}

.qr {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem 0.8rem 0.8rem;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(14, 0, 40, 0.4), 0 0 0 1px rgba(14, 0, 40, 0.05);
}
.qr svg { display: block; width: 4.5rem; height: 4.5rem; fill: var(--ink); }
.qr p { font-size: 0.8125rem; line-height: 1.35; color: var(--ink-2); }
.qr strong { display: block; font-size: 0.9375rem; color: var(--ink); }

@media (min-width: 62rem) { .qr { right: 3.5rem; bottom: 1.75rem; } }

/* Driver app illustration */

.phone {
  position: absolute;
  top: 1.75rem;
  left: 50%;
  width: 13.25rem;
  height: 26.5rem;
  margin-left: -6.625rem;
  padding: 0.5rem;
  background: var(--ink);
  border-radius: 2.1rem;
  box-shadow: 0 30px 60px -22px rgba(14, 0, 40, 0.5);
}
.phone-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--paper);
  border-radius: 1.65rem;
  overflow: hidden;
}

.maneuver {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: none;
  padding: 1.35rem 0.9rem 0.75rem;
  background: var(--night);
  color: #fff;
}
.maneuver svg { flex: none; width: 2.1rem; height: 2.1rem; }
.maneuver-distance { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.maneuver-street { font-size: 0.875rem; line-height: 1.2; opacity: 0.8; }

.phone-map { display: block; flex: 1; width: 100%; min-height: 0; }

.stop-card {
  position: relative;
  flex: none;
  margin-top: -1rem;
  padding: 0.9rem 0.9rem 0.95rem;
  background: var(--paper);
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 20px rgba(14, 0, 40, 0.1);
  line-height: 1.3;
}
.stop-count { font-size: 0.75rem; font-weight: 600; color: var(--ink-2); }
.stop-address { font-size: 1.0625rem; font-weight: 800; }
.stop-eta { font-size: 0.8125rem; color: var(--ink-2); }
.stop-button {
  display: block;
  margin-top: 0.7rem;
  padding: 0.6rem 0 0.45rem;
  border-radius: 0.6rem;
  background: var(--blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
}

/* -------------------------------------------------------------- steps --- */

/* Five steps drawn as one route: it leaves the depot (square marker) and ends
   at the destination (filled marker). */
.steps { list-style: none; margin-top: clamp(2.5rem, 5vw, 4rem); }

.step { position: relative; padding: 0 0 2.5rem 4.25rem; }
.step:last-child { padding-bottom: 0; }

.step-marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding-top: 0.2rem;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
  color: var(--blue);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
}
.step:first-child .step-marker { border-color: var(--ink); border-radius: 10px; background: var(--ink); color: #fff; }
.step:last-child .step-marker { background: var(--blue); color: #fff; }

.step::before {
  content: "";
  position: absolute;
  top: 2.75rem;
  bottom: 0;
  left: calc(1.375rem - 2.5px);
  width: 5px;
  background: var(--blue);
}
.step:last-child::before { display: none; }

.step h3 { padding-top: 0.55rem; font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.step p { margin-top: 0.5rem; max-width: 30rem; color: var(--ink-2); }
.step-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-weight: 700;
  color: var(--blue-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.step-link:hover { color: var(--ink); }

@media (min-width: 62rem) {
  .steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 2rem; }
  .step { padding: 4rem 0 0; }
  .step::before {
    top: calc(1.375rem - 2.5px);
    bottom: auto;
    left: 2.75rem;
    right: -2rem;
    width: auto;
    height: 5px;
  }
  .step h3 { padding-top: 0; }
}

/* ----------------------------------------------------------- own data --- */

.own-data { display: grid; gap: 3rem; }
.own-data .btn { margin-top: 2rem; }

.compare { width: 100%; border-collapse: collapse; text-align: left; line-height: 1.35; }
.compare th,
.compare td {
  padding: 1rem 1rem 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  vertical-align: top;
}
.compare thead th { font-size: 1.125rem; font-weight: 800; }
.compare thead th:last-child { color: var(--cyan); }
.compare tbody th { width: 28%; font-weight: 600; color: rgba(255, 255, 255, 0.6); }
.compare tbody td { color: rgba(255, 255, 255, 0.9); }
.compare td:last-child, .compare th:last-child { padding-right: 0; }

.band-night :focus-visible { outline-color: var(--cyan); }

@media (min-width: 62rem) {
  .own-data { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 5rem; align-items: center; }
}

/* -------------------------------------------------------------- demos --- */

.demos { list-style: none; display: grid; gap: 2.5rem 2rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
@media (min-width: 48rem) { .demos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.demo { display: block; text-decoration: none; }
.demo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  border-radius: 14px;
  box-shadow: 0 0 0 1px var(--line);
}
.demo h3 { margin-top: 1.1rem; font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.demo p { margin-top: 0.4rem; color: var(--ink-2); }
.demo:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

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

.site-footer { padding-block: 4rem 2rem; background: var(--ink); color: rgba(255, 255, 255, 0.7); font-size: 0.9688rem; }
.site-footer :focus-visible { outline-color: var(--cyan); }

.footer-grid { display: grid; gap: 3rem; }
.footer-brand img { display: block; width: 9.5rem; height: auto; }
.footer-brand p { margin-top: 1.4rem; max-width: 24rem; }

.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 2rem; }
.footer-links a { display: block; width: fit-content; padding-block: 0.3rem; color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-heading { margin-bottom: 0.5rem; font-weight: 700; color: rgba(255, 255, 255, 0.55); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.875rem;
}

@media (min-width: 56rem) {
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}

/* ---------------------------------------------------------------- 404 --- */

.lost { min-height: 100vh; background: var(--land); }
.lost-main { padding: clamp(4rem, 14vh, 9rem) var(--edge) 4rem; }
.lost-main h1 {
  max-width: 14ch;
  font-size: clamp(2.7rem, 5.5vw, 4.9rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.028em;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rm-pop { animation: none; }
  .btn, .dispatch-bar i, .rm-stop circle, .rm-stop text { transition: none; }
}
