/* Waitlist form.
 *
 * Built entirely from the tokens in site.css, so it follows Light Ocean into
 * dark mode with the rest of the page rather than staying stubbornly bright.
 */

.wl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 42px);
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

.wl-card h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3.6vw, 32px);
  line-height: 1.22;
  color: var(--ink);
  margin: 0 0 10px;
}
.wl-card .wl-sub {
  color: var(--stone);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto 24px;
  max-width: 48ch;
}

.wl-form { margin: 0; text-align: start; }

.wl-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 7px;
}

.wl-row { display: flex; gap: 10px; flex-wrap: wrap; }

.wl-input {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: 16px; /* under 16px iOS Safari zooms the page on focus */
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  -webkit-appearance: none;
  appearance: none;
}
.wl-input::placeholder { color: var(--stone); opacity: .7; }
.wl-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
}
.wl-input[aria-invalid="true"] { border-color: #c2405f; }

.wl-btn {
  flex: 0 0 auto;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--paper);
  background: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 13px 24px;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.wl-btn:hover:not(:disabled) { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); }
.wl-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.wl-btn:disabled { opacity: .6; cursor: default; transform: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wl-btn { color: #0c1c24; }
}

/* Never pre-ticked: pre-ticked marketing consent is not consent (GDPR Art. 4(11)). */
.wl-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--stone);
  cursor: pointer;
}
.wl-check input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.wl-fine {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--stone);
}

/* Off-screen rather than display:none — a form-filler skips hidden fields,
   which is precisely the behaviour this needs to catch. */
.wl-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wl-status { margin: 14px 0 0; font-size: 14.5px; line-height: 1.5; min-height: 1.2em; }
.wl-status[data-state="error"] { color: #c2405f; }
.wl-status[data-state="ok"] { color: var(--success); font-weight: 600; }
.wl-status[data-state="busy"] { color: var(--stone); }

/* On success the inputs go, the confirmation stays. */
.wl-form[data-done="true"] .wl-row,
.wl-form[data-done="true"] .wl-check,
.wl-form[data-done="true"] .wl-label,
.wl-form[data-done="true"] .wl-fine { display: none; }
.wl-form[data-done="true"] .wl-status { text-align: center; font-size: 16.5px; }

/* Once the button has wrapped under the field it should own the full width —
   a content-width button floating on one side reads as secondary. */
@media (max-width: 480px) {
  .wl-row { flex-direction: column; }
  .wl-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .wl-btn { transition: none; }
  .wl-btn:hover:not(:disabled) { transform: none; }
}
