/* Tamby "kommer snart" (D-993). Brand values from ADR 0013: cyan is a fill or text on ink only, ink 950 is the text
   and night ground, butter is the taximeter's light. The map is drawn by app.js into #map. */

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

:root {
  --ink-950: #0a111a;
  --ink-900: #0f1823;
  --ink-800: #182331;
  --ink-600: #3d4859;
  --mist: #9aa9ba;
  --snow: #eef4f9;
  --paper: #f5f8fb;
  --cyan: #51e5ff;
  --cyan-pressed: #42cbe3;
  --cyan-700: #09798a;
  --butter: #fae38c;
  --danger: #d2393a;
  --line: #ccd6e0;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--snow);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "cv05", "ss01";
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The night map: fixed behind everything; app.js slides .world so the car stays in frame. */
.map {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0d1621;
}

.world {
  position: absolute;
  top: 0;
  left: 0;
  width: 5392px;
  height: 5782px;
  transform-origin: 0 0;
  will-change: transform;
}

.world img,
.world svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.place {
  font:
    600 15px "Inter",
    system-ui,
    sans-serif;
  fill: #9aa9ba;
  paint-order: stroke;
  stroke: #0a111a;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.car-pulse {
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.marker circle {
  transition: stroke 400ms;
}

.marker.is-passed circle {
  stroke: var(--cyan);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 30%, transparent 40%, rgb(10 17 26 / 0.85) 100%),
    linear-gradient(to top, rgb(10 17 26 / 0.92) 0%, rgb(10 17 26 / 0) 45%);
}

@media (min-width: 900px) {
  .vignette {
    background:
      radial-gradient(90% 90% at 70% 50%, transparent 35%, rgb(10 17 26 / 0.8) 100%),
      linear-gradient(
        to right,
        rgb(10 17 26 / 0.94) 0%,
        rgb(10 17 26 / 0.6) 38%,
        rgb(10 17 26 / 0) 60%
      );
  }
}

/* The trip readout: kilometres driven so far, as a navigator would show them. */
.hud {
  position: fixed;
  z-index: 1;
  right: var(--gutter);
  top: calc(env(safe-area-inset-top, 0px) + 5rem);
  text-align: right;
  pointer-events: none;
  text-shadow:
    0 1px 12px rgb(10 17 26 / 0.95),
    0 0 2px rgb(10 17 26 / 0.9);
}

.hud p {
  margin: 0;
}

.hud-km {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--snow);
}

.hud-trip {
  font-size: 0.8125rem;
  color: var(--mist);
}

@media (min-width: 900px) {
  .hud {
    top: auto;
    bottom: 2.5rem;
  }

  .hud-km {
    font-size: 2rem;
  }
}

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 1rem) var(--gutter) 1rem;
}

.top-logo img {
  width: 7.25rem;
  height: auto;
}

.top-cta {
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgb(81 229 255 / 0.5);
  color: var(--cyan);
  background: rgb(10 17 26 / 0.5);
  backdrop-filter: blur(8px);
  transition:
    border-color 160ms,
    background-color 160ms;
}

.top-cta:hover {
  border-color: var(--cyan);
  background: rgb(81 229 255 / 0.08);
}

main {
  position: relative;
  z-index: 2;
}

/* Each stop is one screen of the drive. On phones the car rides high and the words sit low; on wide screens the words
   sit left and the car rides to the right. */
.stop {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 7rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 3.5rem);
}

.stop + .stop {
  min-height: 115svh;
}

@media (min-width: 900px) {
  .stop {
    justify-content: center;
    padding-block: 8rem;
  }
}

.stop-text {
  max-width: 31rem;
}

h1,
h2 {
  margin: 0 0 1rem;
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

@media (min-width: 900px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }
}

p {
  margin: 0 0 1rem;
  max-width: 34em;
}

.stop-text p {
  color: #c4cfdb;
}

.lede {
  font-size: 1.125rem;
}

.start-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}

.follow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--mist);
  font-size: 0.9375rem;
}

.follow::after {
  content: "";
  width: 1px;
  height: 1.75rem;
  background: linear-gradient(var(--cyan), transparent);
  animation: drip 2.4s var(--ease-out) infinite;
  transform-origin: top;
}

@keyframes drip {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }
  70% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.25rem;
  padding: 0 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink-950);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms,
    transform 200ms var(--ease-out);
}

.btn:hover {
  background: #6eeaff;
}

.btn:active {
  background: var(--cyan-pressed);
  transform: scale(0.98);
}

/* The taximeter and the locked price. */
.meter {
  margin: 1.75rem 0 0;
  padding: 1rem 1.15rem 0.9rem;
  border-radius: 20px;
  background: rgb(15 24 35 / 0.82);
  border: 1px solid #223042;
  backdrop-filter: blur(10px);
  max-width: 24rem;
}

.meter-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
}

.meter-row + .meter-row {
  border-top: 1px dashed #2a394c;
}

.meter-name {
  font-size: 0.9375rem;
  color: var(--mist);
}

.meter-value {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.meter-taxi .meter-value {
  color: var(--butter);
  text-shadow: 0 0 18px rgb(250 227 140 / 0.35);
}

.meter-tamby .meter-value {
  color: var(--cyan);
}

.lock {
  width: 0.95rem;
  height: 0.95rem;
}

.meter figcaption {
  margin-top: 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--mist);
}

.meter-digits.tick {
  animation: tick 260ms var(--ease-out);
}

@keyframes tick {
  from {
    opacity: 0.35;
    transform: translateY(-0.15em);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.meter-digits {
  display: inline-block;
}

/* PIN */
.pin {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.pin span {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 4rem;
  border-radius: 14px;
  background: rgb(15 24 35 / 0.85);
  border: 1.5px solid #2a394c;
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--snow);
  transition:
    border-color 300ms,
    transform 500ms var(--ease-out),
    opacity 500ms;
}

.js .pin span {
  opacity: 0;
  transform: translateY(0.6rem);
}

.pin.is-shown span {
  opacity: 1;
  transform: none;
  border-color: var(--cyan);
}

.pin.is-shown span:nth-child(2) {
  transition-delay: 90ms;
}
.pin.is-shown span:nth-child(3) {
  transition-delay: 180ms;
}
.pin.is-shown span:nth-child(4) {
  transition-delay: 270ms;
}

/* The destination: a paper ticket on the night map. */
.stop-end {
  justify-content: center;
  align-items: center;
  min-height: 120svh;
}

@media (min-width: 900px) {
  .stop-end {
    align-items: flex-start;
  }
}

.ticket {
  position: relative;
  width: 100%;
  max-width: 28rem;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 26px;
  background: var(--paper);
  color: var(--ink-950);
  box-shadow:
    0 30px 80px -20px rgb(0 0 0 / 0.7),
    0 0 0 1px rgb(255 255 255 / 0.06);
  /* The ticket's perforation: two notches on its edges. */
  -webkit-mask:
    radial-gradient(circle 12px at 0 7.25rem, transparent 11.5px, #000 12px) left / 51% 100%
    no-repeat,
    radial-gradient(circle 12px at 100% 7.25rem, transparent 11.5px, #000 12px) right / 51% 100%
    no-repeat;
  mask:
    radial-gradient(circle 12px at 0 7.25rem, transparent 11.5px, #000 12px) left / 51% 100%
    no-repeat,
    radial-gradient(circle 12px at 100% 7.25rem, transparent 11.5px, #000 12px) right / 51% 100%
    no-repeat;
}

@media (min-width: 480px) {
  .ticket {
    padding: 2rem 2rem 1.75rem;
  }
}

.ticket h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.ticket-lede {
  color: var(--ink-600);
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1.5px dashed var(--line);
}

.ticket a,
.ticket .link {
  color: var(--cyan-700);
}

.kind {
  border: 0;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.kind legend {
  grid-column: 1 / -1;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.kind-option {
  position: relative;
}

.kind-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.kind-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-weight: 600;
  transition:
    background-color 160ms,
    border-color 160ms;
}

.kind-option input:checked + span {
  background: var(--ink-950);
  border-color: var(--ink-950);
  color: var(--cyan);
}

.kind-option input:focus-visible + span {
  outline: 3px solid var(--cyan-700);
  outline-offset: 2px;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  color: var(--ink-600);
}

.field input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-950);
  font: inherit;
  color-scheme: light;
}

.field input:focus-visible {
  outline: 3px solid var(--cyan-700);
  outline-offset: 1px;
  border-color: var(--cyan-700);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error,
.form-error {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: #b42324;
}

.form-error {
  margin-top: 0.9rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.check {
  display: grid;
  grid-template-columns: 1.35rem 1fr;
  gap: 0.7rem;
  align-items: start;
  margin: 0.9rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink-600);
  cursor: pointer;
}

.check input {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0.05rem 0 0;
  accent-color: var(--ink-950);
  color-scheme: light;
  cursor: pointer;
}

.turnstile {
  margin-top: 1rem;
}

.turnstile:empty {
  margin: 0;
}

.btn-submit {
  width: 100%;
  margin-top: 1.4rem;
  min-height: 3.5rem;
  position: relative;
  overflow: hidden;
}

.btn-submit[aria-busy="true"] {
  cursor: progress;
}

.btn-submit[aria-busy="true"] .btn-label::after {
  content: "";
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: 0.6rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  vertical-align: -0.1rem;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ticket-fine {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-600);
}

.link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.ticket-done {
  text-align: left;
}

.ticket-done:focus {
  outline: none;
}

.done-mark {
  width: 3rem;
  height: 3rem;
  color: var(--cyan-700);
  margin-bottom: 1.25rem;
}

.ticket-done p {
  color: var(--ink-600);
}

.ticket-done strong {
  color: var(--ink-950);
  word-break: break-all;
}

.foot {
  position: relative;
  z-index: 2;
  padding: 2rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 2rem);
  font-size: 0.875rem;
  color: var(--mist);
}

/* Plain pages: privacy notice and the confirmation results. */
.page {
  position: relative;
  z-index: 2;
  max-width: 40rem;
  padding: 8rem var(--gutter) 4rem;
}

.page h1 {
  font-size: 2rem;
}

.page h2 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
}

.page p,
.page li {
  color: #c4cfdb;
}

.page a {
  color: var(--cyan);
}

/* Load: the headline settles once the route has started drawing. */
.js .stop-start .stop-text > * {
  opacity: 0;
  transform: translateY(0.75rem);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
}

.js.is-ready .stop-start .stop-text > * {
  opacity: 1;
  transform: none;
}

.js.is-ready .stop-start .stop-text > :nth-child(2) {
  transition-delay: 120ms;
}
.js.is-ready .stop-start .stop-text > :nth-child(3) {
  transition-delay: 240ms;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
  }
}
