/* /beta application form. Uses the waitlist tokens from styles.css. */

.lp-beta .hero {
  min-height: 0;
  padding-bottom: clamp(8px, 2vw, 20px);
}

.lp-beta .hero[hidden] {
  display: none !important;
}

.lp-beta .hero[hidden] + .beta-sec {
  padding-top: clamp(28px, 4vw, 56px);
}

.lp-beta .hero h1 {
  max-width: 12em;
}

.beta-sec {
  padding-top: 8px;
}

.beta-card,
.beta-thanks {
  width: min(100%, 720px);
  margin-inline: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
}

.beta-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: clamp(20px, 4vw, 36px);
  background: #fff;
  text-align: left;
}

.beta-field,
.beta-card fieldset {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.beta-field label,
.beta-card legend {
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.4;
  color: var(--ink);
  padding: 0;
}

.beta-optional {
  font-weight: 500;
  color: rgba(28, 19, 48, 0.55);
}

.beta-card input,
.beta-card select,
.beta-card textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(10, 37, 64, 0.16);
  background: #fff;
  color: var(--ink);
  font: 500 1rem/1.4 var(--font);
  padding: 14px 16px;
  outline: none;
  box-shadow: 0 10px 30px -22px rgba(43, 29, 67, 0.45);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.beta-card textarea {
  min-height: 120px;
  resize: vertical;
}

.beta-card select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brand) 50%),
    linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.beta-card input:focus,
.beta-card select:focus,
.beta-card textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(84, 57, 119, 0.14);
}

.beta-card input[aria-invalid="true"],
.beta-card select[aria-invalid="true"],
.beta-card textarea[aria-invalid="true"] {
  border-color: #b3261e;
}

.beta-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.beta-choice label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(84, 57, 119, 0.18);
  background: #fff;
  cursor: pointer;
  font-weight: 650;
  color: var(--brand);
}

.beta-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.beta-choice input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.beta-choice input:checked + span {
  color: #fff;
}

.beta-choice label:has(input:checked) {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.beta-err {
  min-height: 0;
  color: #b3261e;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.beta-err:empty {
  display: none;
}

.beta-alert {
  border-radius: 16px;
  background: #fdf1f1;
  color: #7a2222;
  padding: 12px 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
}

.beta-card[hidden],
.beta-thanks[hidden],
.beta-field[hidden],
.beta-alert[hidden] {
  display: none !important;
}

html:not(.js) #beta-form {
  display: none;
}

.beta-submit {
  width: 100%;
  margin-top: 4px;
}

.beta-submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.beta-note {
  margin: 0;
  text-align: center;
}

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

.beta-thanks {
  scroll-margin-top: 104px;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px);
  background: #eef7dc;
  border: 1px solid rgba(127, 166, 58, 0.4);
  text-align: center;
}

.beta-thanks h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  color: #2f4a0e;
}

.beta-thanks p {
  margin: 14px auto 22px;
  max-width: 36rem;
  color: #2f4a0e;
  font-weight: 500;
}

.beta-thanks .beta-home {
  color: #2f4a0e;
  font-weight: 650;
  text-underline-offset: 3px;
}

.beta-thanks .beta-home:hover {
  color: var(--brand);
}

@media (max-width: 420px) {
  .beta-choice {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-beta .rise {
    animation: none;
  }
}
