:root {
    --ipm-red: #a20b13;
    --ipm-red-dark: #76070c;
    --ipm-navy: #17212b;
    --ipm-text: #3f454b;
    --ipm-muted: #697179;
    --ipm-line: #d9dde1;
    --ipm-soft: #f4f5f6;
    --ipm-white: #ffffff;
}

.ipm-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.ipm-page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(54px, 8vw, 96px) 0;
    color: var(--ipm-white);
    background: linear-gradient(118deg, var(--ipm-red-dark), var(--ipm-red) 66%, #c2252d);
}

.ipm-page-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -120px;
    top: -160px;
    border: 42px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
}

.ipm-page-hero h1 {
    margin: 4px 0 14px;
    font-size: clamp(2.35rem, 6vw, 4.5rem);
    line-height: 1;
    font-weight: 700;
}

.ipm-page-hero p:last-child {
    max-width: 740px;
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.ipm-eyebrow {
    margin: 0;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.ipm-contact-main {
    padding: clamp(48px, 7vw, 88px) 0;
    background: var(--ipm-soft);
}

.ipm-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr);
    gap: 32px;
    align-items: start;
}

.ipm-contact-card,
.ipm-contact-aside {
    background: var(--ipm-white);
    box-shadow: 0 18px 50px rgba(23, 33, 43, .08);
}

.ipm-contact-card {
    padding: clamp(24px, 5vw, 56px);
}

.ipm-section-heading {
    margin-bottom: 30px;
}

.ipm-section-heading .ipm-eyebrow,
.ipm-contact-aside .ipm-eyebrow {
    color: var(--ipm-red);
}

.ipm-section-heading h2,
.ipm-contact-aside h2 {
    margin: 8px 0 10px;
    color: var(--ipm-navy);
    font-size: clamp(1.65rem, 3vw, 2.3rem);
}

.ipm-section-heading p,
.ipm-contact-aside p {
    color: var(--ipm-muted);
}

.required {
    color: var(--ipm-red);
}

.ipm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.ipm-field-full {
    grid-column: 1 / -1;
}

.ipm-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--ipm-navy);
    font-weight: 700;
}

.ipm-field input,
.ipm-field select,
.ipm-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--ipm-line);
    border-radius: 2px;
    background: var(--ipm-white);
    color: var(--ipm-text);
    font: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ipm-field textarea {
    min-height: 180px;
    resize: vertical;
}

.ipm-field input:focus,
.ipm-field select:focus,
.ipm-field textarea:focus {
    outline: 0;
    border-color: var(--ipm-red);
    box-shadow: 0 0 0 3px rgba(162, 11, 19, .12);
}

.field-validation-error,
.validation-summary-errors {
    display: block;
    margin-top: 6px;
    color: var(--ipm-red);
    font-size: .88rem;
}

.input-validation-error {
    border-color: var(--ipm-red) !important;
}

.validation-summary-valid,
.field-validation-valid {
    display: none;
}

.ipm-consent {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-top: 28px;
}

.ipm-consent input {
    width: 19px;
    height: 19px;
    margin-top: 3px;
    accent-color: var(--ipm-red);
}

.ipm-consent a {
    color: var(--ipm-red);
    font-weight: 700;
}

.ipm-captcha-wrap {
    margin: 24px 0;
    min-height: 78px;
}

.ipm-submit-button {
    min-width: 190px;
    min-height: 52px;
    padding: 13px 28px;
    border: 0;
    color: var(--ipm-white);
    background: var(--ipm-red);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.ipm-submit-button:hover:not(:disabled) {
    background: var(--ipm-red-dark);
    transform: translateY(-1px);
}

.ipm-submit-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ipm-contact-aside {
    position: sticky;
    top: 24px;
    padding: 34px;
    overflow: hidden;
}

.ipm-aside-accent {
    width: 64px;
    height: 5px;
    margin-bottom: 28px;
    background: var(--ipm-red);
}

.ipm-contact-note {
    margin-top: 28px;
    padding: 20px;
    border-left: 4px solid var(--ipm-red);
    background: var(--ipm-soft);
}

.ipm-contact-note strong {
    color: var(--ipm-navy);
}

.ipm-contact-note p {
    margin: 7px 0 0;
}

.ipm-alert {
    margin-bottom: 24px;
    padding: 15px 18px;
    border-left: 4px solid;
}

.ipm-alert-success {
    border-color: #16824b;
    background: #eaf7f0;
    color: #0d6036;
}

.ipm-alert-error {
    border-color: var(--ipm-red);
    background: #fff1f2;
    color: var(--ipm-red-dark);
}

.ipm-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

/* Keep the full desktop form visible and comfortable on 14-inch laptops. */
@media (min-width: 901px) and (max-width: 1920px) {
    .ipm-container {
        width: min(1080px, calc(100% - 48px));
    }

    .ipm-page-hero {
        padding: 48px 0;
    }

    .ipm-page-hero h1 {
        margin-bottom: 10px;
        font-size: clamp(2.4rem, 4vw, 3.35rem);
    }

    .ipm-contact-main {
        padding: 48px 0 60px;
    }

    .ipm-contact-grid {
        grid-template-columns: minmax(0, 2fr) minmax(250px, .72fr);
        gap: 24px;
    }

    .ipm-contact-card {
        padding: 36px;
    }

    .ipm-section-heading {
        margin-bottom: 22px;
    }

    .ipm-section-heading h2,
    .ipm-contact-aside h2 {
        font-size: clamp(1.55rem, 2.4vw, 2rem);
    }

    .ipm-form-grid {
        gap: 16px 18px;
    }

    .ipm-field label {
        margin-bottom: 5px;
    }

    .ipm-field input,
    .ipm-field select,
    .ipm-field textarea {
        min-height: 44px;
        padding: 9px 12px;
    }

    .ipm-field textarea {
        min-height: 140px;
    }

    .ipm-consent {
        margin-top: 22px;
    }

    .ipm-captcha-wrap {
        margin: 18px 0;
    }

    .ipm-submit-button {
        min-height: 46px;
        padding: 11px 24px;
    }

    .ipm-contact-aside {
        padding: 28px;
    }

    .ipm-aside-accent {
        margin-bottom: 22px;
    }

    .ipm-contact-note {
        margin-top: 22px;
        padding: 16px;
    }
}

@media (max-width: 900px) {
    .ipm-contact-grid {
        grid-template-columns: 1fr;
    }

    .ipm-contact-aside {
        position: static;
    }
}

@media (max-width: 640px) {
    .ipm-container {
        width: min(100% - 28px, 1180px);
    }

    .ipm-form-grid {
        grid-template-columns: 1fr;
    }

    .ipm-field-full {
        grid-column: auto;
    }

    .g-recaptcha {
        transform: scale(.88);
        transform-origin: left top;
    }

    .ipm-submit-button {
        width: 100%;
    }
}
