:root {
  --prussian: #06122a;
  --cyanotype: #0f3b8c;
  --paper: #eaf3fb;
  --paper-soft: rgba(234, 243, 251, 0.72);
  --hair: rgba(234, 243, 251, 0.28);
  --sans: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  background: var(--prussian);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}
a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 4px;
}

#flow {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  display: block;
}
#flow.noflow {
  background:
    radial-gradient(120% 90% at 20% 20%, #1327b0, transparent 60%), linear-gradient(160deg, #0f3b8c, #06122a);
}

/* ---- top bar ---- */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 22px var(--gutter);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 450;
}
.bar nav {
  display: flex;
  gap: 28px;
}
.bar nav a,
.bar .home {
  padding: 12px 0;
  position: relative;
}
.bar nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.bar nav a:hover::after,
.bar nav a[aria-current]::after {
  transform: scaleX(1);
}
.bar .home {
  font-family: var(--mono);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

/* ---- landing ---- */
.stage {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
.mark {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 50%;
  transform: translateY(-58%);
  aspect-ratio: 389.91 / 55.36;
}
.mark canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 30ch) 1fr;
  align-items: end;
  gap: 24px;
  padding-bottom: 34px;
}
.since {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-soft);
  margin: 0 0 12px;
}
.lede {
  margin: 0;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.32;
  font-weight: 350;
}
.hint {
  justify-self: end;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--paper-soft);
}
.hint [data-readout] {
  color: var(--paper);
}

/* Phone, portrait: the mark stands up like a book's spine on the right. */
@media (max-aspect-ratio: 3/4) {
  .mark {
    left: auto;
    right: calc(var(--gutter) - 6px);
    top: 78px;
    bottom: 28px;
    transform: none;
    aspect-ratio: auto;
    width: 30vw;
  }
  .foot {
    grid-template-columns: 1fr;
    padding-right: calc(30vw + var(--gutter) + 14px);
  }
  .lede {
    font-size: 20px;
  }
  .hint {
    justify-self: start;
    text-align: left;
  }
  .hint .desk {
    display: none;
  }
}
@media (min-aspect-ratio: 3/4) {
  .hint .touch {
    display: none;
  }
}

/* ---- about ---- */
.page {
  padding: 120px var(--gutter) 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.page .col {
  max-width: 36rem;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-soft);
  margin: 0 0 18px;
}
.page h1 {
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
  max-width: 14ch;
}
.page p {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 1.1em;
}
.page section {
  border-top: 1px solid var(--hair);
  padding-top: 22px;
  margin-top: 56px;
}
.page h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--paper-soft);
  margin: 0 0 20px;
}
.make {
  list-style: none;
  margin: 0;
  padding: 0;
}
.make li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  font-size: 17px;
  line-height: 1.5;
}
.make li b {
  font-weight: 450;
}
@media (max-width: 600px) {
  .make li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.invite-link {
  margin: 18px 0 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 450;
}
.invite-link a {
  border-bottom: 1px solid var(--paper);
  padding: 12px 0 4px;
}
.invite {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  max-width: 32rem;
}
.invite label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-soft);
  margin-top: 14px;
}
.invite input,
.invite textarea {
  font: inherit;
  font-size: 18px;
  color: var(--paper);
  background: rgba(6, 18, 42, 0.35);
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  padding: 10px 2px;
  min-height: 44px;
  width: 100%;
}
.invite textarea {
  resize: vertical;
  line-height: 1.5;
}
.invite input:focus,
.invite textarea:focus {
  outline: none;
  border-bottom-color: var(--paper);
}
.invite .trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.invite button {
  justify-self: start;
  margin-top: 22px;
  min-height: 44px;
  padding: 0 26px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 450;
  color: var(--prussian);
  background: var(--paper);
  border: 0;
  border-radius: 0;
}
.invite button:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 4px;
}
.invite button[disabled] {
  opacity: 0.5;
  cursor: default;
}
.invite-note {
  font-size: 17px;
  line-height: 1.5;
  margin: 12px 0 0;
  min-height: 1.5em;
}
.small {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper-soft);
}
.page footer {
  margin-top: 90px;
}

/* the veil keeps long text legible over the moving ground */
.veil::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(6, 18, 42, 0.72) 0%,
    rgba(6, 18, 42, 0.5) 50%,
    rgba(6, 18, 42, 0) 85%
  );
}
@media (max-width: 700px) {
  .veil::before {
    background: rgba(6, 18, 42, 0.55);
  }
}

/* ---- 404 ---- */
.lost {
  position: relative;
  height: 100svh;
  overflow: hidden;
}
#heap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 76px;
  width: 100%;
  height: calc(100% - 76px);
  display: block;
  touch-action: none;
}
.lost .copy {
  position: absolute;
  left: var(--gutter);
  top: 18vh;
  max-width: 30rem;
  z-index: 2;
  pointer-events: none;
}
.lost .copy a {
  pointer-events: auto;
}
.lost .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--paper-soft);
  margin: 0 0 14px;
}
.lost h1 {
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  margin: 0 0 22px;
}
.lost .joke {
  font-size: 19px;
  line-height: 1.5;
  margin: 0 0 30px;
  max-width: 26rem;
}
.lost .path {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
  color: var(--paper-soft);
  margin: 0 0 22px;
}
.lost .path span {
  color: var(--paper);
}
.lost .ways {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 450;
}
.lost .ways a {
  border-bottom: 1px solid var(--paper);
  padding: 12px 0 4px;
}

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