@font-face {
  font-family: "RGNCY Sans";
  src: url("assets/RGNCYSans-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "RGNCY Mono";
  src: url("assets/RGNCYMono-Medium.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #080808;
  color: #999;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, p, ul { margin: 0; }

main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

button { color: inherit; cursor: pointer; }

#wordmark {
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: .2em;
  font: 400 clamp(3rem, 5.208333vw, 8rem)/1 "RGNCY Sans", sans-serif;
  font-feature-settings: "cpsp" 1, "liga" 0, "dlig" 1;
}

#wordmark span {
  display: block;
  text-box: trim-both cap alphabetic;
  filter: blur(.25px);
}

button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

#about {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  margin: 0;
  border: 0;
  background: rgb(8 8 8 / 95%);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  color: inherit;
  cursor: pointer;
  overflow: auto;
  overscroll-behavior: contain;
}

#about::backdrop { background: transparent; }
body:has(#about[open]) #wordmark { visibility: hidden; }

.about-layout {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: max(1.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.about-copy {
  --line: 1.777778em;
  display: grid;
  gap: calc(var(--line) * 3);
  width: min(100%, 970px);
  text-align: center;
  text-transform: uppercase;
  font: 500 clamp(.875rem, .9375vw, 1.25rem)/var(--line) "RGNCY Mono", monospace;
  font-feature-settings: "cpsp" 1;
  letter-spacing: .06em;
  filter: blur(.25px);
}

.about-copy ul { list-style: none; padding: 0; }

#close-about {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  padding: .5rem;
  border: 0;
  background: #080808;
  opacity: 0;
  font: 500 .875rem/1 "RGNCY Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
}

#close-about:focus-visible { opacity: 1; }

/* A native modal occupies the top layer and needs its own grain surface. */
body::after, #about::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url("assets/grain.png") repeat;
  opacity: .018;
  pointer-events: none;
}

@keyframes grain {
  0%, 100% { background-position: 0 0; }
  12.5% { background-position: 31px -17px; }
  25%   { background-position: -43px 67px; }
  37.5% { background-position: 59px 23px; }
  50%   { background-position: -19px -53px; }
  62.5% { background-position: 71px -37px; }
  75%   { background-position: -61px 11px; }
  87.5% { background-position: 17px 47px; }
}

@media (prefers-reduced-motion: no-preference) {
  body::after, #about::after {
    animation: grain .8s step-end infinite;
  }
  body:has(#about[open])::after {
    animation-play-state: paused;
  }
}

@media (max-height: 620px) {
  .about-copy { gap: calc(var(--line) * 1.5); }
}
