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

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

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

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}

:root {
  --ink: #0e0e10;
  --paper: #f7f6f2;
  --graphite: #5b5d63;
  --rule: #e4e2dc;
  --line: #ffd21f;
  --muted: #c8c9ce;
  --gutter: max(1.25rem, calc((100% - 72rem) / 2));
  --font-display: "Inter Tight", Inter, system-ui, sans-serif;
  --font-text: Inter, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

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

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-150%);
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
}

.skip:focus {
  transform: none;
}

.home {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter) 0.25rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--paper);
  text-decoration: none;
}

.logo svg {
  width: 0.7rem;
  height: 1.45rem;
}

.logo span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}

.bar nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.bar nav a:hover {
  color: var(--paper);
}

.stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem var(--gutter) 1.25rem;
}

.road {
  position: relative;
  height: 5.5rem;
  margin-bottom: 1.25rem;
}

.road::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1);
  right: calc(var(--gutter) * -1);
  bottom: 0;
  height: 1px;
  background: rgba(247, 246, 242, 0.45);
  transform-origin: left center;
}

html.motion .road::before {
  animation: draw 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.car {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 11.5rem;
  height: auto;
  color: var(--paper);
  transform: translateX(0);
}

html.motion .car {
  animation: drive 2.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.wheel {
  transform-box: fill-box;
  transform-origin: center;
}

html.motion .wheel {
  animation: spin 2.6s linear 0.15s both;
}

.figure {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0;
}

.amount {
  min-width: 7.2ch;
  font-family: var(--font-mono);
  font-size: clamp(2.6rem, 8vw, 4.25rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--line);
}

html.motion .amount {
  visibility: hidden;
}

html.motion .amount.is-live {
  visibility: visible;
}

.tag {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.note,
.lede,
.legal {
  color: var(--muted);
}

.note {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  font-size: 0.875rem;
}

h1 {
  margin: 1.25rem 0 0;
  max-width: 11ch;
  font-family: var(--font-display);
  font-size: clamp(3.1rem, 11vw, 7.25rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

h1 span {
  display: block;
}

.lede {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  font-size: 1.0625rem;
}

.contact {
  margin: 1.25rem 0 0;
}

.contact a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: 1.0625rem;
  text-underline-offset: 0.25rem;
}

.legal {
  margin: 2.5rem 0 0;
  max-width: 44rem;
  font-size: 0.75rem;
  line-height: 1.45;
}

.sheet {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  min-height: 100svh;
}

.sheet .logo {
  color: var(--ink);
}

.sheet .bar nav a {
  color: var(--graphite);
}

.sheet .bar nav a:hover {
  color: var(--ink);
}

.sheet a:focus-visible {
  outline-color: var(--ink);
}

.doc {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.doc h1 {
  max-width: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 8vw, 4rem);
}

.doc h2 {
  margin: 2rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.doc p,
.doc li {
  color: #3c3e44;
  font-size: 1.0625rem;
}

.doc a {
  text-underline-offset: 0.2rem;
}

.doc ul {
  padding-left: 1.1rem;
}

.doc .back {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
}

@keyframes draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes drive {
  from {
    transform: translateX(calc(-100% - var(--gutter)));
  }
  to {
    transform: translateX(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-540deg);
  }
}

@media (min-width: 768px) {
  .road {
    height: 7.5rem;
    margin-bottom: 1.75rem;
  }

  .car {
    width: 17rem;
  }

  .stage {
    justify-content: center;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .legal {
    margin-top: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.motion .car,
  html.motion .wheel,
  html.motion .road::before,
  .car,
  .wheel,
  .road::before {
    animation: none;
  }

  .car {
    transform: translateX(0);
  }

  .amount {
    visibility: visible;
  }
}
