@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #1a73c7;
  --font: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  background: #08324f url("assets/waves-poster.jpg") center / cover no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(120, 186, 255, 0.35);
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: url("assets/waves-poster.jpg") center / cover no-repeat;
}

.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 40, 90, 0.16), rgba(8, 40, 90, 0.05) 40%, rgba(6, 28, 60, 0.12));
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
}

.copy {
  position: absolute;
  top: 11.5%;
  left: 38%;
  width: 22%;
  display: flex;
  flex-direction: column;
  text-align: center;
}

h1 {
  margin: 0 0 1.2rem;
  color: #fff;
  font-size: clamp(1.9rem, 2.7vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  text-shadow:
    0 2px 16px rgba(4, 18, 36, 0.55),
    0 1px 2px rgba(4, 18, 36, 0.45);
}

.notify {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.notify input,
.notify button {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.95rem;
  color: #fff;
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
}

.notify input {
  padding: 0.55rem 1rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.notify input::placeholder {
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
}

.notify input:focus {
  outline: none;
}

.notify input:focus-visible {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 199, 0.45);
}

.notify button {
  padding: 0 1.1rem;
  font-weight: 500;
  background: rgba(18, 102, 184, 0.62);
  border: 1px solid rgba(186, 220, 255, 0.9);
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(4, 18, 36, 0.35);
  transition: background 0.2s ease;
}

.notify button:hover {
  background: rgba(14, 86, 152, 0.86);
}

.notify button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.notify input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.22) inset;
}

.error {
  margin: 0.35rem 0 0;
  color: #fff;
  font-size: 0.8rem;
  text-shadow: 0 1px 6px rgba(4, 18, 36, 0.65);
}

.has-error input {
  border-color: rgba(255, 196, 190, 0.95);
}

.thanks {
  margin-top: 0.75rem;
}

.thanks p {
  margin: 0 auto;
  max-width: 24ch;
  color: #fff;
  font-size: 1rem;
  line-height: 1.45;
  text-shadow:
    0 2px 14px rgba(4, 18, 36, 0.55),
    0 1px 2px rgba(4, 18, 36, 0.45);
  outline: none;
}

.sound-toggle {
  position: fixed;
  z-index: 2;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
}

.sound-toggle svg {
  width: 20px;
  height: 20px;
}

.sound-toggle .icon-off {
  display: none;
}

.sound-toggle.is-muted .icon-on {
  display: none;
}

.sound-toggle.is-muted .icon-off {
  display: block;
}

.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.32);
}

.sound-toggle.is-pending {
  animation: sound-pulse 1.8s ease-in-out infinite;
}

.notify button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.sound-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 8px rgba(4, 18, 36, 0.6);
}

@media (max-width: 800px) {
  .copy {
    top: 12%;
    left: 50%;
    width: min(18.5rem, 78vw);
    transform: translateX(-50%);
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    margin-bottom: 1.45rem;
  }

  .notify {
    gap: 1.55rem;
  }

  .notify input,
  .notify button {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-video {
    display: none;
  }

  .notify button,
  .sound-toggle.is-pending {
    animation: none;
    transition: none;
  }
}

@keyframes sound-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
}
