/* The home page in waitlist mode: one message, one field.
 *
 * Typographic on purpose. There is nothing about the product that may be
 * shown, so the page earns its polish from type, space and one restrained
 * glow rather than from imagery. Colours from tokens.css; the night theme
 * (the site's default) gets its own ground below.
 */

.waitlist {
  --wl-ground: var(--oa-surface, #ffffff);
  --wl-ink: var(--oa-ink, #12161f);
  --wl-muted: var(--oa-muted, #5b6474);
  --wl-line: var(--oa-line, #dfe3ea);
  --wl-field: #ffffff;
  --wl-accent: #6c63ff;
  --wl-accent-hover: #574fd6;

  box-sizing: border-box;
  min-height: calc(100vh - 140px);
  padding: clamp(24px, 5vh, 48px) 16px clamp(56px, 10vh, 112px);
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--wl-ground);
  color: var(--wl-ink);
}

.page-dark .waitlist {
  --wl-ground: var(--oa-stage, #0f1218);
  --wl-ink: #f3f5f9;
  --wl-muted: #9aa4b5;
  --wl-line: #262c39;
  --wl-field: #151a24;
}

/* The light and the grid come from .oa-stage (css/public/stage.css). */

.waitlist__hero {
  width: 100%;
  max-width: 640px;
  margin-top: clamp(32px, 10vh, 120px);
  text-align: center;
}

.waitlist__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px 14px;
  border: 1px solid var(--wl-line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wl-muted);
  background: color-mix(in srgb, var(--wl-ground) 80%, transparent);
}

.waitlist__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e0a42c;
  box-shadow: 0 0 0 0 rgba(224, 164, 44, 0.6);
  animation: wl-pulse 2.4s ease-out infinite;
}

@keyframes wl-pulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 164, 44, 0.55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(224, 164, 44, 0); }
}

.waitlist__title {
  margin: 0;
  font-family: var(--oa-font-heading);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--wl-ink);
  text-wrap: balance;
}

.waitlist__lede {
  max-width: 52ch;
  margin: 20px auto 0;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.6;
  color: var(--wl-muted);
  text-wrap: pretty;
}

/* One pill on wide screens, stacked on phones. */
.waitlist__form {
  display: flex;
  gap: 8px;
  max-width: 500px;
  margin: 36px auto 0;
  padding: 6px;
  border: 1px solid var(--wl-line);
  border-radius: 999px;
  background: var(--wl-field);
  box-shadow: 0 12px 40px rgba(10, 12, 20, 0.12);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.waitlist__form:focus-within {
  border-color: var(--wl-accent);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.18), 0 12px 40px rgba(10, 12, 20, 0.12);
}

.waitlist__input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--wl-ink);
}

.waitlist__input::placeholder { color: var(--wl-muted); opacity: 0.8; }
.waitlist__input:focus { outline: none; }
.waitlist__input[aria-invalid="true"] { color: #e5484d; }

.waitlist__button {
  flex: none;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--wl-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.waitlist__button:hover { background: var(--wl-accent-hover); }
.waitlist__button:active { transform: translateY(1px); }

.waitlist__button:focus-visible {
  outline: 3px solid rgba(108, 99, 255, 0.5);
  outline-offset: 2px;
}

.waitlist__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist__error {
  margin: 12px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e5484d;
}

.waitlist__note {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--wl-muted);
}

.waitlist__note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.waitlist__more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 760px;
  margin-top: clamp(56px, 12vh, 120px);
}

.waitlist__link {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--wl-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--wl-ground) 85%, transparent);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.waitlist__link:hover {
  border-color: var(--wl-accent);
  transform: translateY(-1px);
}

.waitlist__link span {
  font-size: 0.8rem;
  color: var(--wl-muted);
}

.waitlist__link strong {
  font-size: 0.98rem;
  color: var(--wl-ink);
}

@media (max-width: 560px) {
  .waitlist__form {
    flex-direction: column;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .waitlist__form:focus-within { box-shadow: none; }

  .waitlist__input {
    min-height: 52px;
    border: 1px solid var(--wl-line);
    background: var(--wl-field);
  }

  .waitlist__input:focus {
    border-color: var(--wl-accent);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.18);
  }

  .waitlist__button { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist__dot { animation: none; }
  .waitlist__link,
  .waitlist__button { transition: none; }
}

/* Under the switcher, the same: one gap, not two stacked. */
.audience-chooser + .waitlist {
  padding-top: 0;
}

.audience-chooser + .waitlist .waitlist__hero {
  margin-top: clamp(16px, 5vh, 56px);
}
