:root {
  color-scheme: light;
  --paper: #f5f5f2;
  --ink: #080808;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-shell {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
}

.site-header {
  position: relative;
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
}

.hero {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  align-content: center;
  padding: clamp(0.75rem, 1.7vw, 2rem);
}

/* long-form pages, like the privacy policy */
.doc {
  flex: 1;
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 1.25rem clamp(2.5rem, 6vw, 4rem);
  font-size: 0.9rem;
  line-height: 1.7;
}

.doc h1 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.doc h2 {
  margin: 2.4rem 0 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.doc-date {
  margin: 0.6rem 0 2rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

.doc a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 160ms ease;
}

.doc a:hover,
.doc a:focus-visible {
  opacity: 0.5;
  outline: none;
}

.doc code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
}

footer {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--ink);
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

footer nav {
  display: flex;
  gap: 1.25rem;
  justify-self: center;
}

.footer-section-link {
  justify-self: end;
}

.jumper {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.jumper:focus {
  outline: none;
}

.jumper:focus-visible {
  outline: 1px dotted var(--ink);
  outline-offset: -4px;
}

.jumper-stage {
  position: absolute;
  inset: 0;
  /* obstacles wait off the right edge; without this they widen the page */
  overflow: hidden;
}

.jumper-block {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 0.875rem;
  height: 0.875rem;
  background: var(--ink);
  will-change: transform;
}

.jumper-shade {
  position: absolute;
  bottom: -1px;
  left: 2rem;
  width: 0.875rem;
  height: 2px;
  background: var(--ink);
  opacity: 0.18;
}

.jumper-score {
  position: absolute;
  top: 0.35rem;
  right: 1.25rem;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.jumper-score.is-on {
  opacity: 0.5;
}

.jumper-hi {
  margin-right: 0.6rem;
  opacity: 0.55;
}

.jumper-spike {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 10px;
  height: 12px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  opacity: 0;
  will-change: transform;
}

.jumper-flyer {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 8px;
  height: 8px;
  background: var(--ink);
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  opacity: 0;
  will-change: transform;
}

.jumper-cloud {
  position: absolute;
  bottom: 0;
  left: 2rem;
  color: var(--ink);
  opacity: 0;
  overflow: visible;
  will-change: transform;
}

.jumper-cloud path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.jumper-grit {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 2px;
  height: 2px;
  background: var(--ink);
  opacity: 0;
  will-change: transform;
}

.jumper-puff {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 3px;
  height: 3px;
  background: var(--ink);
  opacity: 0;
  will-change: transform;
}

.jumper-shard {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 0.292rem;
  height: 0.292rem;
  background: var(--ink);
  opacity: 0;
}

.jumper-spark {
  position: absolute;
  bottom: 0;
  left: 2rem;
  width: 2px;
  height: 2px;
  background: var(--ink);
  opacity: 0;
}

footer a {
  transition: opacity 160ms ease;
}

footer a:hover,
footer a:focus-visible {
  opacity: 0.45;
  outline: none;
}

@media (max-width: 640px) {
  .site-header {
    min-height: 4rem;
    padding: 0 0.75rem;
  }

  .hero {
    padding: 0.75rem 0.65rem;
  }

  footer {
    gap: 0.75rem 1.5rem;
    padding: 1rem 0.75rem;
  }

  .jumper-score {
    right: 0.75rem;
  }
}

/* three columns stop fitting on a phone and push the page wider than the screen */
@media (max-width: 480px) {
  footer {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.7rem;
    padding-top: 1.7rem;
    text-align: center;
  }

  footer nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
  }

  .footer-section-link {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
