/* =========================================================================
   Jampac · apply.html, the driver application (v3.11, Nov 2 2026)
   Built on style.css + company.css: same paper, ink, green, Mona Sans, header,
   panels and ticks. The form is four numbered steps on ruled paper; the side
   carries the truck, a docket that ticks as each step is done, and the perks.
   ========================================================================= */

.apply .head-right .nav a[aria-current="page"]::after { transform: scaleX(1); }

.ap-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 96px);
  align-items: start; padding: clamp(18px, 3vh, 44px) var(--gxr) 0 var(--gx);
}
.ap-col { min-width: 0; max-width: 760px; }
.ap-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--sign); }
.ap-h1 { max-width: 9ch; }

/* ---------------- the side ---------------- */
.ap-side { align-self: stretch; min-width: 0; }
.ap-sticky { position: sticky; top: 104px; display: grid; gap: 26px; }
.ap-pic { width: 100%; height: min(50svh, 480px); }
.ap-pic img { object-fit: cover; }

/* the docket: four checks that tick in as each step is complete */
.ap-docket { list-style: none; margin: 0; padding: 14px 0 0; display: flex; flex-wrap: wrap; border-top: 1px solid var(--rule); counter-reset: d; }
.ap-docket li {
  display: inline-flex; align-items: center; gap: 9px; padding: 2px 16px 2px 0; margin: 0 16px 6px 0;
  border-right: 1px solid var(--rule);
  font-size: 11.5px; font-weight: 640; font-stretch: 120%; letter-spacing: .085em; text-transform: uppercase; line-height: 1.3;
  color: var(--ink-2); transition: color .4s var(--ease-out);
}
.ap-docket li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.ap-docket li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(12, 14, 13, .28);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.4 8.3l2.3 2.3 4.9-5' fill='none' stroke='%23F3F4F0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0 0 no-repeat;
  transition: background-color .35s var(--ease-out), box-shadow .35s var(--ease-out), background-size .5s var(--ease-out), transform .5s var(--ease-out);
}
.ap-docket li.done { color: var(--ink); }
.ap-docket li.done::before { background-color: var(--green); background-size: 18px 18px; box-shadow: none; animation: ap-tick .55s var(--ease-out); }
@keyframes ap-tick { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }

.ap-perks .label { margin-bottom: 4px; }
.ap-perks .c-ticks { margin-top: 10px; }
.ap-perks .c-ticks li { font-size: 15px; padding-top: 12px; padding-bottom: 12px; }
.ap-perks .c-ticks li::before { top: 17px; }
.ap-perks .c-quote { margin-top: 26px; }
.ap-perks .c-quote p { font-size: clamp(24px, 2vw, 32px); }

/* ---------------- the form ---------------- */
.ap-restored { margin-top: 26px; font-size: 14.5px; color: var(--ink-2); }
.ap-textbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 680; color: var(--ink); text-decoration: underline; cursor: pointer; }
.ap-form { margin-top: clamp(34px, 5vh, 54px); }
.ap-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.ap-step + .ap-step { margin-top: 46px; }
.ap-step legend {
  float: left; width: 100%; padding: 16px 0 0; margin: 0 0 22px; border-top: 1.5px solid var(--ink);
  display: flex; align-items: baseline; gap: 14px;
}
.ap-step legend + * { clear: both; }
.ap-num { font-size: 14px; font-weight: 700; font-stretch: 75%; letter-spacing: .02em; color: var(--sign); transition: color .4s var(--ease-out); }
.ap-step-t { font-size: clamp(26px, 2.3vw, 36px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ap-step.done .ap-num { color: var(--green); }
.ap-help { clear: both; color: var(--ink-2); font-size: 15px; margin: -6px 0 16px; max-width: 52ch; }

.ap-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; }
.ap-f { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; }
.ap-f.wide, .ap-check.wide { grid-column: 1 / -1; }
.ap-f[hidden] { display: none; }
.ap-l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 14px; font-weight: 640; }
.ap-opt { font-size: 10.5px; font-weight: 640; font-stretch: 120%; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); opacity: .8; }
.ap-jn {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 2px; border-radius: 50%;
  font-size: 12px; font-weight: 760; background: rgba(12, 14, 13, .07); align-self: center;
}

.ap-f input, .ap-f select, .ap-f textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; font-weight: 460; color: var(--ink);
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; padding: 0 16px; height: 54px;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.ap-f textarea { height: auto; min-height: 104px; padding: 14px 16px; resize: vertical; line-height: 1.45; }
.ap-f input::placeholder, .ap-f textarea::placeholder { color: rgba(71, 76, 72, .62); }
.ap-f select {
  padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230C0E0D' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 18px center / 12px 8px no-repeat;
}
.ap-f select:invalid, .ap-f select.is-empty { color: rgba(71, 76, 72, .75); }
.ap-f input:hover, .ap-f select:hover, .ap-f textarea:hover { border-color: rgba(12, 14, 13, .32); }
.ap-f input:focus, .ap-f select:focus, .ap-f textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 0 5px rgba(20, 161, 1, .12); }
/* a quiet check inside a text field once it's right */
.ap-f.is-ok input:not([type="radio"]):not([type="checkbox"]) {
  padding-right: 46px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%2314A101'/%3E%3Cpath d='M4.4 8.3l2.3 2.3 4.9-5' fill='none' stroke='%23F3F4F0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 16px center / 18px 18px no-repeat;
}
.ap-err:empty { display: none; }
.ap-err { color: #B3261E; font-size: 13.5px; font-weight: 560; }
.ap-f.is-bad input, .ap-f.is-bad select, .ap-f.is-bad textarea { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E; }
.ap-f.is-bad .ap-chip span { box-shadow: inset 0 0 0 1.5px #B3261E; }

/* chips: radios and checkboxes as pills */
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chip { position: relative; display: inline-flex; }
.ap-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ap-chip span {
  display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 18px 0 14px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--rule);
  font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; pointer-events: none;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.ap-chip span::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(12, 14, 13, .28);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.4 8.3l2.3 2.3 4.9-5' fill='none' stroke='%230C0E0D' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0 0 no-repeat;
  transition: background-color .25s var(--ease-out), background-size .35s var(--ease-out), box-shadow .25s var(--ease-out);
}
.ap-chip input:hover + span { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ap-chip input:checked + span { background: var(--ink); color: var(--white); box-shadow: none; }
.ap-chip input:checked + span::before { background-color: var(--yellow); background-size: 18px 18px; box-shadow: none; }
.ap-chip input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 3px; }

.ap-check { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 15px; font-weight: 520; padding-top: 4px; }
.ap-check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.ap-check span::before {
  content: ""; display: inline-block; vertical-align: -5px; margin-right: 12px; width: 22px; height: 22px; border-radius: 7px;
  background: #fff center / 0 0 no-repeat; box-shadow: inset 0 0 0 1.5px rgba(12, 14, 13, .3);
  transition: background-color .25s var(--ease-out), background-size .3s var(--ease-out), box-shadow .25s;
}
.ap-check input:checked + span::before {
  background-color: var(--ink); background-size: 18px 18px; box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.4 8.3l2.3 2.3 4.9-5' fill='none' stroke='%23FEF201' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ap-check input:focus-visible + span::before { outline: 2px solid var(--green); outline-offset: 3px; }

/* ---------------- send ---------------- */
.ap-send { margin-top: 48px; padding-top: 26px; border-top: 1.5px solid var(--ink); display: grid; gap: 16px; justify-items: start; }
.ap-submit { position: relative; overflow: hidden; height: 62px; padding: 0 36px; font-size: 16.5px; }
.ap-submit[disabled] { cursor: progress; }
/* sending: a route line runs along the bottom of the button, like the route bar on the homepage */
.ap-route { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; opacity: 0; transition: opacity .3s; }
.ap-route::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 34%; background: var(--yellow); transform: translateX(-110%); }
.is-sending .ap-route { opacity: 1; }
.is-sending .ap-route::after { animation: ap-route 1.1s var(--ease-io) infinite; }
@keyframes ap-route { to { transform: translateX(310%); } }
.ap-status:empty { display: none; }
.ap-status { font-size: 15px; font-weight: 600; max-width: 52ch; }
.ap-status.is-bad { color: #B3261E; }
.ap-privacy { font-size: 14px; color: var(--ink-2); max-width: 56ch; }
.ap-privacy b { color: var(--ink); font-weight: 650; }

/* ---------------- sent ---------------- */
.ap-done { margin-top: clamp(34px, 5vh, 54px); padding-top: 22px; border-top: 1.5px solid var(--ink); outline: none; }
.ap-done-k { display: inline-flex; align-items: center; gap: 10px; color: var(--sign); }
.ap-done .c-h2 { max-width: 14ch; }
.ap-next { list-style: none; margin: 34px 0 0; padding: 0; }
.ap-next li { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.ap-next li:last-child { border-bottom: 1px solid var(--rule); }
.ap-next .c-num { grid-row: span 2; padding-top: 6px; }
.ap-next h3 { font-size: clamp(22px, 1.9vw, 30px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.ap-next p { color: var(--ink-2); }
.c-motion .ap-done:not([hidden]) > * { animation: ap-rise .9s var(--ease-out) both; }
.c-motion .ap-done:not([hidden]) > *:nth-child(2) { animation-delay: .07s; }
.c-motion .ap-done:not([hidden]) > *:nth-child(3) { animation-delay: .14s; }
.c-motion .ap-done:not([hidden]) > *:nth-child(4) { animation-delay: .21s; }
.c-motion .ap-done:not([hidden]) > *:nth-child(5) { animation-delay: .28s; }
@keyframes ap-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------------- tablet ---------------- */
@media (max-width: 1100px) {
  .ap-perks .c-ticks { grid-template-columns: 1fr; }
}

/* ---------------- phone: the truck on top, the form, then what you get ---------------- */
@media (max-width: 760px) {
  .ap-grid { display: flex; flex-direction: column; gap: 0; padding-top: 6px; }
  .ap-side, .ap-sticky { display: contents; }
  .ap-pic { order: -1; height: auto; aspect-ratio: 16 / 10; margin-bottom: 26px; }
  .ap-docket { display: none; }
  .ap-perks { order: 2; margin-top: 64px; }
  .ap-h1 { max-width: none; }
  .ap-fields { grid-template-columns: 1fr; gap: 18px; }
  .ap-chip span { white-space: normal; }
  .ap-submit { width: 100%; }
  .ap-done .c-actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-docket li.done::before { animation: none; }
  .ap-route::after { animation-duration: 2.4s; }
}
.is-calm.c-motion .ap-form[data-reveal] { filter: none; }
