/* ============================================================
   SPRINTORS — Form pages (Start a Sprint / Join the Pride)
   Builds on sprintors.css tokens & atoms. Load AFTER sprintors.css.
   ============================================================ */

/* ---- page shell: editorial split ---------------------------------- */
.page { min-height: 100vh; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  align-items: stretch;
  max-width: 1500px; margin: 0 auto;
}

/* left rail — the pitch (sticky, viewport-tall) */
.rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow: hidden;
  background: var(--d-bg); color: var(--d-ink);
  padding: clamp(40px, 5vw, 88px) clamp(28px, 4vw, 72px);
  display: flex; flex-direction: column;
}
.rail__burst {
  position: absolute; top: -14%; right: -28%;
  width: min(80vw, 620px); aspect-ratio: 1; color: var(--d-rust);
  opacity: .09; pointer-events: none;
}
.rail__top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: clamp(48px, 8vh, 96px); }
.rail__back { font-family: var(--fm); font-size: 13px; letter-spacing: .04em; color: var(--d-ink-2); display: inline-flex; align-items: center; gap: 9px; transition: color .15s, gap .2s; }
.rail__back:hover { color: var(--d-ink); gap: 13px; }
.rail__body { position: relative; z-index: 1; margin-top: auto; }
.rail .eyebrow { color: var(--d-ink-2); }
.rail .eyebrow::before { background: var(--d-rust); }
.rail h1 {
  font-size: clamp(40px, 4.6vw, 76px); font-weight: 800; letter-spacing: -0.03em;
  line-height: 0.96; margin: 24px 0 26px;
}
.rail__lead { color: var(--d-ink-2); font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; max-width: 44ch; }

.rail__list { list-style: none; padding: 0; margin: clamp(34px, 5vh, 56px) 0 0; display: flex; flex-direction: column; gap: 18px; }
.rail__list li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; }
.rail__list .burst { width: 22px; height: 22px; color: var(--d-rust); margin-top: 2px; }
.rail__list b { display: block; font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.rail__list span { color: var(--d-ink-2); font-size: 14.5px; line-height: 1.45; }

.rail__foot { position: relative; z-index: 1; margin-top: auto; padding-top: 22px; border-top: 1px solid var(--d-line);
  font-family: var(--fm); font-size: 12px; letter-spacing: .04em; color: var(--d-ink-2); display: flex; align-items: center; gap: 10px; }

/* right — the form */
.formwrap { background: var(--bg); padding: clamp(36px, 4.5vw, 80px) clamp(24px, 4vw, 84px); display: flex; align-items: flex-start; }
.form { width: 100%; max-width: 620px; margin: 0 auto; }

.form__head { margin-bottom: clamp(28px, 3.5vw, 44px); }
.form__step { font-family: var(--fm); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--rust); margin-bottom: 14px; }
.form__head h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 12px; }
.form__head p { color: var(--ink-2); font-size: 16px; line-height: 1.5; max-width: 52ch; }

/* fieldset groups */
.fset { border: none; padding: 0; margin: 0 0 clamp(30px, 3.4vw, 44px); }
.fset__legend { display: flex; align-items: baseline; gap: 12px; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.fset__legend .n { font-family: var(--fm); font-size: 13px; font-weight: 700; color: var(--rust); }
.fset__legend h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; text-wrap: nowrap; }

/* field grid */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field--full { grid-column: 1 / -1; }
.field > label { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.field .req { color: var(--rust); font-size: 13px; }
.field .opt { font-family: var(--fm); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }
.field .hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }

/* inputs */
.input, .select, .textarea {
  width: 100%; font-family: var(--ff); font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-2); border-radius: 3px;
  padding: 13px 15px; transition: border-color .16s, box-shadow .16s, background .16s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--rust); box-shadow: 0 0 0 3px var(--rust-soft); }
.textarea { resize: vertical; min-height: 116px; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238c8377' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; cursor: pointer; }

/* invalid state (set by JS) */
.field.invalid .input, .field.invalid .select, .field.invalid .textarea,
.field.invalid .chips, .field.invalid .cards { border-color: #c0492f; }
.field.invalid .chips, .field.invalid .cards { box-shadow: 0 0 0 1.5px #c0492f; }
.field__err { display: none; font-size: 12.5px; color: #c0492f; font-weight: 500; }
.field.invalid .field__err { display: block; }

/* chip multi-select */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip-opt {
  font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 10px 15px; border-radius: 999px; cursor: pointer; user-select: none;
  background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: background .15s, box-shadow .15s, color .15s, transform .12s;
}
.chip-opt:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.chip-opt:active { transform: scale(.97); }
.chip-opt[aria-pressed="true"] { background: var(--rust); color: #fff; box-shadow: inset 0 0 0 1.5px var(--rust); }

/* radio cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.card-opt { position: relative; cursor: pointer; }
.card-opt input { position: absolute; opacity: 0; pointer-events: none; }
.card-opt__box {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 16px;
  border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: box-shadow .15s, background .15s; height: 100%;
}
.card-opt:hover .card-opt__box { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.card-opt__box b { font-size: 15px; font-weight: 700; }
.card-opt__box span { font-size: 12.5px; color: var(--ink-2); }
.card-opt input:checked + .card-opt__box { background: var(--rust-soft); box-shadow: inset 0 0 0 2px var(--rust); }
.card-opt input:focus-visible + .card-opt__box { box-shadow: inset 0 0 0 2px var(--rust), 0 0 0 3px var(--rust-soft); }

/* toggle */
.toggle { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track { flex: none; width: 46px; height: 27px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.toggle input:checked + .toggle__track { background: var(--rust); }
.toggle input:checked + .toggle__track::after { transform: translateX(19px); }
.toggle input:focus-visible + .toggle__track { box-shadow: 0 0 0 3px var(--rust-soft); }
.toggle__label b { font-size: 15px; font-weight: 600; display: block; }
.toggle__label span { font-size: 13px; color: var(--ink-2); }

/* consent checkbox */
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 13px; align-items: start; cursor: pointer; padding: 16px; border-radius: 4px; background: var(--bg-2); }
.consent input { position: absolute; opacity: 0; }
.consent__box { width: 22px; height: 22px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; margin-top: 1px; transition: background .15s, box-shadow .15s; }
.consent__box svg { width: 13px; height: 13px; opacity: 0; transition: opacity .12s; }
.consent input:checked + .consent__box { background: var(--rust); box-shadow: inset 0 0 0 1.5px var(--rust); }
.consent input:checked + .consent__box svg { opacity: 1; }
.consent input:focus-visible + .consent__box { box-shadow: inset 0 0 0 1.5px var(--rust), 0 0 0 3px var(--rust-soft); }
.consent__txt { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.consent__txt a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* submit row */
.form__submit { display: flex; align-items: center; gap: 20px; margin-top: clamp(28px, 3vw, 38px); flex-wrap: wrap; }
.form__submit .btn { padding: 17px 34px; font-size: 16px; }
.form__note { font-family: var(--fm); font-size: 12px; color: var(--ink-3); letter-spacing: .03em; }

/* success state */
.success { display: none; text-align: center; padding: clamp(30px, 6vh, 70px) 10px; }
.form.is-sent .form__inner { display: none; }
.form.is-sent .success { display: block; }
.success__mark { width: 76px; height: 76px; margin: 0 auto 26px; border-radius: 50%; background: var(--rust-soft); display: grid; place-items: center; }
.success__mark .burst { width: 40px; height: 40px; color: var(--rust); }
.success h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.success p { color: var(--ink-2); font-size: 17px; line-height: 1.55; max-width: 42ch; margin: 0 auto 30px; }
.success__meta { font-family: var(--fm); font-size: 12.5px; color: var(--ink-3); letter-spacing: .04em; }

/* reveal-on-load for form pages */
.fade { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.fade.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade { opacity: 1 !important; transform: none !important; } }

/* ---- responsive ---- */
@media (max-width: 1040px) {
  .split { grid-template-columns: 1fr; }
  .rail { position: relative; height: auto; padding-bottom: clamp(40px, 6vw, 64px); }
  .rail__body { margin-top: clamp(40px, 8vh, 80px); }
  .rail__list { display: grid; grid-template-columns: 1fr 1fr; }
  .rail__foot { display: none; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .rail__list { grid-template-columns: 1fr; }
  .form__submit { gap: 14px; }
  .form__submit .btn { width: 100%; }
}
