:root {
  color-scheme: dark;
  --bg: #080713;
  --ink: #fff7ff;
  --muted: rgba(255, 247, 255, 0.68);
  --pink: #ff4fd8;
  --blue: #55d6ff;
  --violet: #9d68ff;
  --amber: #ffd28a;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 105%, rgba(255, 79, 216, 0.22), transparent 34%),
    radial-gradient(circle at 18% 20%, rgba(85, 214, 255, 0.18), transparent 31%),
    linear-gradient(135deg, #05040b 0%, #100b22 44%, #070815 100%);
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: -20%;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.055) 49%, transparent 56%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 86px);
  filter: blur(0.2px);
  opacity: 0.5;
  animation: drift 18s ease-in-out infinite alternate;
}

body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.58) 100%);
  background-size: 100% 3px, auto;
  mix-blend-mode: screen;
  opacity: 0.16;
}

.sound-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.72;
}

.stage {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
}

.glow {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(30px);
  opacity: 0.72;
  transform: translate3d(0, 0, 0);
}

.glow-a {
  width: 42vmin;
  height: 42vmin;
  left: -10vmin;
  top: 15vmin;
  background: rgba(85, 214, 255, 0.28);
  animation: breathe 7s ease-in-out infinite;
}

.glow-b {
  width: 52vmin;
  height: 52vmin;
  right: -16vmin;
  bottom: 11vmin;
  background: rgba(255, 79, 216, 0.28);
  animation: breathe 8.4s ease-in-out infinite reverse;
}

.glow-c {
  width: 30vmin;
  height: 30vmin;
  left: 50%;
  top: 58%;
  background: rgba(157, 104, 255, 0.22);
  animation: pulse 3.6s ease-in-out infinite;
}

.message {
  position: relative;
  z-index: 2;
  width: min(960px, 100%);
  text-align: center;
  text-wrap: balance;
}

.message::before {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: -1;
  width: min(720px, 92vw);
  height: min(220px, 28vh);
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 36px rgba(85, 214, 255, 0.14),
    inset 0 0 40px rgba(255, 79, 216, 0.08);
  transform: translate(-50%, -48%) rotate(-4deg);
  opacity: 0.78;
}

.overline,
.subtitle {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.overline {
  margin-bottom: 16px;
  font-size: clamp(13px, 2.5vw, 16px);
}

h1 {
  margin: 0;
  font-size: clamp(54px, 12vw, 148px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow:
    0 0 15px rgba(255, 79, 216, 0.65),
    0 0 42px rgba(85, 214, 255, 0.45),
    0 0 90px rgba(157, 104, 255, 0.38);
}

.subtitle {
  margin-top: 20px;
  font-size: clamp(14px, 3.3vw, 19px);
}

.ambience-button {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: calc(100vw - 32px);
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 7, 19, 0.62);
  box-shadow:
    0 0 24px rgba(85, 214, 255, 0.16),
    inset 0 0 18px rgba(255, 255, 255, 0.04);
  color: rgba(255, 247, 255, 0.86);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dot {
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 14px var(--pink);
}

.ambience-button[aria-pressed="true"] .dot {
  background: var(--blue);
  box-shadow: 0 0 16px var(--blue);
  animation: beat 1.8s ease-in-out infinite;
}

@keyframes breathe {
  0% {
    transform: scale(0.92) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.12) translate3d(4vmin, -3vmin, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 0.74;
    transform: translate(-50%, -50%) scale(1.14);
  }
}

@keyframes drift {
  0% {
    transform: translateX(-2%) rotate(0deg);
  }
  100% {
    transform: translateX(2%) rotate(1deg);
  }
}

@keyframes beat {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.42);
  }
}

@media (max-width: 620px) {
  .stage {
    padding-inline: 18px;
  }

  h1 {
    font-size: clamp(56px, 17vw, 82px);
    line-height: 0.95;
  }

  .message::before {
    width: 96vw;
    height: 170px;
  }

  .subtitle {
    margin-top: 18px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 50px;
  }

  .ambience-button {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
