:root {
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.76);
  --text-faint: rgba(255, 255, 255, 0.5);
  --field-bg: rgba(10, 10, 10, 0.68);
  --field-bg-focus: rgba(16, 16, 16, 0.82);
  --field-shadow:
    0 18px 52px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  --success: #9af2c2;
  --error: #ffb3b3;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #050505;
  color: var(--text);
  font-family: "ABC Diatype", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body {
  min-height: 100svh;
  overscroll-behavior: none;
  touch-action: manipulation;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.waitlist-page {
  position: relative;
  width: 100%;
  min-height: 100svh;
  isolation: isolate;
}

.waitlist-page::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: min(46svh, 440px);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.24) 32%, rgba(5, 5, 5, 0.6) 76%, rgba(5, 5, 5, 0.74) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.54) 0%, rgba(0, 0, 0, 0) 66%);
  backdrop-filter: blur(18px) saturate(1.04);
  -webkit-backdrop-filter: blur(18px) saturate(1.04);
  mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 28%, black 100%);
}

.video-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  overflow: hidden;
  background: #050505;
}

.video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.08) 0%, rgba(5, 5, 5, 0.18) 48%, rgba(5, 5, 5, 0.78) 100%),
    linear-gradient(90deg, rgba(5, 5, 5, 0.28) 0%, rgba(5, 5, 5, 0) 28%, rgba(5, 5, 5, 0) 72%, rgba(5, 5, 5, 0.28) 100%);
}

.loop-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  background: #050505;
  opacity: 0;
  visibility: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition-property: opacity;
  transition-duration: 650ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
  will-change: opacity;
}

@media (min-width: 760px) and (orientation: landscape) {
  .loop-video {
    object-fit: contain;
  }
}

.loop-video.is-active {
  opacity: 1;
  visibility: visible;
}

.loop-video.is-fading-out {
  visibility: visible;
}

.signup-dock {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 3;
  width: min(680px, calc(100% - 32px));
  display: grid;
  justify-items: center;
  gap: 14px;
  transform: translateX(-50%);
  text-align: center;
}

.landing-title {
  width: min(100%, 620px);
  margin: 0;
  color: var(--text);
  font-size: 40px;
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0;
  text-wrap: balance;
}

.landing-subtitle {
  width: min(100%, 460px);
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: 0;
  text-wrap: pretty;
}

.waitlist-form {
  width: min(100%, 520px);
  margin-top: 10px;
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.email-field {
  min-height: 58px;
  width: 100%;
  padding: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  background: var(--field-bg);
  box-shadow: var(--field-shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition-property: background-color, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.email-field:focus-within {
  background: var(--field-bg-focus);
  box-shadow:
    0 20px 58px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.waitlist-input {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 0 16px 0 18px;
  border: 0;
  border-radius: 999px;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0;
}

.waitlist-input::placeholder {
  color: var(--text-faint);
}

.waitlist-button {
  min-width: 0;
  width: 132px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #050505;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  transition-property: opacity, transform, background-color;
  transition-duration: 180ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.waitlist-button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.waitlist-button:active {
  transform: scale(0.96);
}

.waitlist-button:disabled {
  cursor: default;
  opacity: 0.62;
  transform: none;
}

.form-feedback {
  min-height: 18px;
  margin: 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
}

.form-feedback[data-tone="success"] {
  color: var(--success);
}

.form-feedback[data-tone="error"] {
  color: var(--error);
}

.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;
}

@media (min-width: 760px) {
  .signup-dock {
    bottom: max(34px, env(safe-area-inset-bottom));
    gap: 16px;
  }

  .landing-title {
    font-size: 64px;
  }

  .landing-subtitle {
    font-size: 17px;
  }

  .waitlist-form {
    margin-top: 12px;
  }
}

@media (min-width: 1180px) {
  .signup-dock {
    bottom: max(42px, env(safe-area-inset-bottom));
  }

  .landing-title {
    font-size: 78px;
  }
}

@media (max-width: 380px) {
  .signup-dock {
    width: min(100% - 24px, 680px);
    gap: 12px;
  }

  .landing-title {
    font-size: 36px;
  }

  .landing-subtitle {
    font-size: 14px;
  }

  .waitlist-form {
    margin-top: 8px;
  }

  .email-field {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .waitlist-button {
    width: 112px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loop-video,
  .email-field,
  .waitlist-button {
    transition-duration: 1ms;
  }
}
