*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-y;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  overscroll-behavior-y: none;
}

.js body {
  opacity: 0;
  transition: opacity 0.6s ease;
  animation: reveal-fallback 0s 3s forwards;
}

.js body.ready {
  opacity: 1;
}

img,
svg {
  display: block;
}

button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@keyframes reveal-fallback {
  to {
    opacity: 1;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .js body {
    transition: none;
  }
}
