:root {
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --cue: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.28);
  --cta: #ffffff;
  --cta-text: #111111;
  --cta-hover: #e8e8e8;
  --error: #ffb4b4;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  background: #1a1a1a;
  color: var(--ink);
  font-family: Montserrat, Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(255, 255, 255, 0.18);
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top))
    clamp(28px, 5vw, 80px)
    calc(32px + env(safe-area-inset-bottom))
    clamp(28px, 5.5vw, 88px);
}

.bg-video,
.vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bg-video {
  z-index: 0;
  object-fit: cover;
  object-position: 54% 48%;
  background: #2a2a2c;
}

.vignette {
  z-index: 0;
  background:
    radial-gradient(
      ellipse 72% 68% at 58% 42%,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0.42) 100%
    ),
    linear-gradient(
      90deg,
      rgba(8, 8, 8, 0.72) 0%,
      rgba(8, 8, 8, 0.28) 38%,
      rgba(8, 8, 8, 0.12) 62%,
      rgba(8, 8, 8, 0.35) 100%
    ),
    linear-gradient(
      180deg,
      rgba(8, 8, 8, 0.28) 0%,
      transparent 28%,
      rgba(8, 8, 8, 0.55) 100%
    );
}

.top,
.copy {
  position: relative;
  z-index: 1;
}

.wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  animation: fade 300ms ease both;
}

.copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 1 1 auto;
  width: min(100%, 640px);
  padding-top: 28px;
  gap: clamp(12px, 1.8vh, 22px);
}

.cue {
  color: var(--cue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  min-height: 0;
  margin: 0;
  transition: opacity 280ms ease;
}

.cue.is-on {
  opacity: 1;
}

h1 {
  max-width: 11em;
  font-size: clamp(34px, 4.2vw + 1.6vh, 72px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.96;
  animation: rise 450ms 80ms ease both;
}

.subhead {
  max-width: 34em;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 1.2vw + 0.6vh, 22px);
  font-weight: 500;
  line-height: 1.35;
  animation: rise 450ms 160ms ease both;
}

.apps {
  max-width: 40em;
  color: var(--muted);
  font-size: clamp(13px, 0.8vw + 0.45vh, 15px);
  font-weight: 400;
  line-height: 1.5;
  animation: rise 450ms 220ms ease both;
}

.signup,
.success {
  width: min(100%, 540px);
  animation: rise 450ms 280ms ease both;
  transition: opacity 240ms ease;
}

.signup.is-out {
  opacity: 0;
}

.signup[hidden] {
  display: none;
}

.form-label {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.form-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

input[type="email"],
button {
  height: 52px;
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  letter-spacing: -0.01em;
}

input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
  outline: none;
}

button {
  flex: 0 0 auto;
  padding: 0 18px;
  border: 0;
  background: var(--cta);
  color: var(--cta-text);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

button:hover {
  background: var(--cta-hover);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.form-status {
  min-height: 1.2em;
  margin-top: 8px;
  color: var(--error);
  font-size: 13px;
}

.success[hidden] {
  display: none;
}

.success.is-in {
  animation: fade 260ms ease both;
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.success-copy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 900px) {
  html,
  body {
    height: 100%;
  }

  .page {
    height: 100svh;
    height: 100dvh;
    overflow: hidden;
  }

  .copy {
    min-height: 0;
  }
}

@media (max-width: 899px) {
  html,
  body {
    overflow-y: auto;
  }

  .page {
    height: auto;
    min-height: 100svh;
    min-height: 100dvh;
    padding: calc(20px + env(safe-area-inset-top)) 20px
      calc(28px + env(safe-area-inset-bottom));
  }

  .wordmark {
    font-size: 13px;
    letter-spacing: 0.14em;
  }

  .copy {
    width: 100%;
    flex: 1 0 auto;
    justify-content: flex-end;
    padding-top: 24px;
    padding-bottom: 8px;
    gap: 14px;
  }

  h1 {
    max-width: none;
    font-size: clamp(30px, 8.4vw, 42px);
  }

  .subhead {
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .apps {
    font-size: 13px;
    line-height: 1.45;
  }

  .signup,
  .success {
    width: 100%;
    padding-bottom: 6px;
  }

  .form-row {
    flex-direction: column;
  }

  input[type="email"],
  button {
    width: 100%;
    height: 50px;
  }

  .vignette {
    background:
      radial-gradient(
        ellipse 90% 70% at 50% 38%,
        rgba(0, 0, 0, 0.12) 0%,
        rgba(0, 0, 0, 0.5) 100%
      ),
      linear-gradient(
        180deg,
        rgba(8, 8, 8, 0.45) 0%,
        rgba(8, 8, 8, 0.12) 28%,
        rgba(8, 8, 8, 0.78) 100%
      );
  }

  .bg-video {
    object-position: 50% 38%;
  }
}

@media (max-height: 760px) and (min-width: 900px) {
  .copy {
    gap: 10px;
  }

  h1 {
    font-size: clamp(32px, 3.6vw + 1.2vh, 54px);
  }

  input[type="email"],
  button {
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark,
  h1,
  .subhead,
  .apps,
  .signup,
  .success.is-in {
    animation: none;
  }

  .cue {
    display: none;
  }
}
