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

:root {
  --bg: #1d1e21;
  --ink: #ededea;
  --muted: #9a9b97;
  --rule: #4a4b4f;
  --accent: #e5532d;
  --gutter: clamp(20px, 4vw, 56px);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--gutter);
  overflow: hidden;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.lanes {
  flex: none;
  width: clamp(170px, 30vw, 460px);
  height: auto;
  overflow: visible;
}

.lanes stop { stop-color: var(--ink); }

.lanes-lines line {
  stroke: var(--ink);
  stroke-linecap: butt;
  vector-effect: non-scaling-stroke;
}

/* thick part above each dot; grows and shrinks in sync with the dot */
.lanes-lines .trail {
  stroke-width: 2.25;
  opacity: 0.9;
  transform: scale(calc(var(--a) + (1 - var(--a)) * var(--p)));
  animation: trail 6.5s ease-in-out infinite alternate;
}

@keyframes trail {
  from { transform: scale(var(--a)); }
  to { transform: scale(1); }
}

.lanes-dots circle {
  fill: var(--accent);
  transform: translate(calc(var(--dx) * var(--p)), calc(var(--dy) * var(--p)));
  animation: travel 6.5s ease-in-out infinite alternate;
}

@keyframes travel {
  from { transform: translate(0, 0); }
  to { transform: translate(var(--dx), var(--dy)); }
}

.tagline {
  margin: 0;
  font-size: clamp(28px, 4.6vw, 64px);
  font-weight: 250;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.mark {
  margin: 0;
  font-size: min(100cqw / 4.2, 420px);
  font-weight: 400;
  line-height: 0.74;
  letter-spacing: -0.01em;
  white-space: nowrap;
  border-bottom: 1px solid var(--ink);
}

.mark span {
  display: inline-block;
  font-weight: var(--w);
  animation: settle 1.4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  animation-delay: calc(var(--i) * 80ms + 200ms);
}

@keyframes settle {
  from { font-weight: 100; }
  to { font-weight: var(--w); }
}

.base {
  position: relative;
  z-index: 1;
  grid-row: 2;
  container-type: inline-size;
}

.meta {
  text-align: right;
  margin: 14px 0 0;
  font-size: clamp(16px, 1.7vw, 22px);
  font-weight: 300;
  color: var(--muted);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 404 */
.lost .tagline a {
  display: inline-block;
  margin-top: 24px;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

/* phones: draw the lanes wider than the column so the tails reach the wordmark */
@media (max-width: 600px) {
  .lanes {
    position: absolute;
    top: calc(var(--gutter) + 44px);
    right: calc(var(--gutter) - 70px);
    width: 330px;
    pointer-events: none;
  }
  /* "Coming soon" sits right above the wordmark */
  .page { grid-template-rows: 1fr auto auto 1fr; }
  .top { display: contents; }
  .top .tagline {
    position: relative;
    z-index: 1;
    grid-row: 2;
    margin-bottom: 20px;
  }
  .base { grid-row: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .mark span,
  .lanes-lines .trail,
  .lanes-dots circle { animation: none; }
}
