:root {
  --void: #0a0908;
  --bone: #c9c2b4;
  --hold-height: 740vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--bone);
  font-family: Georgia, "Times New Roman", serif;
}

html {
  background: var(--void);
  -webkit-text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

.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;
}

#threshold {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--void);
  z-index: 1;
}

#runway {
  position: relative;
  z-index: 0;
  width: 1px;
  height: var(--hold-height);
  pointer-events: none;
}

#grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

#veil {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: var(--void);
  transition: opacity 1.4s ease;
}

#veil.is-gone {
  opacity: 0;
  pointer-events: none;
}

#load-mark {
  width: min(28vw, 140px);
  height: 1px;
  background: color-mix(in srgb, var(--bone) 35%, transparent);
  position: relative;
  overflow: hidden;
}

#load-mark::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--load, 0%);
  background: var(--bone);
}

#cue {
  position: fixed;
  left: 50%;
  bottom: max(1.6rem, env(safe-area-inset-bottom));
  z-index: 3;
  width: 10px;
  height: 18px;
  transform: translateX(-50%);
  opacity: 0.35;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

#cue::before,
#cue::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 8px;
  background: var(--bone);
  transform-origin: top center;
}

#cue::before {
  transform: translateX(-50%) rotate(32deg);
}

#cue::after {
  transform: translateX(-50%) rotate(-32deg);
}

#cue.is-gone {
  opacity: 0;
}

#tone {
  position: fixed;
  right: max(1.4rem, env(safe-area-inset-right));
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 3;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--bone) 55%, transparent);
  border-radius: 50%;
  background: transparent;
  opacity: 0.35;
  cursor: pointer;
  appearance: none;
}

#tone.is-muted::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 1px;
  height: 18px;
  background: var(--bone);
  transform: translateX(-50%) rotate(32deg);
}

#tone:focus-visible {
  outline: 1px solid var(--bone);
  outline-offset: 4px;
}

noscript img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  #runway {
    height: 100vh;
  }

  #veil {
    transition: none;
  }

  #cue,
  #tone {
    display: none;
  }
}
