/* ============================================================
   waitlist.css — the capture dialog
   Reuses the page tokens so it reads as part of the rig, not a
   bolted-on form. Buttons reuse .btn from styles.css.
   ============================================================ */

.cap {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(520px, calc(100vw - 32px));
  width: 100%;
  color: var(--text);

  /* --muted itself was raised to an AA-passing tone in the palette swap,
     so this local override now just points at it. Kept as a named hook. */
  --cap-dim: var(--muted);
}
.cap::backdrop {
  background: rgba(5, 5, 6, 0.78);
  backdrop-filter: blur(3px);
}

.cap__box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 32px 28px;
  font-family: var(--sans);
  /* the accent hairline that marks every "live" surface on this site */
  box-shadow: inset 0 2px 0 0 var(--accent), var(--shadow-lg);
}

.cap__x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
  color: var(--text-2);
  background: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.cap__x:hover { color: var(--text); background: var(--surface-2); }
.cap__x:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cap__kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.cap__title {
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 27px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.cap__lede {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0 0 22px;
}

.cap__label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cap-dim);
  margin-bottom: 7px;
}

.cap__input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  padding: 13px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cap__input::placeholder { color: var(--cap-dim); }
.cap__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.cap__textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
.cap__notewrap { margin-top: 16px; }

/* honeypot — out of view, out of the a11y tree, out of the tab order */
.cap__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cap__err {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--red);
  background: var(--red-tint);
  border-left: 2px solid var(--red);
  padding: 10px 12px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.cap__err a { color: var(--red); text-decoration: underline; }

.cap__submit { width: 100%; margin-top: 18px; justify-content: center; }
.cap__submit[disabled] { opacity: 0.6; cursor: progress; }

.cap__fine {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--cap-dim);
  text-align: center;
}

.cap__done { text-align: center; padding: 14px 0 6px; }
.cap__tick {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 22px;
  color: var(--green);
  background: var(--green-tint);
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
}
.cap__done .cap__lede { margin-bottom: 20px; }

/* The two B2B cards are flex rows — push their CTA to the trailing edge
   and stop it collapsing when the copy runs long. */
.b2b__cta { margin-left: auto; flex-shrink: 0; white-space: nowrap; }
/* Collapse the row and wrap the card at the SAME width. These used to be
   560px and 900px respectively, so 561-900px rendered two cramped cards with
   the CTA orphaned on its own line and the pair vertically misaligned. */
@media (max-width: 900px) {
  .b2b-row { grid-template-columns: 1fr; }
  .b2b { flex-wrap: wrap; }
  .b2b__cta { margin-left: 0; }
}

@media (max-width: 480px) {
  .cap__box { padding: 30px 20px 24px; }
}

/* The dialog animates in unless the visitor asked us not to. */
@media (prefers-reduced-motion: no-preference) {
  .cap[open] .cap__box { animation: capIn 0.22s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
  @keyframes capIn {
    from { opacity: 0; transform: translateY(10px) scale(0.985); }
    to   { opacity: 1; transform: none; }
  }
}
