/* ==========================================================================
   Lead Form Component — Shared (2026-11-20)
   --------------------------------------------------------------------------
   The site's in-page HubSpot form: label above a 60px field, required
   consent checkbox, Cloudflare Turnstile, status line, pill submit button.
   Markup: template-parts/forms/lead-form.php. Behaviour:
   assets/js/lead-form.js. Server: include/lead-form.php.

   Moved here unchanged from resources.css (.res-page .res-gate__*, Figma
   6240:31650) so the gated resources and the Contact Us page (Figma
   6995:48524) share one form. Not scoped to any page; page layouts adjust
   it from their own stylesheets (resources.css: centred button + mobile
   rules on gated pages; contact.css: full-width button).
   Loaded by: include/resources.php (Resources templates) and
   include/contact.php (Contact Us template).
   ========================================================================== */

.lead-form-card,
.lead-form {
    --lf-blue: #3D6BEA;
    --lf-blue-dark: #1238A0;
    --lf-blue-100: #D5DFFC;
    --lf-black: #2E2925;
    --lf-onix: #343A40;
    --lf-grey-600: #6C757D;
    --lf-grey-700: #495057;
    --lf-red: #E51F37;
}

.lead-form-card *,
.lead-form-card *::before,
.lead-form-card *::after,
.lead-form *,
.lead-form *::before,
.lead-form *::after {
    box-sizing: border-box;
}

/* Elements toggled with [hidden] that also have a display value here. */
.lead-form [hidden] {
    display: none;
}

/* White card the form sits in (Figma "//Form": 48px padding, Shadow/xl). */
.lead-form-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    border-radius: 15px;
    background: #FFFFFF;
    box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.1); /* Shadow/xl */
}

.lead-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    margin: 0;
}

.lead-form__fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.lead-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lead-form__label {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--lf-grey-700);
}

.lead-form__input {
    width: 100%;
    height: 60px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(222, 226, 230, 0.87);
    border-radius: 5px;
    background: #FFFFFF;
    box-shadow: 0 1px 1px rgba(73, 80, 87, 0.1);
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: var(--lf-onix);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lead-form__input:focus {
    outline: none;
    border-color: var(--lf-blue);
    box-shadow: 0 0 0 3px rgba(61, 107, 234, 0.1);
}

.lead-form__field.is-error .lead-form__input {
    border-color: var(--lf-red);
}

.lead-form__error {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: var(--lf-red);
}

/* Honeypot: off-screen, never seen or tabbed to. */
.lead-form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.lead-form__check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--lf-grey-700);
    cursor: pointer;
}

.lead-form__check input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--lf-blue);
    cursor: pointer;
}

.lead-form__field.is-error .lead-form__check input {
    outline: 1px solid var(--lf-red);
    outline-offset: 1px;
}

.lead-form__captcha {
    min-height: 65px; /* Turnstile widget height, so nothing jumps when it loads */
}

.lead-form__status {
    margin: -24px 0 0;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    color: var(--lf-red);
}

/* Submit: the sitewide a.com-btn look (style_new.css) on a <button>. */
.lead-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 46px;
    margin: 0;
    padding: 7px 26px;
    border: 0;
    border-radius: 50px;
    background: var(--lf-blue);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    text-transform: uppercase;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s ease, padding 0.3s ease;
}

.lead-form__submit i {
    transition: transform 0.3s ease;
}

.lead-form__submit:hover,
.lead-form__submit:focus-visible {
    padding-right: 40px;
    background: var(--lf-blue-dark);
}

.lead-form__submit:hover i,
.lead-form__submit:focus-visible i {
    transform: translateX(10px);
}

.lead-form__submit:focus-visible {
    outline: 2px solid var(--lf-blue);
    outline-offset: 2px;
}

.is-busy .lead-form__submit {
    opacity: 0.6;
    cursor: progress;
}

/* Variant: full-width button (Contact Us, Figma 6995:48524). The hover
   keeps the arrow nudge but not the extra right padding, which would
   push the centred label off-centre in a full-width button. */
.lead-form--wide-button .lead-form__submit {
    align-self: stretch;
    width: 100%;
}

.lead-form--wide-button .lead-form__submit:hover,
.lead-form--wide-button .lead-form__submit:focus-visible {
    padding-right: 26px;
}
