/**
 * v3 lead form — parts/v3-lead-form.php, assets/js/v3-form.js.
 *
 * A shared component: templates list 'v3-form' in acma_v3_template_components().
 * Solid palette only; errors in --v3-danger (6.6:1 on white). The field tokens live on :root in v3-base.css.
 */

.v3-lead { padding-block: var(--v3-section-base); background: var(--v3-surface); scroll-margin-top: var(--v3-head, 0px); }
.v3-lead__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 112px); align-items: start; }
.v3-lead__intro { position: sticky; top: calc(var(--v3-head, 0px) + 48px); }
.acma-v3 .v3-lead__reach { display: grid; gap: 0; margin-top: clamp(24px, 2.4vw, 40px); border-top: 1px solid var(--v3-line); }
.acma-v3 .v3-lead__reach li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--v3-line); font-size: 16px; }
.acma-v3 .v3-lead__reach span { color: var(--v3-muted); }
.acma-v3 .v3-lead__reach :is(a, button) { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--v3-ink); cursor: pointer; transition: color .3s; }
.acma-v3 .v3-lead__reach :is(a, button):is(:hover, :focus-visible) { color: var(--v3-blue); }
/* Optional "What happens next" steps (partial arg 'next'). */
.acma-v3 .v3-lead__next-title { margin-top: clamp(32px, 3vw, 56px); font-size: clamp(18px, .4vw + 14px, 24px); font-weight: 700; color: var(--v3-ink); }
.acma-v3 .v3-lead__next { position: relative; display: grid; gap: clamp(18px, 1.6vw, 28px); margin-top: 20px; list-style: none; }
.acma-v3 .v3-lead__next::before { content: ""; position: absolute; top: 18px; bottom: 18px; left: 17px; width: 2px; background: var(--v3-line); }
.acma-v3 .v3-lead__next li { position: relative; display: flex; gap: 18px; align-items: flex-start; }
.acma-v3 .v3-lead__next-n { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent, var(--v3-blue)); font-size: 15px; font-weight: 700; color: #fff; }
.acma-v3 .v3-lead__next-body { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; font-size: 16px; line-height: 1.55; color: var(--v3-text); }
.acma-v3 .v3-lead__next-body strong { font-weight: 700; color: var(--v3-ink); }

.v3-lead__card {
	padding: clamp(22px, 2.6vw, 48px);
	border-radius: clamp(16px, 1.4vw, 28px);
	background: #fff;
	box-shadow: 0 40px 80px -48px rgba(14, 22, 34, .35), 0 0 0 1px var(--v3-line);
}

/* ── Fields: the site's one field system (tokens on :root in v3-base.css) ── */
.v3-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v3-q-gap) clamp(16px, 1.2vw, 24px); }
.v3-field { display: flex; flex-direction: column; gap: var(--v3-lbl-gap); min-width: 0; }
.v3-field--wide { grid-column: 1 / -1; }
.acma-v3 .v3-field > label { font-size: var(--v3-lbl-fs); font-weight: 600; line-height: 1.4; color: var(--v3-ink); }
.v3-field__opt { font-weight: 400; color: var(--v3-muted); }
.acma-v3 .v3-form :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], input[type="search"], textarea, select) {
	width: 100%; min-height: var(--v3-fld-h); margin: 0; padding: 12px 16px;
	border: 1px solid var(--v3-field-line); border-radius: var(--v3-fld-r);
	background: #fff; color: var(--v3-ink);
	/* Longhands: `inherit` is not valid inside the `font` shorthand, which dropped the whole rule. 16px also stops iOS zooming on focus. */
	font-family: inherit; font-size: var(--v3-fld-fs); font-weight: 400; line-height: 1.4; letter-spacing: normal;
	box-shadow: none; outline: 0;
	transition: border-color .25s, box-shadow .25s, background-color .25s;
	-webkit-appearance: none; appearance: none;
}
.acma-v3 .v3-form textarea { min-height: 128px; resize: vertical; }
.acma-v3 .v3-form :is(input, textarea, select)::placeholder { color: var(--v3-placeholder); opacity: 1; }
.acma-v3 .v3-form :is(input, textarea, select):hover { border-color: var(--v3-field-hover); }
.acma-v3 .v3-form :is(input, textarea, select):focus-visible,
.acma-v3 .v3-form :is(input, textarea, select):focus { border-color: var(--v3-royal); box-shadow: var(--v3-fld-focus); }
/* :is(input, textarea, select) lifts these past the base field rule, which otherwise kept the grey border. */
.acma-v3 .v3-form :is(input, textarea, select)[aria-invalid="true"] { border-color: var(--v3-danger); box-shadow: var(--v3-fld-invalid); }
.acma-v3 .v3-form :is(input, textarea, select)[aria-invalid="true"]:focus { box-shadow: var(--v3-fld-invalid), 0 0 0 5px rgba(180, 35, 24, .14); }
.acma-v3 .v3-form :is(input, textarea, select):disabled { border-color: var(--v3-line); background: var(--v3-surface); color: var(--v3-muted); cursor: not-allowed; }

/* Selects: native control, one chevron everywhere (16px, muted, 16px from the edge). */
.acma-v3 .v3-form .v3-select { position: relative; display: block; width: 100%; }
.acma-v3 .v3-form .v3-select select { padding-right: 44px; cursor: pointer; text-overflow: ellipsis; }
.acma-v3 .v3-form .v3-select .v3-i { position: absolute; right: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--v3-muted); pointer-events: none; }
.acma-v3 .v3-form .v3-select:has(select:disabled) .v3-i { opacity: .5; }

.v3-phone { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px; }

.acma-v3 .v3-field__err { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--v3-danger); }
.acma-v3 .v3-field__meta { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.acma-v3 .v3-field__count { margin-left: auto; flex: none; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--v3-muted); }
.acma-v3 .v3-field__hint { font-size: 14px; line-height: 1.45; color: var(--v3-muted); }
.acma-v3 .v3-field__meta:has(.v3-field__err:not([hidden])) .v3-field__hint { display: none; }

/* Choice chips (budget, timeline, internship mode and duration): native radios, so arrow keys move
   the choice. Chosen: navy fill plus a tick, so the state never rests on colour alone. */
.acma-v3 .v3-budget { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.acma-v3 .v3-budget legend { float: left; width: 100%; margin: 0 0 var(--v3-lbl-gap); padding: 0; font-size: var(--v3-lbl-fs); font-weight: 600; line-height: 1.4; color: var(--v3-ink); }
.acma-v3 .v3-field.v3-budget :is(legend, .v3-budget__cur) { margin-bottom: 0; } /* The field's own gap already spaces them. */
.v3-budget__list { clear: both; display: flex; flex-wrap: wrap; gap: var(--v3-chip-gap); }
.acma-v3 .v3-budget__opt { position: relative; display: inline-flex; max-width: 100%; margin: 0; cursor: pointer; }
.acma-v3 .v3-budget__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.acma-v3 .v3-budget__opt span {
	display: inline-flex; align-items: center; gap: 10px; min-height: var(--v3-chip-h); padding: 0 20px;
	border: 1px solid var(--v3-field-line); border-radius: 999px; background: #fff;
	font-size: var(--v3-lbl-fs); font-weight: 500; line-height: 1.25; color: var(--v3-ink); white-space: nowrap;
	font-variant-numeric: tabular-nums;
	transition: border-color .2s, background-color .2s, color .2s;
}
.acma-v3 .v3-budget__opt span::before { content: ""; display: none; flex: none; width: 10px; height: 5px; margin-top: -3px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.acma-v3 .v3-budget__opt span[hidden] { display: none; } /* Budget labels of the other currencies. */
.acma-v3 .v3-budget__opt:hover span { border-color: var(--v3-field-hover); background: var(--v3-surface); }
.acma-v3 .v3-budget__opt input:focus-visible ~ span { outline: 2px solid var(--v3-royal); outline-offset: 2px; }
.acma-v3 .v3-budget__opt input:checked ~ span { padding-left: 16px; border-color: var(--v3-navy); background: var(--v3-navy); color: #fff; }
.acma-v3 .v3-budget__opt input:checked ~ span::before { display: block; }
.acma-v3 .v3-budget__opt input:disabled ~ span { opacity: .5; cursor: not-allowed; }
.acma-v3 .v3-budget:has([aria-invalid="true"]) .v3-budget__opt span { border-color: var(--v3-danger); }

/* Currency: a compact control at chip height, its label inside the group, above the chips. */
.acma-v3 .v3-budget__cur {
	clear: both; display: flex; align-items: center; width: fit-content; max-width: 100%; height: var(--v3-chip-h); margin: 0 0 var(--v3-chip-gap); padding: 0 0 0 20px;
	border: 1px solid var(--v3-field-line); border-radius: 999px; background: #fff; transition: border-color .25s, box-shadow .25s;
}
.acma-v3 .v3-budget__cur label { flex: none; padding-right: 12px; border-right: 1px solid var(--v3-line); font-size: var(--v3-lbl-fs); font-weight: 600; line-height: 1.25; color: var(--v3-muted); white-space: nowrap; cursor: pointer; }
.acma-v3 .v3-budget__cur:hover { border-color: var(--v3-field-hover); }
.acma-v3 .v3-budget__cur:focus-within { border-color: var(--v3-royal); box-shadow: var(--v3-fld-focus); }
.acma-v3 .v3-form .v3-select--cur { width: auto; min-width: 0; }
.acma-v3 .v3-form .v3-budget__cur .v3-select select,
.acma-v3 .v3-form .v3-budget__cur .v3-select select:is(:hover, :focus, :focus-visible) {
	min-height: 0; height: calc(var(--v3-chip-h) - 2px); padding: 0 44px 0 12px; border: 0; border-radius: 0 999px 999px 0;
	background: transparent; box-shadow: none; font-size: var(--v3-lbl-fs); font-weight: 600; color: var(--v3-ink);
}
/* iOS Safari zooms the page when a field under 16px takes focus. */
@media (max-width: 767.98px) { .acma-v3 .v3-form .v3-budget__cur .v3-select select { font-size: 16px; } }

/* Under Google Translate, chip labels may be far longer: let them wrap inside the pill. */
html:is(.translated-ltr, .translated-rtl) .acma-v3 .v3-budget__opt span { white-space: normal; padding-block: 8px; text-wrap: balance; }

/* Attachment drop zone: dashed solid-colour frame, file row with a remove button once chosen. */
.acma-v3 .v3-drop__label { font-size: var(--v3-lbl-fs); font-weight: 600; line-height: 1.4; color: var(--v3-ink); }
.acma-v3 .v3-drop__zone {
	position: relative; display: flex; align-items: center; gap: 16px; margin: 0;
	padding: 18px 20px; border: 1.5px dashed color-mix(in srgb, var(--v3-muted) 17%, var(--v3-field-line)); border-radius: 14px; background: var(--v3-surface);
	cursor: pointer; transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.acma-v3 .v3-drop__zone[hidden] { display: none; }
.acma-v3 .v3-drop__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.acma-v3 .v3-drop__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--v3-line); color: var(--v3-blue); transition: background-color .25s, color .25s, box-shadow .25s; }
.acma-v3 .v3-drop__icon svg { width: 22px; height: 22px; }
.v3-drop__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acma-v3 .v3-drop__title { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--v3-ink); }
.acma-v3 .v3-drop__sub { font-size: 14px; line-height: 1.5; color: var(--v3-text); }
.acma-v3 .v3-drop__browse { font-weight: 600; color: var(--v3-blue); text-decoration: underline; text-underline-offset: 2px; }
.acma-v3 .v3-drop__zone:hover, .acma-v3 .v3-drop.is-over .v3-drop__zone { border-color: var(--v3-blue); background: color-mix(in srgb, var(--v3-blue) 6%, #fff); }
.acma-v3 .v3-drop__zone:hover .v3-drop__icon, .acma-v3 .v3-drop.is-over .v3-drop__icon { background: var(--v3-blue); box-shadow: 0 0 0 1px var(--v3-blue); color: #fff; }
.acma-v3 .v3-drop__zone:focus-within { border-style: solid; border-color: var(--v3-royal); box-shadow: var(--v3-fld-focus); }
.acma-v3 .v3-drop:has([aria-invalid="true"]) .v3-drop__zone { border-color: var(--v3-danger); }
.acma-v3 .v3-drop__file { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; border: 1px solid var(--v3-field-line); border-radius: 14px; background: #fff; }
.acma-v3 .v3-drop__file[hidden] { display: none; }
.acma-v3 .v3-drop__doc { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--v3-navy); font-size: 12px; font-weight: 700; letter-spacing: 0; color: #fff; }
.v3-drop__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.acma-v3 .v3-drop__name { overflow: hidden; font-size: 15px; font-weight: 600; color: var(--v3-ink); text-overflow: ellipsis; white-space: nowrap; }
.acma-v3 .v3-drop__size { font-size: 14px; color: var(--v3-muted); font-variant-numeric: tabular-nums; }
.acma-v3 .v3-drop__remove { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--v3-surface); color: var(--v3-ink); cursor: pointer; transition: background-color .2s, color .2s; }
.acma-v3 .v3-drop__remove svg { width: 18px; height: 18px; }
.acma-v3 .v3-drop__remove:is(:hover, :focus-visible) { background: var(--v3-danger); color: #fff; }
.acma-v3 .v3-drop__remove:focus-visible { outline: 2px solid var(--v3-danger); outline-offset: 2px; }

/* ── Consent, bot check, submit ──────────────────────────────────────── */
.v3-form__consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; margin-top: var(--v3-q-gap); }
.acma-v3 .v3-form__consent input {
	width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--v3-field-hover); border-radius: 6px;
	background: #fff; cursor: pointer; -webkit-appearance: none; appearance: none;
	display: grid; place-content: center; transition: background-color .2s, border-color .2s;
}
.acma-v3 .v3-form__consent input::before { content: ""; width: 11px; height: 6px; margin-top: -3px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .2s; }
.acma-v3 .v3-form__consent input:checked { background: var(--v3-royal); border-color: var(--v3-royal); }
.acma-v3 .v3-form__consent input:checked::before { transform: rotate(-45deg) scale(1); }
.acma-v3 .v3-form__consent input:focus-visible { outline: 2px solid var(--v3-royal); outline-offset: 2px; }
.acma-v3 .v3-form__consent input[aria-invalid="true"] { border-color: var(--v3-danger); box-shadow: none; }
.acma-v3 .v3-form__consent label { font-size: clamp(14px, .1vw + 12.6px, 16px); font-weight: 400; line-height: 1.5; color: var(--v3-text); cursor: pointer; }
.acma-v3 .v3-form__consent a { color: var(--v3-blue); text-decoration: underline; text-underline-offset: 2px; transition: color .25s, text-decoration-color .25s; }
.acma-v3 .v3-form__consent a:is(:hover, :focus-visible) { color: var(--v3-blue-2); text-decoration: underline; text-decoration-thickness: 2px; }
.v3-form__consent .v3-field__err { grid-column: 2; }

.v3-form .cf-turnstile { margin-top: 18px; }
.acma-v3 .v3-form__err { margin-top: 14px; }

.v3-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: calc(var(--v3-q-gap) + 4px); }
.v3-form__foot > .v3-form__note { flex: 1 1 100%; } /* The note sits under the button, from the form edge, on every form. */
.acma-v3 .v3-form .v3-form__submit { background: var(--v3-navy); color: #fff; border-color: var(--v3-navy); }
.acma-v3 .v3-form .v3-form__submit::before { background: var(--v3-royal); }
.acma-v3 .v3-form .v3-form__submit:is(:hover, :focus-visible) { color: #fff; border-color: var(--v3-royal); }
.acma-v3 .v3-form__note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--v3-muted); }
.acma-v3 .v3-form__note a { color: var(--v3-blue); }

/* Busy: the button shows a spinner in place of its arrow. */
.v3-form.is-busy .v3-form__submit { cursor: progress; }
.v3-form.is-busy .v3-form__submit .v3-arrow { opacity: 0; }
.v3-form.is-busy .v3-form__submit::after {
	content: ""; position: absolute; right: 22px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
	border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
	animation: v3-form-spin .8s linear infinite;
}

/* Sent: parts/v3-done.php with assets/css/v3-done.css. */
@keyframes v3-form-spin { to { transform: rotate(360deg); } }

@media (max-width: 991.98px) {
	.v3-lead__grid { grid-template-columns: minmax(0, 1fr); }
	.v3-lead__intro { position: static; }
}
@media (max-width: 639.98px) {
	.v3-form__grid { grid-template-columns: minmax(0, 1fr); }
	.v3-form__foot .v3-form__submit { width: 100%; justify-content: center; }
	/* Chips two by two in equal tiles, like the call back's best time; a lone last chip spans the row. */
	.v3-budget__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.acma-v3 .v3-budget__opt { display: flex; }
	.acma-v3 .v3-budget__opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.acma-v3 .v3-budget__opt span,
	.acma-v3 .v3-budget__opt input:checked ~ span {
		flex: 1; justify-content: center; padding: 8px 12px; border-radius: var(--v3-fld-r, 12px);
		white-space: normal; text-align: center; text-wrap: balance;
	}
}
/* Phones (mobile pass 2026-11-19): optional extras behind "Add details" (v3-form.js), and the
   contact rows and next steps after the form, which is the point of the section. */
.v3-form__more { display: none; }
@media (max-width: 639.98px) {
	.acma-v3 .v3-form.is-lean:not(.is-more) [data-v3-opt] { display: none; }
	.acma-v3 .v3-form__more {
		display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; width: 100%; min-height: var(--v3-tap);
		padding: 10px 16px; border: 1px dashed var(--v3-line); border-radius: var(--v3-fld-r, 12px); background: #fff;
		font: inherit; font-size: 15px; font-weight: 700; color: var(--v3-ink); text-align: left; cursor: pointer;
	}
	.acma-v3 .v3-form__more::before { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--v3-surface); font-size: 18px; line-height: 1; }
	.acma-v3 .v3-form__more[aria-expanded="true"]::before { content: "\2212"; }
	.acma-v3 .v3-form__more .v3-field__opt { font-weight: 400; color: var(--v3-muted); }
	.v3-lead__grid { display: flex; flex-direction: column; }
	.v3-lead__intro { display: contents; }
	.v3-lead__intro > * { order: -1; }
	.acma-v3 .v3-lead__intro > :is(.v3-lead__reach, .v3-lead__next-title, .v3-lead__next) { order: 1; }
	.acma-v3 .v3-lead__intro > .v3-lead__reach { width: 100%; margin-top: 0; }
	.acma-v3 .v3-lead__reach li { padding-block: 10px; }
	.acma-v3 .v3-lead__reach :is(a, button) { display: inline-flex; align-items: center; min-height: var(--v3-tap); }
}
@media (prefers-reduced-motion: reduce) {
	.v3-form.is-busy .v3-form__submit::after { animation-duration: 2.4s; }
}
