* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: #000;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Bouncing logo: separate x and y animations with unrelated durations
   give the diagonal path, and each wall hit steps the hue round */
.bounce-stage {
  position: fixed;
  inset: 0;
  container-type: size;
}

.bounce-x {
  width: clamp(140px, 30vw, 260px);
  animation:
    bounce-x 7.3s linear infinite alternate,
    hue-step 36.5s steps(5) infinite;
}

.bounce-y {
  display: block;
  width: 100%;
  height: auto;
  animation:
    bounce-y 4.1s linear infinite alternate,
    hue-step 28.7s steps(7) infinite;
}

@keyframes bounce-x {
  to { transform: translateX(calc(100cqw - 100%)); }
}

@keyframes bounce-y {
  to { transform: translateY(calc(100cqh - 100%)); }
}

@keyframes hue-step {
  to { filter: hue-rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bounce-x,
  .bounce-y {
    animation: none;
  }
}
