:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #010207;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #010207;
}

body {
  overscroll-behavior-x: none;
  scrollbar-color: rgba(211, 222, 218, 0.2) transparent;
  scrollbar-width: thin;
}

.cosmos {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: #010207;
}

#cosmos {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.vignette,
.film-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.vignette {
  background:
    radial-gradient(circle at 50% 46%, transparent 38%, rgba(0, 0, 0, 0.22) 70%, rgba(0, 0, 0, 0.78) 112%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 16%, transparent 78%, rgba(0, 0, 0, 0.62));
}

.film-grain {
  opacity: 0.075;
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(17deg, transparent 0 3px, rgba(255, 255, 255, 0.12) 3px 4px),
    repeating-linear-gradient(103deg, transparent 0 5px, rgba(114, 178, 185, 0.08) 5px 6px);
  background-size: 7px 11px, 13px 17px;
  animation: grain-shift 0.18s steps(2) infinite;
}

.scroll-space {
  height: 680vh;
  min-height: 4800px;
  pointer-events: none;
}

.fallback {
  display: none;
}

.no-webgl .fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #eef3ef;
  font-size: clamp(4rem, 18vw, 13rem);
  font-weight: 800;
  letter-spacing: 0;
}

@keyframes grain-shift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-1px, 1px, 0); }
  100% { transform: translate3d(1px, -1px, 0); }
}

@media (max-width: 720px) {
  .cosmos {
    min-height: 500px;
  }

  .film-grain {
    opacity: 0.05;
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-grain {
    animation: none;
  }
}
