/**
 * Inline lead form — Phase 3 PR 9.
 *
 * Single-column 4-field form. Max-width 380px on desktop so it doesn't
 * dominate a section; full-width on mobile. Big touch targets (48px),
 * focus rings, inline validation messaging.
 */

.hales-lead-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    background: var(--paper, #FAF7F1);
    border: 1px solid var(--paper-edge, #D7D0C2);
    border-radius: var(--radius-md, 6px);
    box-shadow: var(--shadow-sm, 0 2px 6px rgba(14, 23, 41, 0.10));
    color: var(--text, #0E1729);
}

@media (min-width: 768px) {
    .hales-lead-form {
        max-width: 480px;
    }
}

.hales-lead-form__header {
    margin-bottom: 0.5rem;
}

.hales-lead-form__heading {
    margin: 0 0 0.5rem;
    font-family: 'Fraunces', Georgia, serif;
    font-size: var(--t-display-s, clamp(1.5rem, 1.3rem + 1vw, 2rem));
    line-height: var(--lh-tight, 1.3);
    letter-spacing: var(--ls-display, -0.02em);
    font-weight: 500;
    color: var(--text, #0E1729);
}

.hales-lead-form__sub {
    margin: 0;
    font-family: 'General Sans', system-ui, sans-serif;
    font-size: var(--t-body, 1rem);
    line-height: var(--lh-body, 1.55);
    color: var(--text-muted, #5A6378);
}

.hales-lead-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hales-lead-form__label {
    font-family: 'General Sans', system-ui, sans-serif;
    font-size: var(--t-body-s, 0.9375rem);
    font-weight: 600;
    color: var(--text, #0E1729);
}

.hales-lead-form__required {
    color: var(--gold-deep, #A37D2A);
    margin-left: 0.125rem;
}

.hales-lead-form__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 0.625rem 0.875rem;
    background: #fff;
    border: 1px solid var(--paper-edge, #D7D0C2);
    border-radius: var(--radius-sm, 4px);
    font-family: 'General Sans', system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--text, #0E1729);
    transition: border-color var(--dur-base, 220ms) var(--ease-out-soft, cubic-bezier(0.22, 1, 0.36, 1)),
                box-shadow var(--dur-base, 220ms) var(--ease-out-soft, cubic-bezier(0.22, 1, 0.36, 1));
}

.hales-lead-form__input:hover {
    border-color: var(--text-muted, #5A6378);
}

.hales-lead-form__input:focus,
.hales-lead-form__input:focus-visible {
    outline: none;
    border-color: var(--gold, #D4A24A);
    box-shadow: 0 0 0 2px rgba(212, 162, 74, 0.4);
}

.hales-lead-form__input[aria-invalid="true"] {
    border-color: var(--danger, #C04525);
    box-shadow: 0 0 0 2px rgba(192, 69, 37, 0.2);
}

.hales-lead-form__textarea {
    min-height: 88px;
    resize: vertical;
}

.hales-lead-form__input--zip {
    max-width: 8em;
    font-variant-numeric: tabular-nums;
}

.hales-lead-form__error {
    margin: 0;
    min-height: 1em;
    font-size: var(--t-caption, 0.8125rem);
    color: var(--danger, #C04525);
    line-height: 1.3;
}

.hales-lead-form__error:empty {
    display: none;
}

/* Honeypot — visually hidden, off-screen, AT-hidden. */
.hales-lead-form__honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Submit button */
.hales-lead-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 52px;
    padding: 0.875rem 1.5rem;
    background: var(--gold, #D4A24A);
    color: var(--text-on-gold, #011635);
    border: none;
    border-radius: var(--radius-sm, 4px);
    font-family: 'General Sans', system-ui, sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-gold, 0 6px 18px rgba(212, 162, 74, 0.32));
    transition: transform var(--dur-fast, 120ms) var(--ease-out-soft, cubic-bezier(0.22, 1, 0.36, 1)),
                background-color var(--dur-base, 220ms) var(--ease-out-soft, cubic-bezier(0.22, 1, 0.36, 1));
}

.hales-lead-form__submit:hover {
    background: var(--gold-bright, #F0CB6F);
    transform: translateY(-1px);
}

.hales-lead-form__submit:active {
    transform: translateY(0);
}

.hales-lead-form__submit:focus-visible {
    outline: 2px solid var(--ink, #011635);
    outline-offset: 3px;
}

.hales-lead-form__submit[disabled],
.hales-lead-form[data-state="submitting"] .hales-lead-form__submit {
    opacity: 0.6;
    cursor: progress;
    pointer-events: none;
}

.hales-lead-form__reassurance {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'General Sans', system-ui, sans-serif;
    font-size: var(--t-caption, 0.8125rem);
    color: var(--text-muted, #5A6378);
}

.hales-lead-form__reassurance .hales-icon {
    color: var(--success, #2D8259);
}

.hales-lead-form__status {
    margin: 0;
    font-family: 'General Sans', system-ui, sans-serif;
    font-size: var(--t-body-s, 0.9375rem);
    line-height: 1.4;
}

.hales-lead-form__status:empty { display: none; }

.hales-lead-form[data-state="success"] .hales-lead-form__status {
    color: var(--success, #2D8259);
    font-weight: 600;
}

.hales-lead-form[data-state="error"] .hales-lead-form__status {
    color: var(--danger, #C04525);
}
