/* ==========================================================================
   vixxxen.ai/apply/, the AI OFM Team application (specs/ofm-team-apply.md).
   Markup: apply/index.html. The page wears the homepage's look: it loads
   css/home-team.css first (nav, buttons, footer, the case-study card, the
   "Limited spots" pill and every colour variable come from there) and adds
   only what a form needs here. Behaviour: shared/apply-page.js.
   ========================================================================== */

.hm .hm-apply,
.hm .hm-apply-form {
  max-width: 800px;
}

.hm .hm-apply {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 72px;
  padding-bottom: 32px;
}

.hm .hm-apply h1 {
  font-family: var(--hm-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.hm .hm-apply__spots {
  display: flex;
}

.hm-apply__points {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 19px;
  line-height: 1.5;
  color: var(--hm-muted);
}

.hm-apply__points li {
  position: relative;
  padding-left: 30px;
}

.hm-apply__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hm-accent);
}

.hm .hm-apply__case {
  align-self: stretch;
  margin-top: 8px;
}

.hm .hm-apply__case .hm-case__title {
  font-size: 22px;
}

.hm .hm-apply-form {
  --hm-err: #ff8fa6;
  padding-top: 16px;
  padding-bottom: 96px;
}

.hm .hm-card {
  padding: 32px;
  border-radius: 20px;
  background: var(--hm-card);
  border: 1px solid var(--hm-card-line);
}

/* ---- The form ---------------------------------------------------------- */

.hm .hm-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hm .hm-form[hidden],
.hm .hm-thanks[hidden],
.hm .hm-field__error[hidden],
.hm .hm-form__error[hidden] {
  display: none;
}

.hm .hm-form__title {
  font-family: var(--hm-display);
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

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

.hm .hm-field__label {
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--hm-text);
}

.hm .hm-field__optional {
  font-weight: 400;
  color: var(--hm-dim);
}

.hm .hm-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--hm-outline);
  border-radius: 12px;
  background: var(--hm-bg);
  color: var(--hm-text);
  font-family: inherit;
  /* 16px keeps iPhone Safari from zooming the page when a field gets focus. */
  font-size: 16px;
  line-height: 1.4;
}

.hm .hm-input--area {
  min-height: 150px;
  resize: vertical;
}

.hm .hm-input:focus-visible {
  outline: 2px solid var(--hm-focus);
  outline-offset: 2px;
  border-color: var(--hm-focus);
}

.hm .hm-input[aria-invalid="true"] {
  border-color: var(--hm-err);
}

.hm .hm-field__count {
  font-size: 13px;
  color: var(--hm-dim);
  text-align: right;
}

.hm .hm-field__count.is-over {
  color: var(--hm-err);
}

.hm .hm-field__error,
.hm .hm-form__error {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--hm-err);
}

/* ---- Radios and the 18+ box: the whole pill is the tap target ----------- */

.hm .hm-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hm .hm-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--hm-outline);
  border-radius: 12px;
  background: var(--hm-bg);
  color: var(--hm-text);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.hm .hm-choice:has(input:checked) {
  border-color: var(--hm-eyebrow);
}

.hm .hm-choice--check {
  align-self: flex-start;
}

/* The real input covers the pill, so the control itself is 48px tall. */
.hm .hm-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.hm .hm-choice__mark {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid var(--hm-outline);
  border-radius: 50%;
}

.hm .hm-choice--check .hm-choice__mark {
  border-radius: 6px;
}

.hm .hm-choice input:checked + .hm-choice__mark {
  border-color: var(--hm-eyebrow);
  background: var(--hm-accent);
}

.hm .hm-choice input:checked + .hm-choice__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
}

.hm .hm-choice--check input:checked + .hm-choice__mark::after {
  width: 6px;
  height: 11px;
  border-radius: 0;
  background: none;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: translate(-50%, -58%) rotate(45deg);
}

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

.hm .hm-field[data-invalid="true"] .hm-choice {
  border-color: var(--hm-err);
}

/* ---- The honeypot: off-screen, never display:none (bots skip those) ----- */

.hm .hm-field--trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Send and thanks ---------------------------------------------------- */

.hm .hm-form__submit {
  align-self: flex-start;
  min-width: 240px;
}

.hm .hm-form__submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.hm .hm-form__fine {
  margin-top: -8px;
  font-size: 14px;
  color: var(--hm-dim);
}

.hm .hm-thanks {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 8px 0;
}

.hm .hm-thanks:focus {
  outline: none;
}

.hm .hm-thanks__title {
  font-family: var(--hm-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

/* ---- Phone ------------------------------------------------------------- */

@media (max-width: 760px) {
  .hm .hm-apply {
    padding-top: 28px;
    padding-bottom: 20px;
    gap: 16px;
  }

  .hm .hm-apply h1 {
    font-size: 38px;
  }

  .hm-apply__points {
    font-size: 17px;
  }

  .hm .hm-apply__case .hm-case__title {
    font-size: 20px;
  }

  .hm .hm-apply-form {
    padding-bottom: 64px;
  }

  .hm .hm-card {
    padding: 22px 18px;
  }

  .hm .hm-form {
    gap: 22px;
  }

  .hm .hm-form__title {
    font-size: 24px;
  }

  .hm .hm-choices {
    flex-direction: column;
  }

  .hm .hm-choice {
    width: 100%;
  }

  .hm .hm-choice--check {
    align-self: stretch;
  }

  .hm .hm-form__submit {
    align-self: stretch;
    width: 100%;
    min-width: 0;
  }
}
