:root {
  --paper: #f3f0e8;
  --paper-hi: #fbfaf6;
  --ink: #111111;
  --ink-2: #4a4843;
  --rule: rgba(17, 17, 17, 0.14);
  --brand: #03a2f3;
  --driver: #f5b800;
  --point: #1f9d4a;
  --parcel: #fb8c00;
  --amber: #f59e0b;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }

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

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--ink);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 900;
  font-size: 23px;
  letter-spacing: -0.05em;
}

.brand img { width: 21px; height: auto; }

.nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.25s ease;
}

.nav a:hover { background-size: 100% 1.5px; }

.topbar__geo { color: var(--ink-2); }
.topbar__geo span { color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.kicker {
  display: inline-block;
  margin-bottom: 28px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
}

.hero__title {
  font-size: clamp(46px, 6.6vw, 100px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero__title > span:first-child {
  display: block;
  position: relative;
  z-index: 1;
}

.hl {
  display: inline;
  background: var(--brand);
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero__lede {
  max-width: 34ch;
  margin-top: 32px;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.45;
  color: var(--ink-2);
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid var(--ink);
}

.hero__facts div {
  padding: 12px 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid var(--rule);
}

.hero__facts div:last-child { border-right: 0; margin-right: 0; }
.hero__facts dt { color: var(--ink-2); font-size: 11px; }
.hero__facts dd { margin-top: 4px; color: var(--ink); }

/* Ticket */
.ticket {
  position: relative;
  background: var(--paper-hi);
  border: 1px solid var(--ink);
  border-radius: 4px;
  box-shadow: 6px 6px 0 var(--ink);
}

.ticket__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink);
}

.ticket__type {
  padding: 3px 8px;
  background: var(--brand);
  border: 1px solid var(--ink);
}

.ticket__map {
  position: relative;
  color: var(--ink);
}

.ticket__map svg { display: block; width: 100%; height: auto; }

.map__streets path { stroke: var(--ink); stroke-opacity: 0.1; stroke-width: 1; fill: none; }
.map__avenue { stroke: var(--ink); stroke-opacity: 0.22; stroke-width: 5; fill: none; }
.map__park { color: rgba(31, 157, 74, 0.45); }
.map__labels text { font-size: 9.5px; letter-spacing: 0.08em; fill: var(--ink); }

.route {
  fill: none;
  stroke: var(--brand);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stop circle,
.stop rect { stroke: var(--ink); stroke-width: 2; }
.stop--pickup circle { fill: var(--brand); }
.stop--parcel rect { fill: var(--parcel); }
.stop--drop circle { fill: var(--paper-hi); }
.stop--drop .stop__core { fill: var(--ink); stroke: none; }

#parcelStop rect,
.label--parcel {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.ticket.is-animated:not(.has-parcel) #parcelStop rect { transform: scale(0); }
.ticket.is-animated:not(.has-parcel) .label--parcel { opacity: 0; }

.car { opacity: 0; transition: opacity 0.3s ease; }
.ticket.is-driving .car { opacity: 1; }
.car__body { fill: var(--ink); stroke: var(--paper-hi); stroke-width: 2.5; }
.car__halo {
  fill: var(--brand);
  opacity: 0.25;
  transform-box: fill-box;
  transform-origin: center;
  animation: halo 1.6s ease-in-out infinite;
}

@keyframes halo {
  50% { transform: scale(1.35); opacity: 0.1; }
}

.toast {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: var(--ink);
  color: var(--paper-hi);
  font-size: 11px;
  border-radius: 3px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.is-on { opacity: 1; transform: none; }

.toast__dot {
  width: 8px;
  height: 8px;
  background: var(--parcel);
  flex: none;
}

.ticket__perf {
  position: relative;
  border-top: 1.5px dashed var(--ink);
}

.ticket__perf::before,
.ticket__perf::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 20px;
  height: 20px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.ticket__perf::before { left: -11px; clip-path: inset(0 0 0 50%); }
.ticket__perf::after { right: -11px; clip-path: inset(0 50% 0 0); }

.stops { padding: 6px 16px 10px; }

.stops__item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  grid-template-areas:
    "n what state"
    "n where state";
  column-gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.4s ease, max-height 0.5s ease, padding 0.5s ease;
  max-height: 80px;
  overflow: hidden;
}

.stops__item:last-child { border-bottom: 0; }
.stops__n { grid-area: n; color: var(--ink-2); }
.stops__what { grid-area: what; color: var(--ink); font-weight: 500; }
.stops__where { grid-area: where; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-size: 12.5px; }
.stops__state { grid-area: state; align-self: center; font-size: 11px; }

.stops__item--parcel .stops__what::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  background: var(--parcel);
  vertical-align: 1px;
}

.ticket.is-animated:not(.has-parcel) .stops__item--parcel {
  opacity: 0;
  max-height: 0;
  padding-block: 0;
  border-bottom-width: 0;
}

.stops__item.is-now .stops__state::after {
  content: "En camino";
  padding: 2px 6px;
  background: var(--brand);
}

.stops__item.is-done { opacity: 0.45; }
.stops__item.is-done .stops__state::after { content: "Listo"; }

/* Ticker */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 50s linear infinite;
}

.ticker span {
  padding: 12px 0;
  white-space: nowrap;
}

.ticker span::after {
  content: "→";
  margin-inline: 22px;
  color: var(--brand);
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* Sections */
.section { padding-block: clamp(72px, 10vw, 140px); }

.section__head {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 3fr);
  gap: 24px;
  align-items: baseline;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section__head h2 {
  font-size: clamp(36px, 5.2vw, 76px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section__n { color: var(--ink-2); }

h3 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Fares */
.fares {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ink);
}

.fare {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(24px, 3vw, 40px);
}

.fare + .fare { border-left: 1px dashed var(--ink); }

.fare p { color: var(--ink-2); max-width: 42ch; }

.fare__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.fare__tag { color: var(--ink-2); }

.badge {
  padding: 5px 10px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.badge--brand { background: var(--brand); }
.badge--amber { background: var(--amber); }

.specs {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}

.specs div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dotted var(--rule);
}

.specs dt { color: var(--ink-2); }

/* Send */
.send {
  background: var(--brand);
  border-block: 1px solid var(--ink);
  padding-block: clamp(72px, 10vw, 140px);
}

.send .section__head,
.send .section__n { color: var(--ink); }

.send__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.send__ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--ink);
}

.way {
  padding: 20px 28px 0 0;
}

.way + .way { padding-left: 28px; border-left: 1px solid var(--ink); }

.way__n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 13px;
}

.way p:last-child { margin-top: 12px; max-width: 32ch; }

.label {
  background: var(--paper-hi);
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 18px;
  rotate: -1.5deg;
  box-shadow: 6px 6px 0 var(--ink);
}

.label__row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.label__row span:last-child { font-weight: 500; }

.label__code {
  height: 54px;
  margin: 14px 0 16px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px, var(--ink) 5px 6px, transparent 6px 9px, var(--ink) 9px 12px, transparent 12px 14px),
    var(--paper-hi);
  background-size: 37px 100%;
}

.label__steps li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
}

.label__steps span {
  width: 10px;
  height: 10px;
  flex: none;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.label__steps .is-done { color: var(--ink-2); }
.label__steps .is-done span { background: var(--ink); }
.label__steps .is-now span { background: var(--parcel); border-radius: 0; }

/* Points */
.point {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
  column-gap: 24px;
  align-items: start;
}

.point__copy {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-right: clamp(0px, 3vw, 40px);
}

.occupancy { grid-column: 3; }

.point__copy p { color: var(--ink-2); max-width: 44ch; }

.point__copy .point__lead {
  color: var(--ink);
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.point__copy .specs { margin-top: 10px; }
.point__copy .specs dd { text-align: right; }

.point__note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.point__note span {
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--point);
  border: 1px solid var(--ink);
}

.occupancy {
  background: var(--paper-hi);
  border: 1px solid var(--ink);
  border-radius: 4px;
  box-shadow: 6px 6px 0 var(--ink);
}

.occupancy__head {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink);
}

.occupancy__chart {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  height: 260px;
  padding: 20px 16px 34px;
  background:
    repeating-linear-gradient(0deg, var(--rule) 0 1px, transparent 1px 25%) 0 20px / 100% calc(100% - 54px) no-repeat;
}

.bar {
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  border: 1px dashed rgba(17, 17, 17, 0.35);
}

.bar i {
  display: block;
  transform-origin: bottom;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.bar__own { height: var(--own); background: var(--ink); }
.bar__extra { height: var(--extra); background: var(--parcel); border-bottom: 1px solid var(--ink); transition-delay: 0.35s !important; }

html:not(.no-js) .occupancy:not(.is-in) .bar i { transform: scaleY(0); }

.bar span {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--ink-2);
}

.occupancy__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 12px 16px;
  list-style: none;
  border-top: 1px solid var(--ink);
  font-size: 11px;
}

.occupancy__legend li { display: flex; align-items: center; gap: 8px; }

.sw { width: 10px; height: 10px; border: 1px solid var(--ink); }
.sw--own { background: var(--ink); }
.sw--extra { background: var(--parcel); }
.sw--free { border-style: dashed; }

/* Apps */
.tricolor {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 14px;
  border: 1px solid var(--ink);
}

.tricolor span:nth-child(1) { background: var(--brand); }
.tricolor span:nth-child(2) { background: var(--driver); border-inline: 1px solid var(--ink); }
.tricolor span:nth-child(3) { background: var(--point); }

.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app {
  padding: 32px 32px 0 0;
  scroll-margin-top: 90px;
}

.app + .app { padding-left: 32px; border-left: 1px solid var(--rule); }

.app__swatch {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--ink);
}

.app__swatch--rider { background: var(--brand); }
.app__swatch--driver { background: var(--driver); }
.app__swatch--point { background: var(--point); }

.app p { margin-top: 12px; color: var(--ink-2); max-width: 34ch; }

/* How it works */
.route-list {
  position: relative;
  margin-left: calc(25% + 6px);
}

.route-list li {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 44px;
}

.route-list li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: 0;
  border-left: 2px dashed var(--ink);
}

.route-list li:last-child { padding-bottom: 0; }

.route-list__n {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.route-list li:last-child .route-list__n { background: var(--ink); color: var(--paper); }

.route-list h3 { padding-top: 6px; }
.route-list p { margin-top: 8px; color: var(--ink-2); max-width: 46ch; }

/* Footer */
.footer {
  overflow: hidden;
  border-top: 1px solid var(--ink);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 22px;
  color: var(--ink-2);
}

.footer__word {
  font-size: clamp(120px, 33vw, 520px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.74;
  margin: 0.22em 0 -0.12em;
  padding-left: calc(var(--gutter) - 0.04em);
  user-select: none;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-in { opacity: 1; transform: none; }

.no-js .reveal { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .ticket { max-width: 560px; }
  .send__grid,
  .point { grid-template-columns: 1fr; row-gap: 48px; }
  .point__copy,
  .occupancy { grid-column: 1; }
  .point__copy { padding-right: 0; }
  .occupancy { max-width: 560px; }
  .label { max-width: 420px; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .section__head { grid-template-columns: 1fr; gap: 10px; }
  .fares { grid-template-columns: 1fr; }
  .fare + .fare { border-left: 0; border-top: 1px dashed var(--ink); }
  .apps { grid-template-columns: 1fr; }
  .app, .app + .app { padding: 28px 0; border-left: 0; }
  .app + .app { border-top: 1px solid var(--rule); }
  .route-list { margin-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__facts { display: none; }
  .map__labels text { font-size: 12px; }
  .toast__more { display: none; }
  .occupancy__chart { gap: 4px; height: 220px; }
  .bar span { font-size: 9px; }
  .send__ways { grid-template-columns: 1fr; }
  .way, .way + .way { padding: 20px 0 24px; border-left: 0; }
  .way + .way { border-top: 1px solid var(--ink); }
  .ticket { box-shadow: 4px 4px 0 var(--ink); }
  .route-list li { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track,
  .car__halo { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
