/* First paint: the world's ground and its type, before the module boots.
   Kept in public/ behind a <link> because an inline <style> in index.html breaks a Vite build on
   some paths (RULES/LESSONS.md 14.1). */

@font-face {
  font-family: "Px437";
  src: url("/fonts/Px437_IBM_VGA_8x16.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basteleur";
  src: url("/fonts/Basteleur-Moonlight.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Basteleur";
  src: url("/fonts/Basteleur-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* one pixel of the world, in screen pixels */
  --u: 4px;

  --night: #07060a;
  --bark: #170d12;
  --maroon: #2e141c;
  --maroon-2: #4a2028;
  --blood: #7a1024;
  --crimson: #e01e37;
  --ember: #ff6b57;
  --amber: #ffb03a;
  --bone: #f2e2d2;
  --ash: #5a4a4e;
  --ash-2: #9c8a86;

  --pix: "Px437", "Courier New", monospace;
  --read: "Basteleur", Georgia, serif;

  --gap-1: 8px;
  --gap-2: 16px;
  --gap-3: 24px;
  --gap-4: 32px;
  --gap-5: 48px;
  --gap-6: 72px;
  --pad-plate: 28px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  background: var(--night);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--read);
  font-size: 20px;
  line-height: 1.55;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.noscript {
  max-width: 680px;
  margin: 15vh auto;
  padding: 0 24px;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.backdrop-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 300%;
  height: 100%;
  background-image: url("/img/backdrop.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  image-rendering: pixelated;
}
.b1 {
  opacity: 0.5;
  filter: blur(7px) saturate(1.1);
  animation: drift 260s linear infinite;
}
.b2 {
  opacity: 0.22;
  filter: blur(15px);
  transform: scaleY(1.25);
  animation: drift 430s linear infinite reverse;
}
.backdrop-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 8%, rgba(7, 6, 10, 0.2), rgba(7, 6, 10, 0.92) 78%);
}
@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-33.333%, 0, 0);
  }
}
.b2 {
  animation-name: drift2;
}
@keyframes drift2 {
  from {
    transform: translate3d(0, 0, 0) scaleY(1.25);
  }
  to {
    transform: translate3d(-33.333%, 0, 0) scaleY(1.25);
  }
}

#app {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .b1,
  .b2 {
    animation: none;
  }
}
