:root {
  color-scheme: dark;
  --red: #d10f1c;
  --white: #f5f5f3;
  --muted: #a6a6a2;
  --black: #050505;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--black);
  overflow: hidden;
}

body {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: var(--white);
}

button {
  font: inherit;
}

.stage {
  position: relative;
  display: grid;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 47%, rgba(52, 52, 52, 0.2), transparent 46%),
    var(--black);
}

.stage::before,
.stage::after {
  position: absolute;
  z-index: 3;
  content: "";
  pointer-events: none;
}

.stage::before {
  inset: 0;
  opacity: 0.14;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: screen;
}

.stage::after {
  top: 0;
  left: clamp(1.25rem, 5vw, 5rem);
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(209, 15, 28, 0.75), transparent);
  opacity: 0.45;
}

.intro {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
  transition: opacity 1.1s ease, transform 1.7s cubic-bezier(0.2, 0.7, 0.2, 1), filter 1.1s ease;
}

.shade {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 44%, transparent 10%, rgba(5, 5, 5, 0.36) 58%, rgba(5, 5, 5, 0.9) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.08), rgba(5, 5, 5, 0.68));
  transition: opacity 1.1s ease;
}

.announcement {
  z-index: 2;
  place-self: center;
  width: min(86vw, 67rem);
  padding: 2rem;
  text-align: center;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.9s ease 0.15s, transform 0.9s cubic-bezier(0.2, 0.75, 0.2, 1) 0.15s;
}

.eyebrow {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(4.2rem, 13vw, 11rem);
  font-weight: 780;
  line-height: 0.75;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: clamp(1px, 0.12vw, 2px) var(--white);
}

.rule {
  width: min(16rem, 42vw);
  height: 0.25rem;
  margin: clamp(1.8rem, 4vh, 3rem) auto 1.1rem;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.85s cubic-bezier(0.2, 0.75, 0.2, 1) 0.65s;
}

.soon {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.sound {
  position: absolute;
  z-index: 5;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(5, 5, 5, 0.54);
  backdrop-filter: blur(0.7rem);
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.sound:hover,
.sound:focus-visible {
  color: var(--white);
  border-color: rgba(209, 15, 28, 0.9);
  background: rgba(22, 22, 22, 0.82);
}

.sound:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.sound svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.sound span {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

footer {
  position: absolute;
  z-index: 4;
  left: clamp(1.25rem, 5vw, 5rem);
  bottom: clamp(1.2rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.54);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  letter-spacing: 0.08em;
}

.signal {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 1rem rgba(209, 15, 28, 0.75);
}

.stage.is-ready .intro {
  opacity: 0.38;
  filter: saturate(0.72) brightness(0.62);
  transform: scale(1.035);
}

.stage.is-ready .shade,
.stage.is-ready .announcement {
  opacity: 1;
}

.stage.is-ready .announcement {
  transform: translateY(0);
}

.stage.is-ready .rule {
  transform: scaleX(1);
}

.stage.is-replaying .announcement,
.stage.is-replaying .shade {
  opacity: 0;
}

.stage.is-replaying .intro {
  opacity: 1;
  filter: none;
  transform: none;
}

@media (max-width: 42rem) {
  .announcement {
    width: 96vw;
    padding: 1rem 0.5rem;
  }

  h1 {
    font-size: clamp(3.75rem, 19vw, 5.5rem);
    line-height: 0.8;
  }

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

  .sound {
    justify-content: center;
    width: 2.9rem;
    padding: 0;
  }

  footer {
    right: 1.25rem;
    justify-content: center;
    text-align: center;
  }
}

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