@font-face {
  font-family: "Geist Mono";
  src: url("/assets/geist-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #08070b;
  --ink: #e8e5f4;
  --ink2: #9893ad;
  --ink3: #5d5970;
  --brand: #8f8cff;
  --line: rgba(143, 140, 255, .22);
  --pad: clamp(16px, 4vw, 44px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand); color: var(--bg); }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--brand); outline-offset: 4px; }

#field {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100lvh;
  display: block;
  z-index: 0;
  touch-action: pan-y;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8, 7, 11, .85) 100%),
    linear-gradient(to bottom, rgba(8, 7, 11, .6), transparent 14%, transparent 86%, rgba(8, 7, 11, .7));
}

.top, .bottom {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: calc(var(--pad) * .6) var(--pad);
  font-size: 12px;
  color: var(--ink2);
  pointer-events: none;
}
.top { top: 0; padding-top: max(calc(var(--pad) * .6), env(safe-area-inset-top)); }
.top a, .top span { pointer-events: auto; }
.tag { letter-spacing: .04em; }
.nav { display: flex; gap: 22px; align-items: baseline; }
.nav a { color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color .2s, color .2s; }
.nav a:hover { color: var(--brand); border-color: var(--brand); }
.dim { color: var(--ink3); }
.caret { animation: blink 1.1s steps(1) infinite; color: var(--brand); }

.bottom {
  position: relative;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding: 40px var(--pad) max(28px, env(safe-area-inset-bottom));
  pointer-events: auto;
}
.bottom a { color: var(--ink3); transition: color .2s; }
.bottom a:hover { color: var(--ink); }

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

.frame {
  min-height: 100svh;
  padding: 96px var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* hero */
.hero { justify-content: flex-end; padding-bottom: clamp(64px, 12vh, 120px); }
.hero-copy { max-width: 34ch; }
h1 {
  margin: 0 0 6px;
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.04em;
}
.hero p { margin: 0; color: var(--ink2); font-size: clamp(14px, 1.6vw, 17px); }
.hero p b { color: var(--ink); font-weight: 700; }
.hint {
  position: absolute;
  right: var(--pad);
  bottom: clamp(64px, 12vh, 120px);
  color: var(--ink3);
  font-size: 18px;
  padding: 8px;
  margin: -8px;
}
[data-blink] { animation: drift 2.4s ease-in-out infinite; display: inline-block; }

/* what */
.what { align-items: center; }
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(100%, 760px);
  display: grid;
  gap: clamp(18px, 3.2vh, 30px);
}
.rows li {
  display: grid;
  grid-template-columns: 12ch 1fr;
  gap: 2ch;
  font-size: clamp(14px, 1.7vw, 18px);
  line-height: 1.5;
  text-shadow: 0 0 18px var(--bg), 0 0 6px var(--bg);
}
.k { color: var(--brand); }
.k::before { content: "› "; color: var(--ink3); }
.v { color: var(--ink); }
.aside {
  width: min(100%, 760px);
  margin: clamp(34px, 7vh, 60px) 0 0;
  padding-left: 14ch;
  color: var(--ink3);
  font-size: 13px;
  text-shadow: 0 0 14px var(--bg);
}

/* get */
.get { align-items: center; text-align: center; }
h2 {
  margin: 0 0 26px;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 400;
  letter-spacing: -.03em;
  text-shadow: 0 0 24px var(--bg);
}
.term {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 680px);
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--line);
  background: rgba(8, 7, 11, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: left;
  box-shadow: 0 0 0 1px rgba(8, 7, 11, .6), 0 0 60px -10px rgba(143, 140, 255, .25);
}
.ps { color: var(--brand); flex: none; }
.term code {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: clamp(12px, 1.55vw, 14.5px);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  user-select: all;
  -webkit-user-select: all;
}
.term code::-webkit-scrollbar { display: none; }
.copy {
  flex: none;
  font: inherit;
  font-size: 12px;
  color: var(--bg);
  background: var(--ink);
  border: 0;
  padding: 7px 12px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.copy:hover { background: var(--brand); }
.copy[data-copied] { background: var(--brand); }
.does {
  margin: 20px 0 0;
  max-width: 52ch;
  color: var(--ink2);
  font-size: 13px;
  text-shadow: 0 0 14px var(--bg);
}
.links {
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  font-size: 13px;
}
.links a { color: var(--ink); border-bottom: 1px solid var(--line); transition: border-color .2s; }
.links a:hover { border-color: var(--brand); }

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

/* before the intro has run, scramble targets wait */
.js [data-scramble] { visibility: hidden; }
.js [data-scramble].on { visibility: visible; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes drift { 50% { transform: translateY(5px); opacity: .5; } }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .hero { padding-bottom: 92px; }
  .hint { bottom: 92px; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
  .aside { padding-left: 0; }
  .term { padding: 12px 10px 12px 14px; gap: 10px; }
  .term { align-items: flex-start; }
  .term code { font-size: 12.5px; white-space: normal; word-break: break-all; line-height: 1.55; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret, [data-blink] { animation: none; }
}
