/* ============================================================
   DRIVER APPLICATION  (/apply)
   One short form, built for a thumb. Rides on core.css + home.css.
   ============================================================ */
.ap-head {
  padding-top: calc(var(--nav-h) + clamp(36px, 6vw, 76px));
  padding-bottom: clamp(48px, 7vw, 104px);
  background:
    radial-gradient(60% 70% at 85% 10%, rgba(22, 199, 222, 0.10), transparent 64%),
    var(--ink-050);
}
.ap-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-areas: "intro form" "more form";
  grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: 28px;
  align-items: start;
}
.ap-intro { grid-area: intro; }
.ap-more { grid-area: more; }
.ap-formwrap { grid-area: form; }
.ap-pitch { display: grid; gap: 22px; justify-items: start; }
.ap-pitch .display { font-size: clamp(2.75rem, 6.4vw, 5.25rem); }
.ap-pitch .display em { font-style: normal; color: var(--accent); }
.ap-facts { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.ap-facts div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 3px; }
.ap-facts div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.ap-facts small { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fog-100); }
.ap-facts b { font-size: 1.0625rem; font-weight: 800; letter-spacing: -0.01em; }
.ap-call { font-size: 0.9375rem; color: var(--fog-200); }
.ap-call a { color: var(--accent); font-weight: 700; }
.ap-photo { width: 100%; aspect-ratio: 16 / 10; }
.ap-photo img { object-position: 50% 58%; }
@media (max-width: 900px) {
  .ap-grid { grid-template-columns: 1fr; grid-template-areas: "intro" "form" "more"; grid-template-rows: auto; }
  .ap-photo { display: none; }
}

/* ---------- The form ---------- */
.ap-form {
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, var(--ink-200), var(--ink-050) 70%);
  padding: clamp(22px, 3.4vw, 40px);
  display: grid;
  gap: 22px;
}
.ap-form__top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ap-form__top h2 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.025em; text-transform: uppercase; line-height: 1; }
.ap-form__top span { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fog-100); }
.ap-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .ap-row { grid-template-columns: 1fr; } }

/* Labels here are sentence case and readable at arm's length. */
.ap-form .field > label,
.ap-form legend {
  font-family: var(--f-display); font-size: 0.9375rem; font-weight: 700;
  letter-spacing: 0; text-transform: none; color: var(--paper);
}
.ap-form .field > label i, .ap-form legend i { font-style: normal; font-weight: 500; color: var(--fog-100); }
.ap-form .field input, .ap-form .field textarea { font-size: 1.0625rem; padding: 15px 16px; }
.ap-form .field textarea { min-height: 96px; }
.ap-form .field small { color: var(--fog-200); }
.ap-form .field [data-err] { color: #ff9b7a; font-size: 0.8125rem; }
.ap-form .field[data-invalid="true"] input { border-color: #ff9b7a; }

fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--ink-050);
  font-weight: 700; font-size: 0.9375rem; color: var(--fog-300);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform 0.12s var(--ease);
  user-select: none;
}
@media (hover: hover) and (pointer: fine) { .pill:hover span { border-color: var(--line-3); color: var(--paper); } }
.pill input:active + span { transform: scale(0.97); }
.pill input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
fieldset.field[data-invalid="true"] .pill span { border-color: rgba(255, 155, 122, 0.6); }

.ap-ref { border-top: 1px solid var(--line); padding-top: 22px; }
.ap-consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 0.9375rem; color: var(--fog-200); cursor: pointer; }
.ap-consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.ap-consent[data-invalid="true"] { color: #ffb49b; }
.ap-submit { display: grid; gap: 12px; justify-items: start; }
.ap-submit .btn { min-height: 54px; padding-inline: 30px; font-size: 0.9375rem; }
.ap-submit .btn[disabled] { opacity: 0.6; cursor: progress; }
.ap-fine { font-size: 0.8125rem; color: var(--fog-100); line-height: 1.55; }

/* Sent state replaces the form, same box. */
.ap-done { display: grid; gap: 16px; justify-items: start; }
.ap-done[hidden] { display: none; }
.ap-done__tick { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-wash); border: 1px solid rgba(169, 139, 255, 0.5); color: var(--violet-soft); }
.ap-done__tick svg { width: 24px; height: 24px; }
.ap-done h2 { font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.025em; text-transform: uppercase; line-height: 1.02; }
.ap-done p { color: var(--fog-200); max-width: 52ch; }
.ap-done p a { color: var(--accent); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .ap-done:not([hidden]) { animation: ap-in 0.5s var(--ease) both; }
  @keyframes ap-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
