:root {
  --bg-top: #0b0221;
  --bg-bottom: #2b0a4d;
  --pink: #ff2e97;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: linear-gradient(var(--bg-top), var(--bg-bottom) 50%, var(--bg-top));
  color: #fff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  overflow: hidden;
  display: flex; flex-direction: column;
}
/* nothing on the page can be selected */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
}
::selection { background: transparent; color: inherit; }
::-moz-selection { background: transparent; color: inherit; }
/* the text scales with the browser width.
   Same idea as the favicon: sunset gradient fill, dark outline and a cyan offset shadow. */
h1 {
  margin: 0;
  flex: none;
  position: relative; z-index: 2;
  height: 1em; /* the three layers below are absolute */
  text-align: center;
  font-size: max(4vw, 28px); /* a quarter of before; never smaller than 28px so it stays readable on phones */
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  filter: drop-shadow(0 0 .12em rgba(255, 46, 151, .55));
}
/* Three layers of the same text, each one with a dithered pixel texture (same 8-pixel tile, so the dither lines up):
   ::before = cyan/blue shadow, span = dark outline, ::after = sunset fill.
   The boxes are taller than the line so the descender of the "g" is covered too. */
h1 span, h1::before, h1::after {
  position: absolute; left: 0; right: 0; top: -.15em;
  padding: .15em 0 .3em;
  background-repeat: repeat-x;
  background-size: .4em 1.45em;
  image-rendering: pixelated;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
h1::before, h1::after {
  content: attr(data-text);
  content: attr(data-text) / "";
}
h1::before { /* shadow, one pixel down and to the right, behind the outline */
  z-index: -1;
  background-image: linear-gradient(#2ef2ff 23%, #2a5bff 67%); /* fallback */
  background-image: url(dither-shadow.png);
  -webkit-text-stroke: .1em transparent;
  transform: translate(.05em, .05em);
}
h1 span {
  background-image: linear-gradient(#2e0b55 23%, #0b011c 67%); /* fallback */
  background-image: url(dither-outline.png);
  -webkit-text-stroke: .1em transparent;
}
h1::after {
  background-image: linear-gradient(#ffd319 23%, #ff5e8a 46%, #ff2e97 67%); /* fallback */
  background-image: url(dither.png);
  -webkit-text-stroke: 0;
}

/* ceiling and floor: each one fills the space from the edge of the screen up to the text.
   Two layers of lines: pink (near) and cyan (far, near the horizon), the cyan fades into the pink as the lines come closer. */
.grid { flex: 1; position: relative; overflow: hidden; }
.grid::before, .grid::after {
  content: "";
  position: absolute; left: -50%; right: -50%; top: 0; height: 220%;
  background:
    linear-gradient(var(--c) 2px, transparent 2px) 0 0 / 100% 48px,
    linear-gradient(90deg, var(--c) 2px, transparent 2px) 0 0 / 64px 100%;
  transform: perspective(300px) rotateX(62deg);
  transform-origin: top;
  filter: drop-shadow(0 0 3px var(--c)) drop-shadow(0 0 6px var(--c));
  animation: move 1.6s linear infinite;
}
.grid::before {
  --c: #2ef2ff;
  -webkit-mask-image: linear-gradient(transparent 4%, #000 17%);
  mask-image: linear-gradient(transparent 4%, #000 17%);
}
.grid::after {
  --c: #ff2e97;
  -webkit-mask-image: linear-gradient(transparent 0, #000 6%, transparent 24%);
  mask-image: linear-gradient(transparent 0, #000 6%, transparent 24%);
}
.band { flex: none; position: relative; }
/* the ceiling is the floor flipped upside down */
.grid.top { transform: scaleY(-1); }
@keyframes move { to { background-position: 0 48px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .grid::before, .grid::after { animation: none; } }
