/* NAVU — navumap.com
   Tokens come straight from the app's src/theme.js so the site and the app
   stay in step. Change them here and in theme.js together. */

:root {
  --night: #142447;
  --night-deep: #0d1830;
  --mint: #9cd4be;
  --sign-green: #0b7a47;
  --avenue-blue: #0039a6;
  --avenue-blue-lift: #6ea8ff;
  --transit-grey: #8a94a6;
  --orange: #e8710a;
  --fog: #eef1f6;
  --track: #e2e7ef;
  --hairline: #dde2ea;
  --muted: #5b6781;
  --paper: #ffffff;

  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --spine: 3rem;
  --radius: 1.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--night);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

h1,
h2,
h3,
.brand,
.foot-brand,
.counts b,
.card-head strong,
.route b,
.stop .when,
.limit-list b {
  font-family: "Space Grotesk", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 700;
  line-height: 1.02;
}

h2 {
  font-size: clamp(1.85rem, 3.8vw, 2.7rem);
  font-weight: 700;
  line-height: 1.1;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

a {
  color: var(--avenue-blue);
  text-underline-offset: 0.18em;
}

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

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lede {
  font-size: 1.1875rem;
  color: var(--muted);
}

/* Manhattan's grid, at the ~29 degrees off north it actually sits at, with two
   routes splitting and rejoining across it. The product, drawn as texture. */
.gridded {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.gridded::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: url("img/grid.svg") no-repeat center right / cover;
  opacity: 1;
  mask-image: linear-gradient(100deg, transparent 18%, #000 62%);
  -webkit-mask-image: linear-gradient(100deg, transparent 18%, #000 62%);
  pointer-events: none;
}

@media (max-width: 54rem) {
  .gridded::before {
    background-position: 72% center;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 62%);
  }
}

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

.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(13, 24, 48, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.masthead > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--paper);
  text-decoration: none;
}

.brand img {
  width: 1.45rem;
}

.masthead nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.masthead nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.masthead nav a:hover {
  color: var(--mint);
}

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

.hero {
  background: var(--night);
  color: var(--paper);
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(4rem, 9vw, 7rem);
}

.hero h1 {
  color: var(--paper);
  margin-bottom: 1.75rem;
}

.hero h1 .turn {
  color: var(--mint);
}

.hero-grid {
  display: grid;
  gap: clamp(2.75rem, 6vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
  }
}

.hero .lede {
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
}

.counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1.25rem 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.counts b {
  display: block;
  font-size: clamp(1.75rem, 3.4vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}

.counts span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------------------------------------------------------------- route card
   The app's own route card. The explanation is the thing nobody else does,
   so it leads the page rather than sitting in a feature list. */

.card {
  background: var(--paper);
  color: var(--night);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.08),
    0 40px 80px -36px rgba(0, 0, 0, 0.75);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--hairline);
}

.card-head strong {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-head span {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.route {
  display: grid;
  grid-template-columns: 0.5rem 1fr auto;
  align-items: center;
  gap: 0.95rem;
  padding-block: 0.8rem;
}

.route + .route {
  border-top: 1px solid var(--hairline);
}

.route i {
  display: block;
  height: 2.5rem;
  border-radius: 1rem;
  background: var(--transit-grey);
}

.route.pick i {
  background: var(--sign-green);
}

.route.warm i {
  background: var(--orange);
}

.route b {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.route small {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.35;
}

.route em {
  font-style: normal;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0.25rem 0.6rem;
  border-radius: 0.6rem;
  background: var(--fog);
  color: var(--muted);
}

.route.pick em {
  background: #e4f4ec;
  color: var(--sign-green);
}

.why {
  margin-top: 1.1rem;
  padding: 1.1rem 1.15rem;
  background: var(--fog);
  border-radius: 1.1rem;
  border-left: 3px solid var(--sign-green);
}

.why p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: none;
}

.why p + p {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.8375rem;
}

/* ---------------------------------------------------------------- the line
   One trip, three moments. The spine is the app's transit diagram, so the
   sections read as stops on a line rather than a stack of cards. */

.line {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

@media (max-width: 30rem) {
  :root {
    --spine: 2.25rem;
  }
}

.line-intro {
  margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
}

.line-intro h2 {
  margin-bottom: 0.9rem;
}

.limits h2 {
  margin-bottom: 0.9rem;
}

.stops {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stop {
  position: relative;
  padding-left: var(--spine);
  padding-bottom: clamp(2.75rem, 6vw, 4.25rem);
}

.stop:last-child {
  padding-bottom: 0;
}

/* the line between stations, in that stop's own colour */
.stop::before {
  content: "";
  position: absolute;
  left: 0.56rem;
  top: 0.75rem;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.25;
}

.stop:last-child::before {
  display: none;
}

/* the station marker */
.stop::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--paper);
  border: 4px solid currentColor;
}

.stop:nth-child(1) {
  color: var(--avenue-blue);
}

.stop:nth-child(2) {
  color: var(--sign-green);
}

.stop:nth-child(3) {
  color: var(--night);
}

.stop h3,
.stop p,
.stop .panel {
  color: var(--night);
}

.stop .when {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.stop:nth-child(3) .when {
  color: var(--muted);
}

.stop h3 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.stop-body {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 54rem) {
  .stop-body {
    grid-template-columns: 1fr 1fr;
  }
}

.reasons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.reasons li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.975rem;
  color: var(--night);
}

.reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}

/* an illustrative panel, drawn the way the app draws it */
.panel {
  background: var(--fog);
  border-radius: 1.3rem;
  padding: 1.3rem;
  border: 1px solid var(--hairline);
}

.panel h4 {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
}

.spots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.spots li {
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  gap: 0.8rem;
  align-items: start;
  background: var(--paper);
  border-radius: 0.85rem;
  padding: 0.8rem 0.9rem;
}

.spots b {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--night);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.stop:nth-child(1) .spots li:first-child b {
  background: var(--avenue-blue);
}

.spots span {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.spots small {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

/* ---------------------------------------------------------------- demo */

.demo {
  background: var(--night-deep);
  color: var(--paper);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.demo h2 {
  color: var(--paper);
  margin-bottom: 0.9rem;
}

.demo p {
  color: rgba(255, 255, 255, 0.7);
}

.demo-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 54rem) {
  .demo-grid {
    grid-template-columns: auto 1fr;
  }
}

/* The recording is a phone screen, so it gets a phone. This also stops a
   tall video from swallowing the page. */
.phone {
  width: min(16.5rem, 74vw);
  margin-inline: auto;
  padding: 0.55rem;
  border-radius: 2.4rem;
  background: linear-gradient(160deg, #39445e, #171f36 38%, #0b1222);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 46px 80px -34px rgba(0, 0, 0, 0.9);
}

.phone video {
  display: block;
  width: 100%;
  border-radius: 1.95rem;
  background: #000;
}

.demo-notes {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  counter-reset: beat;
}

.demo-notes li {
  position: relative;
  padding-left: 2.4rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.975rem;
  counter-increment: beat;
}

.demo-notes li::before {
  content: counter(beat);
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1.5px solid rgba(156, 212, 190, 0.5);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 800;
}

.demo-notes b {
  color: var(--paper);
  font-weight: 700;
}

.silent {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------------------------------------------------------------- limits */

.limits {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.limit-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  border-top: 2px solid var(--night);
}

.limit-list li {
  display: grid;
  gap: 0.3rem 2.5rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--hairline);
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .limit-list li {
    grid-template-columns: 18rem 1fr;
    align-items: baseline;
  }
}

.limit-list b {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
}

.limit-list span {
  color: var(--muted);
  max-width: var(--measure);
}

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

.data {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background: var(--fog);
}

.table-scroll {
  margin-top: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
}

.sources {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.975rem;
}

.sources caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.875rem;
  padding: 1.1rem 1.4rem 0.4rem;
}

.sources thead th {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--hairline);
}

.sources th,
.sources td {
  padding: 0.95rem 1.4rem;
  vertical-align: top;
}

.sources tbody tr + tr th,
.sources tbody tr + tr td {
  border-top: 1px solid var(--hairline);
}

.sources tbody th {
  font-weight: 700;
  color: var(--night);
}

.sources td:last-child {
  color: var(--night);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

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

.page-head {
  background: var(--night);
  color: var(--paper);
  padding-block: clamp(3rem, 8vw, 5rem);
}

.page-head h1 {
  color: var(--paper);
  font-size: clamp(2.3rem, 5.6vw, 3.6rem);
}

.page-head .lede {
  color: rgba(255, 255, 255, 0.72);
  margin-top: 1rem;
}

.page-head .updated {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin-bottom: 0;
}

.prose {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.prose h2 {
  margin-top: 3.25rem;
  margin-bottom: 1rem;
  font-size: clamp(1.4rem, 2.6vw, 1.7rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 1.9rem;
  margin-bottom: 0.45rem;
  color: var(--sign-green);
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  max-width: var(--measure);
}

.prose li {
  margin-bottom: 0.45rem;
}

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

.foot {
  background: var(--night);
  color: rgba(255, 255, 255, 0.7);
  padding-block: clamp(2.75rem, 6vw, 4rem);
  font-size: 0.925rem;
}

.foot a {
  color: var(--mint);
}

.foot .foot-brand {
  color: var(--paper);
}

.foot nav a {
  text-decoration: none;
}

.foot nav a:hover {
  text-decoration: underline;
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--paper);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.foot-brand img {
  width: 2.3rem;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
}

.credits {
  padding-top: 1.75rem;
  max-width: 48rem;
  font-size: 0.8375rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.55);
}

.credits p {
  max-width: none;
  margin-bottom: 0.55rem;
}

.credits strong {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

/* ----------------------------------------------------------- centred blocks
   Headings and their ledes are centred from the limits section down. Body
   copy and lists stay left aligned: a ragged left edge is hard to read at
   any length. */

.limits > .wrap > h2,
.limits > .wrap > .lede,
.data > .wrap > h2,
.data > .wrap > .lede,
.demo h2,
.demo > .wrap > .demo-grid > div > p {
  text-align: center;
  margin-inline: auto;
}

.limits > .wrap > h2,
.data > .wrap > h2 {
  margin-bottom: 0.9rem;
}

.limits > .wrap > .lede,
.data > .wrap > .lede {
  max-width: 48rem;
}

/* the demo column is beside the phone, so centre it only once it stacks */
@media (min-width: 54rem) {
  .demo h2,
  .demo > .wrap > .demo-grid > div > p {
    text-align: left;
    margin-inline: 0;
  }
}

.limit-list {
  max-width: 58rem;
  margin-inline: auto;
}

.table-scroll {
  max-width: 58rem;
  margin-inline: auto;
}

.page-head .wrap {
  text-align: center;
}

.page-head .lede,
.page-head p {
  margin-inline: auto;
}

.page-head .lede {
  max-width: 38rem;
}

/* prose pages: centred headings over left-aligned reading */
.prose .wrap {
  max-width: 52rem;
}

.prose h2 {
  text-align: center;
}

.prose h3 {
  text-align: center;
}

.prose p,
.prose ul {
  margin-inline: auto;
}
