/* The Source Finance — Get started page (v6, was the waitlist page).
   Two door cards (name="who": partner | trader) decide which questions follow. :has() shows the right
   group even without JS; get-started.js also disables the hidden group, validates inline and writes
   the form note. Tokens and shared components (.btn, .label, .h1, .feature) come from site.css. */

/* ---------- Section: full viewport, art behind ---------- */
.wl { position: relative; min-height: 100vh; padding: 144px 0 112px; overflow: clip; }
.wl__art { position: absolute; inset: 0; overflow: hidden; opacity: .2; pointer-events: none; }
.wl__art img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform-origin: 50% 50%; }
.wl__fade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, 0) 40%, #000 100%); }

.wl__grid {
  position: relative; z-index: 2; display: grid; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 540px); grid-template-areas: "side form"; column-gap: 72px;
}
.wl__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 32px; }
.wl .label::before { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 0 0 3px var(--accent-soft), 0 0 12px var(--accent-glow); }
.wl__title { max-width: 520px; text-wrap: balance; }
.wl__sub { max-width: 430px; text-wrap: pretty; }
.wl__perks { display: grid; gap: 22px; max-width: 380px; }
.wl-form { grid-area: form; }
/* desktop: the pitch stays in view while the form scrolls */
.wl__side { grid-area: side; position: sticky; top: 112px; display: grid; gap: 48px; align-content: start; }

/* ---------- Form card ---------- */
.wl-form {
  position: relative; padding: 28px; border-radius: 20px;
  background: rgba(10, 10, 10, .62); box-shadow: inset 0 1px 0 0 var(--hl), inset 0 0 0 1px var(--line), 0 48px 96px -48px #000;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.wl-form__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.wl-form__title { font-family: var(--f-display); font-size: 20px; font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.wl-form__head .small { color: var(--muted-2); font-size: 13px; }

/* steps: fieldsets with a numbered legend */
.wl-step { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.wl-step + .wl-step { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.wl-step__title { float: left; width: 100%; display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 0; font-size: 15px; font-weight: 500; line-height: 1.2; color: var(--fg); }
.wl-step__title + * { clear: both; }
.wl-step__n { font-size: 11px; letter-spacing: .06em; color: var(--muted-2); }

/* which questions follow: partners by default */
.wl-group[data-door="trader"],
.wl-form:has(input[name="who"][value="trader"]:checked) .wl-group[data-door="partner"] { display: none; }
.wl-form:has(input[name="who"][value="trader"]:checked) .wl-group[data-door="trader"] { display: block; }
.wl-group[hidden] { display: none !important; }
.wl-form.is-ready .wl-group { animation: wl-group-in .6s var(--ease-template) both; }
@keyframes wl-group-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Door cards ---------- */
.wl-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wl-door { position: relative; display: flex; min-width: 0; cursor: pointer; }
.wl-door input, .wl-chip input, .wl-line input, .wl-check input { position: absolute; top: 12px; left: 12px; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.wl-door__box {
  flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .35s var(--ease-template), box-shadow .35s var(--ease-template);
}
.wl-door:hover .wl-door__box { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.wl-door input:checked + .wl-door__box {
  background: rgba(255, 255, 255, .09);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .9), inset 0 1px 0 0 var(--hl), 0 18px 40px -22px var(--accent-glow);
}
.wl-door input:focus-visible + .wl-door__box { outline: 2px solid var(--accent); outline-offset: 3px; }
.wl-door__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wl-door__ic { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #000; }
.wl-door__tick, .wl-line__tick, .wl-check__box {
  display: flex; align-items: center; justify-content: center; flex: none; color: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3);
  transition: background-color .3s var(--ease-template), box-shadow .3s var(--ease-template), color .3s;
}
.wl-door__tick { width: 22px; height: 22px; border-radius: 50%; }
.wl-door__tick .icon, .wl-line__tick .icon, .wl-check__box .icon { width: 12px; height: 12px; stroke-width: 3; transform: scale(.4); transition: transform .45s var(--ease-spring); }
.wl-door input:checked + .wl-door__box .wl-door__tick,
.wl-line input:checked + .wl-line__box .wl-line__tick,
.wl-check input:checked + .wl-check__box { background: #fff; color: #000; box-shadow: none; }
.wl-door input:checked + .wl-door__box .wl-door__tick .icon,
.wl-line input:checked + .wl-line__box .wl-line__tick .icon,
.wl-check input:checked + .wl-check__box .icon { transform: none; }
.wl-door__tag { font-size: 11px; letter-spacing: .06em; color: var(--muted-2); }
.wl-door__title { font-family: var(--f-display); font-size: 20px; line-height: 1.2; letter-spacing: -.02em; color: var(--fg); }
.wl-door__text { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }

/* ---------- Fields ---------- */
.wl-field { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.wl-field + .wl-field { margin-top: 20px; }
.wl-label { display: block; float: left; width: 100%; margin: 0 0 8px; padding: 0; font-size: 13px; font-weight: 500; line-height: 1.2; color: var(--muted); }
label.wl-label { float: none; }
.wl-label + * { clear: both; }
.wl-label__hint { margin-left: 6px; font-weight: 400; color: var(--muted-2); }
.wl-input {
  display: block; width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35);
  font-size: 15px; line-height: 1.2; color: var(--fg); outline: none;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.wl-input::placeholder { color: var(--muted-2); opacity: 1; }
.wl-input:hover { border-color: rgba(255, 255, 255, .3); }
.wl-input:focus, .wl-input:focus-visible { border-color: #fff; background: rgba(0, 0, 0, .5); box-shadow: 0 0 0 4px rgba(255, 255, 255, .1); outline: none; }

/* chips: single choice (what you run, platform) */
.wl-chips { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.wl-chip { position: relative; display: inline-flex; cursor: pointer; }
.wl-chip span {
  display: inline-flex; align-items: center; height: 38px; padding: 0 13px; border-radius: 38px;
  font-size: 14px; line-height: 1; color: var(--muted); white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: background-color .3s var(--ease-template), color .3s var(--ease-template), box-shadow .3s var(--ease-template);
}
.wl-chip:hover span { color: var(--fg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); }
.wl-chip input:checked + span { background: #fff; color: #0a0a0a; font-weight: 500; box-shadow: none; }
.wl-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* line tiles: one or more */
.wl-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wl-line { position: relative; display: flex; min-width: 0; cursor: pointer; }
.wl-line__box {
  flex: 1; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px;
  align-items: center; min-width: 0; padding: 11px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: background-color .3s var(--ease-template), box-shadow .3s var(--ease-template);
}
.wl-line__box > .icon { grid-row: 1 / 3; color: var(--fg); }
.wl-line__box b { grid-column: 2; font-size: 14px; font-weight: 500; line-height: 1.2; color: var(--fg); }
.wl-line__box small { grid-column: 2; font-size: 12px; line-height: 1.25; color: var(--muted-2); }
.wl-line__tick { grid-column: 3; grid-row: 1 / 3; width: 20px; height: 20px; border-radius: 6px; }
.wl-line:hover .wl-line__box { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.wl-line input:checked + .wl-line__box { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85); }
.wl-line input:focus-visible + .wl-line__box { outline: 2px solid var(--accent); outline-offset: 2px; }

/* consent */
.wl-check { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 12px; align-items: start; cursor: pointer; }
.wl-check__box { width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; }
.wl-check input:focus-visible + .wl-check__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.wl-check__text { font-size: 14px; line-height: 1.45; color: var(--muted); }
.wl-check:hover .wl-check__box { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.wl-check__more { margin: 6px 0 0 32px; font-size: 13px; line-height: 1.3; }
.wl-check__more a { color: var(--fg); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; transition: text-decoration-color .25s; }
.wl-check__more a:hover { text-decoration-color: #fff; }

/* ---------- Errors ---------- */
.wl-err { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; line-height: 1.3; color: var(--down); }
.wl-err:empty { display: none; }
.wl-err::before { content: ""; width: 6px; height: 6px; flex: none; border-radius: 50%; background: currentColor; }
.wl-field[data-field="consent"] .wl-err { margin-left: 32px; }
.wl-field.is-invalid .wl-input { border-color: var(--down); }
.wl-field.is-invalid .wl-input:focus { box-shadow: 0 0 0 4px rgba(255, 154, 154, .16); }
.wl-field.is-invalid .wl-chip span,
.wl-field.is-invalid .wl-line__box { box-shadow: inset 0 0 0 1px rgba(255, 154, 154, .55); }
.wl-field.is-invalid .wl-chip input:checked + span { box-shadow: none; }
.wl-field.is-invalid .wl-check__box { box-shadow: inset 0 0 0 1.5px var(--down); }

/* ---------- Submit + note ---------- */
.wl-submit { display: grid; gap: 14px; margin-top: 28px; }
.wl-submit__btn { width: 100%; height: 48px; }
.wl-note { min-height: 0; font-size: 13px; line-height: 1.4; text-align: center; color: var(--muted); }
.wl-note:empty { display: none; }
.wl-note.is-error { color: var(--down); }
.wl-note.is-info { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); }

/* ---------- Motion ---------- */
/* entrance: art settles from 1.2x; form and perks rise on the slow curve */
.js .wl__art img { animation: wl-zoom 2.1s cubic-bezier(.25, .5, .4, 1) both; }
@keyframes wl-zoom { from { transform: scale(1.2); } to { transform: none; } }
.js .wl [data-reveal] { transition-duration: 1.45s; transition-timing-function: var(--ease-template); }
/* scroll parallax: the art drifts at 0.3x the scroll */
@supports (animation-timeline: scroll()) {
  .wl__art { animation: wl-drift-art linear both; animation-timeline: scroll(root); animation-range: 0px 1000px; }
}
@keyframes wl-drift-art { to { transform: translateY(300px); } }

@media (prefers-reduced-motion: reduce) {
  .js .wl__art img, .wl__art, .wl-form.is-ready .wl-group { animation: none !important; transform: none !important; }
  .wl-door__box, .wl-chip span, .wl-line__box, .wl-door__tick, .wl-line__tick, .wl-check__box, .wl-input { transition: none !important; }
  .wl-door__tick .icon, .wl-line__tick .icon, .wl-check__box .icon { transition: none !important; }
}

/* ---------- Tablet: one column ---------- */
@media (max-width: 1199px) {
  .wl { padding-top: 128px; }
  .wl__grid {
    max-width: 600px; margin-inline: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: none;
    grid-template-areas: "intro" "form" "perks"; row-gap: 40px;
  }
  .wl__side { display: contents; }
  .wl__intro { grid-area: intro; }
  .wl__perks { grid-area: perks; }
  .wl__intro { align-items: center; padding-top: 0; text-align: center; }
  .wl__sub { max-width: 460px; text-wrap: balance; }
  .wl__perks { max-width: 420px; justify-self: center; }
}

/* ---------- Phone ---------- */
@media (max-width: 809px) {
  .wl { padding: 112px 0 72px; }
  .wl__grid { row-gap: 32px; }
  .wl-form { padding: 20px 16px 22px; border-radius: 18px; }
  .wl-form__head { flex-direction: column; gap: 4px; margin-bottom: 20px; }
  .wl-door__box { padding: 14px; }
  .wl-door__top { margin-bottom: 10px; }
  .wl-door__ic { width: 30px; height: 30px; }
  .wl-door__title { font-size: 18px; }
  .wl-lines { gap: 6px; }
  .wl-line__box { column-gap: 8px; padding: 10px; }
  .wl__perks { padding-inline: 8px; }
}
@media (max-width: 379px) {
  .wl-lines { grid-template-columns: 1fr; }
}

/* v5.16 */
.wl .glyph { width: 26px; height: 26px; margin-bottom: 10px; display: block; }

.wl__intro { position: relative; }

/* v6: optional question («Ask us» lands here with ?ask=1) */
.wl-textarea { height: auto; min-height: 96px; padding-top: 12px; padding-bottom: 12px; line-height: 1.45; resize: vertical; font: inherit; }
