/* CF-484: the alpha interest list.
 *
 * A dedicated stylesheet rather than an addition to nova.css, for the same
 * reason support-form.css is separate: nova.css is the site's shared design
 * and this is one page's control set. Nothing here invents a colour — every
 * value is a token already declared in nova.css.
 */

.alpha-page {
  padding-top: clamp(112px, 13vw, 160px);
  padding-bottom: clamp(64px, 9vw, 104px);
}

/* ---------- Intro ---------- */

.alpha-intro {
  max-width: 700px;
  margin-inline: auto;
  padding-bottom: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
}

.alpha-intro .overline { display: inline-flex; align-items: center; }

.alpha-intro h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 5.4rem);
}

.alpha-lede {
  max-width: 560px;
  margin: 1.4rem auto 0;
  color: #d5e1ed;
  font-size: clamp(.96rem, 1.25vw, 1.1rem);
  line-height: 1.65;
}

/* Gated by a threshold in alpha.js: absent from the DOM's visible state
 * (the [hidden] attribute) until the count clears it, so a small number is
 * never shown at all. */
.alpha-tally {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 1.6rem 0 0;
  padding: .5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* The [hidden] attribute is how alpha.js gates this on TALLY_THRESHOLD, and
 * the browser's default UA rule for it is a low-specificity `display: none`
 * that the `display: inline-flex` above silently wins over. Without this, the
 * tally renders "0 commanders waiting" on every load regardless of the real
 * count -- exactly the small-number-undermines-the-pitch failure this element
 * exists to avoid. */
.alpha-tally[hidden] {
  display: none;
}

.alpha-tally strong {
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---------- Form section ---------- */

.alpha-form-section {
  max-width: 560px;
}

.alpha-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 22px;
  margin: 0 0 1.4em;
}

.alpha-form .field {
  display: block;
  margin: 0 0 18px;
}

/* :not(.field-consent) because that label also carries the base .field
 * class, for the 18px bottom margin every field shares -- without the
 * exclusion this label styling (gold, bold, uppercase) would win over
 * .field-consent span below by specificity and turn the consent sentence
 * into what reads as a form-field caption. */
.alpha-form .field:not(.field-consent) > span {
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 7px;
}

.alpha-form input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.alpha-form input:focus-visible,
.alpha-form button:focus-visible,
.alpha-form .platform-option:focus-within {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.alpha-form [aria-invalid="true"] {
  border-color: var(--gold-mid);
}

/* ---------- Platform ---------- */

.alpha-form .field-group {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.alpha-form .field-group legend {
  padding: 0;
  margin: 0 0 7px;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
}

.platform-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.platform-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--void);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}

.platform-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  flex: 0 0 auto;
}

.platform-option.is-selected {
  border-color: var(--gold-mid);
  background: rgba(217, 168, 62, .12);
}

/* A required radio group has no single element to mark aria-invalid, so the
 * fieldset itself carries the flag and the border responds. */
.field-group[aria-invalid="true"] .platform-option {
  border-color: var(--gold-mid);
}

/* ---------- Consent ---------- */

.field-consent {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 0 0 18px;
}

.field-consent input {
  /* A checkbox this small fails the 44px target on its own, so the label
   * around it carries the padding that makes the whole row tappable. */
  width: 20px;
  height: 20px;
  margin-top: .15rem;
  flex: 0 0 auto;
  accent-color: var(--gold);
}

.field-consent span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.field-consent:has(input[aria-invalid="true"]) span { color: var(--gold-mid); }

.alpha-form button {
  min-height: 48px;
  width: 100%;
  padding: 0 26px;
  font-family: var(--sans);
  font-size: .86rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--void);
  background: var(--gold);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.alpha-form button[disabled] {
  opacity: .55;
  cursor: default;
}

/* ---------- Result ---------- */

.alpha-form .result {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 7px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.5;
}

.alpha-form .result:empty { display: none; }
.alpha-form .result.is-ok { border-left: 3px solid var(--cyan); }
.alpha-form .result.is-error { border-left: 3px solid var(--gold-mid); }

.alpha-note {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.6;
}
.alpha-note a { color: var(--cyan); text-underline-offset: 3px; }
.alpha-note a:hover { color: var(--gold); }

/* ---------- The honeypot ----------
 *
 * Off-screen rather than `display: none`: a bot that reads computed styles
 * skips hidden fields, and one that fills this in has told us what it is.
 * Kept out of the tab order and hidden from assistive technology so no
 * person ever meets it. */
.alpha-form .trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .alpha-form button { transition: opacity .2s ease; }
}

@media (max-width: 480px) {
  .platform-options { grid-template-columns: 1fr; }
}
