:root {
  color-scheme: dark;
  --bg: #050508;
  --text: #f8f2f5;
  --soft: #cfc4ca;
  --dim: #7f747b;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 86, 128, 0.08), transparent 34%),
    radial-gradient(circle at 50% 110%, rgba(132, 107, 255, 0.05), transparent 42%),
    linear-gradient(180deg, #08080d 0%, #050508 58%, #030305 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration-color: rgba(248, 242, 245, 0.32);
  text-underline-offset: 0.28em;
}

.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: end center;
  padding: 0 24px 12vh;
  pointer-events: none;
}

.caption {
  width: min(100%, 520px);
  text-align: center;
  opacity: 0.94;
  transform: translate3d(var(--shift-x, 0), var(--shift-y, 0), 0);
  transition: transform 220ms ease-out;
}

.caption h1,
.caption p {
  margin: 0;
}

.caption h1 {
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 520;
  line-height: 1.2;
}

.caption p {
  margin-top: 0.62rem;
  color: var(--soft);
  font-size: 0.88rem;
  font-weight: 390;
  line-height: 1.6;
}

.caption-static {
  pointer-events: auto;
}

.caption-static h1 {
  font-size: 2.2rem;
}

.sound-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(248, 242, 245, 0.14);
  border-radius: 50%;
  background: rgba(12, 10, 15, 0.38);
  color: var(--text);
  cursor: pointer;
  opacity: 0.78;
  backdrop-filter: blur(16px);
  transition:
    opacity 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.sound-toggle:hover {
  opacity: 1;
  border-color: rgba(255, 143, 170, 0.34);
  background: rgba(22, 14, 22, 0.54);
}

.sound-toggle:focus-visible {
  outline: 2px solid rgba(255, 169, 178, 0.62);
  outline-offset: 4px;
}

.sound-toggle[aria-pressed="true"] {
  border-color: rgba(255, 143, 170, 0.42);
  background: rgba(32, 15, 25, 0.58);
}

.sound-toggle__bars {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.sound-toggle__bars span {
  width: 2px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.56;
  transform-origin: center;
}

.sound-toggle__bars span:nth-child(2) {
  height: 13px;
  opacity: 0.82;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars span {
  animation: soundDrift 1.8s ease-in-out infinite;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars span:nth-child(2) {
  animation-delay: -0.42s;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars span:nth-child(3) {
  animation-delay: -0.88s;
}

@keyframes soundDrift {
  0%,
  100% {
    transform: scaleY(0.62);
    opacity: 0.5;
  }

  50% {
    transform: scaleY(1.12);
    opacity: 0.96;
  }
}

@media (max-width: 700px) {
  .page {
    padding-bottom: 11vh;
  }

  .caption h1 {
    font-size: 1.08rem;
  }

  .caption p {
    font-size: 0.82rem;
  }

  .sound-toggle {
    right: 16px;
    bottom: 16px;
  }
}

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

  .sound-toggle__bars span {
    animation: none !important;
  }
}
