:root {
  color-scheme: dark;
}
* {
  margin: 0;
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
}
body {
  background: #160f10;
  color: #f2d9aa;
  overflow: hidden;
  font-family: "Fredoka", ui-sans-serif, system-ui, sans-serif;
}
#viz {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
main {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  padding: 1.5rem;
  pointer-events: none;
}
h1 {
  display: flex;
  gap: 0.25em;
  font-size: clamp(60px, 10vw, 156px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.012em;
  white-space: nowrap;
  text-align: center;
}
/* Keep the actual heading in the accessibility tree. Only its visual ink
   moves into the terrain renderer. */
.terrain-ready h1 {
  color: transparent;
}
nav {
  display: flex;
  gap: 2.4rem;
}
nav a {
  color: #edd7b4;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  pointer-events: auto;
  padding: 0.6rem 0.2rem;
  text-shadow:
    0 1px 12px #160f10,
    0 1px 5px #160f10;
  transition: color 0.2s;
}
nav a:hover {
  color: #85d4d6;
}
nav a:focus-visible {
  outline: 1px solid #85d4d6;
  outline-offset: 5px;
  border-radius: 2px;
}
::selection {
  background: #d77891;
  color: #160f10;
}
/* A trace of the original CRT texture, now static so it doesn't compete with
   the motion of the terrain. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 2px,
    #0000000c 2px 3px
  );
}
@media (max-width: 640px) {
  main {
    gap: 2rem;
  }
  h1 {
    flex-direction: column;
    gap: 0;
    font-size: 17vw;
    line-height: 1.13;
  }
  nav {
    gap: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  nav a {
    transition: none;
  }
}
