/* ═══════════════════════════════════════════════════════════════
   WAITLIST FORM (hero + footer)
   Built on the tokens in style.css. The hero sits on the light cream
   background, the footer variant (.waitlist-form--dark) on dark blue.
   ═══════════════════════════════════════════════════════════════ */

.waitlist-form {
  --wl-text: var(--text-color);
  --wl-muted: var(--text-light);
  --wl-field-bg: var(--bg-secondary);
  --wl-field-border: rgba(6, 41, 67, 0.16);
  --wl-pill-bg: rgba(6, 41, 67, 0.06);
  --wl-pill-active-bg: var(--dark-blue);
  --wl-pill-active-text: var(--bg-main);
  --wl-error: #C7362A;
  --wl-focus: rgba(250, 108, 76, 0.35);

  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--wl-text);
  position: relative;
  z-index: 1;
}

.waitlist-form--dark {
  --wl-text: var(--bg-main);
  --wl-muted: rgba(245, 240, 221, 0.7);
  --wl-field-bg: rgba(245, 240, 221, 0.08);
  --wl-field-border: rgba(245, 240, 221, 0.22);
  --wl-pill-bg: rgba(245, 240, 221, 0.08);
  --wl-pill-active-bg: var(--bg-main);
  --wl-pill-active-text: var(--dark-blue);
  --wl-error: #FF9C86;
  margin: 0 auto;
  text-align: left;
}

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

/* ── Email + button row ──────────────────────────────────────── */
.waitlist-row {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--wl-field-bg);
  border: 1.5px solid var(--wl-field-border);
  border-radius: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.waitlist-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--wl-focus);
}

.waitlist-email {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS Safari from zooming in */
  color: var(--wl-text);
  outline: none;
}

.waitlist-email::placeholder {
  color: var(--wl-muted);
  opacity: 0.8;
}

.waitlist-email[aria-invalid="true"] {
  color: var(--wl-error);
}

.waitlist-submit {
  flex-shrink: 0;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.waitlist-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(250, 108, 76, 0.4);
}

.waitlist-submit:active {
  transform: scale(0.97);
}

.waitlist-submit:focus-visible {
  outline: 3px solid var(--wl-focus);
  outline-offset: 2px;
}

.waitlist-submit:disabled {
  opacity: 0.65;
  cursor: progress;
  transform: none;
  box-shadow: none;
}

/* ── Platform pills ──────────────────────────────────────────── */
.waitlist-platform {
  border: 0;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.waitlist-platform legend {
  float: left; /* lets the legend sit inline with the pills */
  margin-right: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--wl-muted);
}

.waitlist-pill {
  position: relative;
  cursor: pointer;
}

.waitlist-pill input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.waitlist-pill span {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--wl-pill-bg);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.waitlist-pill input:checked + span {
  background: var(--wl-pill-active-bg);
  color: var(--wl-pill-active-text);
}

.waitlist-pill input:focus-visible + span {
  outline: 3px solid var(--wl-focus);
  outline-offset: 2px;
}

/* ── Beta checkbox ───────────────────────────────────────────── */
.waitlist-beta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  width: fit-content;
}

.waitlist-beta input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Small print, status, honeypot ───────────────────────────── */
.waitlist-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--wl-muted);
  margin: 0;
}

.waitlist-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.waitlist-status {
  min-height: 1.2em;
  margin: -6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--wl-muted);
}

.waitlist-status:empty {
  display: none;
}

.waitlist-status.is-error {
  color: var(--wl-error);
}

.waitlist-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ── Success state ───────────────────────────────────────────── */
.waitlist-success {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(0, 202, 133, 0.12);
  border: 1.5px solid rgba(0, 202, 133, 0.35);
}

.waitlist-success[hidden] {
  display: none;
}

.waitlist-success-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  outline: none;
}

.waitlist-success p {
  margin: 0;
  font-size: 14px;
  color: var(--wl-muted);
}

.waitlist-again {
  margin-top: 10px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.waitlist-form.is-done > :not(.waitlist-success) {
  display: none;
}

/* ── Layout tweaks ───────────────────────────────────────────── */
/* Centered layouts: the footer always, the hero once it stacks. */
.waitlist-form--dark .waitlist-platform {
  justify-content: center;
}

.waitlist-form--dark .waitlist-beta {
  margin: 0 auto;
}

.waitlist-form--dark .waitlist-note,
.waitlist-form--dark .waitlist-status,
.waitlist-form--dark .waitlist-success {
  text-align: center;
}

@media (min-width: 969px) {
  .hero-left .waitlist-form {
    text-align: left;
  }
}

@media (max-width: 968px) {
  .hero-left .waitlist-form {
    margin: 0 auto;
  }

  .hero-left .waitlist-platform {
    justify-content: center;
  }

  .hero-left .waitlist-beta {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .waitlist-row {
    flex-direction: column;
  }

  .waitlist-submit {
    width: 100%;
  }
}
