
/*
 * Volunteer landing page
 *
 * Talarico-inspired split layout:
 * - Campaign introduction on the left
 * - Contrasting volunteer form on the right
 * - Stacked full-width panels on mobile
 *
 * Retains site themes, navbar and footer.
 */

.page-get-involved .volunteer-landing {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    min-height: max(
        42rem,
        calc(100svh - var(--site-header-height, 4.5rem))
    );
}

/*
 * Introduction panel
 */

.volunteer-landing__intro {
    display: flex;
    align-items: flex-start;

    min-width: 0;

    padding:
        clamp(3rem, 7vw, 7rem)
        clamp(1.5rem, 5vw, 6rem);

    background: var(--color-surface-primary);
    color: var(--color-text-primary);
}

.volunteer-landing__intro-inner {
    width: min(100%, 34rem);
    margin-left: auto;
}

.volunteer-landing__eyebrow {
    margin: 0 0 var(--space-5);

    color: var(--color-link);

    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 800;

    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.volunteer-landing__title {
    max-width: 19ch;

    margin: 0;

    font-family: var(--font-sans);
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.22;

    letter-spacing: 0.045em;
}

.volunteer-landing__copy {
    max-width: 43ch;
    margin-top: var(--space-7);

    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
}

.volunteer-landing__copy p {
    margin: 0 0 var(--space-4);
}

.volunteer-landing__copy p:last-child {
    margin-bottom: 0;
}

/*
 * Dark form panel
 */

.volunteer-landing__form-panel {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;

    min-width: 0;

    padding:
        clamp(3rem, 7vw, 7rem)
        clamp(1.5rem, 5vw, 6rem);

    background: var(--color-surface-contrast);
    color: var(--color-text-on-contrast);
}

.volunteer-landing__form-inner {
    width: min(100%, 27rem);
}

.volunteer-form {
    position: relative;

    width: 100%;

    color: var(--color-text-on-contrast);
    font-family: var(--font-sans);
}

/*
 * Stack all fields vertically.
 *
 * These selectors override the generic
 * two-column signup-form grid for this page only.
 */

.volunteer-form .signup-form__fields {
    display: grid;

    grid-template-columns: minmax(0, 1fr);

    align-items: stretch;

    gap: 0.85rem;
}

.volunteer-form .signup-form__fields > * {
    grid-column: 1 / -1;
}

.volunteer-form .form-field {
    min-width: 0;
    gap: 0.3rem;
}

.volunteer-form .form-field__label {
    margin: 0;

    color: var(--color-text-on-contrast);

    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.3;

    letter-spacing: 0.035em;
}

.volunteer-form .form-field__input {
    display: block;

    width: 100%;
    min-width: 0;
    min-height: 3rem;

    padding: 0.7rem 0.85rem;

    border: 1px solid var(--color-text-on-contrast);
    border-radius: var(--radius-sm);

    background: transparent;
    color: var(--color-text-on-contrast);

    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.35;

    box-shadow: none;
}

.volunteer-form .form-field__input:focus {
    border-color: var(--color-action-on-contrast);

    outline: 3px solid var(--color-action-on-contrast);
    outline-offset: 2px;

    box-shadow: none;
}

.volunteer-form .form-field__input::placeholder {
    color: var(--color-text-on-contrast);
    opacity: 0.7;
}

/*
 * Sign up action
 */

.volunteer-form .signup-form__button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 3.1rem;

    margin-top: 0.4rem;
    padding: 0.7rem 1rem;

    border: 2px solid var(--color-surface-primary);
    border-radius: var(--radius-sm);

    background: var(--color-surface-primary);
    color: var(--color-text-primary);

    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;

    letter-spacing: 0.07em;
    text-transform: uppercase;

    cursor: pointer;
}

.volunteer-form .signup-form__button:hover,
.volunteer-form .signup-form__button:focus-visible {
    border-color: var(--color-action);
    background: var(--color-action);
    color: var(--color-action-text);

    transform: none;
}

.volunteer-form .signup-form__button:focus-visible {
    outline: 3px solid var(--color-action-on-contrast);
    outline-offset: 3px;
}

.volunteer-form .signup-form__button:disabled {
    opacity: 0.65;
    cursor: wait;
}

/*
 * Consent and validation message
 */

.volunteer-form .signup-form__note {
    max-width: 42rem;
    margin: 1.5rem 0 0;

    color: var(--color-text-on-contrast);

    font-family: var(--font-sans);
    font-size: 0.78rem;
    line-height: 1.55;
}

.volunteer-form .signup-form__note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.volunteer-form .volunteer-form__error {
    margin-top: 0.9rem;
    font-weight: 700;
}

.volunteer-form .volunteer-form__error[hidden] {
    display: none;
}

/*
 * Reuse existing AJAX confirmation.
 */

.volunteer-landing__form-panel
.signup-form__confirmation {
    color: var(--color-text-on-contrast);

    font-family: var(--font-sans);
    line-height: 1.5;
}

.volunteer-landing__form-panel
.signup-form__confirmation .signup-form__note {
    color: var(--color-text-on-contrast);
}

/*
 * Visually hide the anti-spam field.
 * Do not use display:none; some bots only
 * fill rendered fields.
 */

.volunteer-form__honeypot {
    position: absolute;

    left: -10000px;
    top: 0;

    width: 1px;
    height: 1px;

    overflow: hidden;
}

/*
 * Respect the Underline links accessibility option
 * for the submit button label as well.
 */

:root[data-a11y-underline-links="true"]
.volunteer-form__submit > span:first-child {
    text-decoration: underline solid currentColor !important;
    text-underline-offset: 0.2em;
}

/*
 * Tablet and mobile: introduction first,
 * then the full-width form.
 */

@media (max-width: 52rem) {
    .page-get-involved .volunteer-landing {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .volunteer-landing__intro {
        padding: 3.5rem 1.5rem;
    }

    .volunteer-landing__form-panel {
        padding: 3.5rem 1.5rem 4rem;
    }

    .volunteer-landing__intro-inner,
    .volunteer-landing__form-inner {
        width: min(100%, 35rem);
        margin-inline: auto;
    }

    .volunteer-landing__title {
        font-size: clamp(1.8rem, 5vw, 2.35rem);
    }

    .volunteer-landing__copy {
        margin-top: var(--space-5);
    }
}

@media (max-width: 32rem) {
    .volunteer-landing__intro {
        padding: 2.75rem 1.25rem 3rem;
    }

    .volunteer-landing__form-panel {
        padding: 3rem 1.25rem 3.5rem;
    }

    .volunteer-landing__title {
        font-size: clamp(1.65rem, 6vw, 2rem);
    }

    .volunteer-form .form-field__input {
        min-height: 3.1rem;
    }

    .volunteer-form .signup-form__button {
        min-height: 3.1rem;
    }
}
