/* Agent Referral page polish — intentionally isolated from shared site components. */

.referral-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(4.5rem, 9vw, 7.25rem) 1.25rem;
    background:
        linear-gradient(130deg, rgba(21, 32, 68, 0.98), rgba(35, 52, 109, 0.94)),
        url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?q=80&w=1600") center 58% / cover;
    color: #ffffff;
    text-align: center;
}

.referral-hero::before,
.referral-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.referral-hero::before {
    width: 22rem;
    height: 22rem;
    top: -13rem;
    left: -7rem;
}

.referral-hero::after {
    width: 28rem;
    height: 28rem;
    right: -12rem;
    bottom: -22rem;
    box-shadow: 0 0 0 3rem rgba(255, 255, 255, 0.035);
}

.referral-hero__inner {
    width: min(100%, 860px);
    margin: 0 auto;
}

.referral-hero__eyebrow,
.referral-offer__eyebrow,
.referral-form__eyebrow {
    display: block;
    margin: 0 0 1rem;
    color: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1.4;
    text-transform: uppercase;
}

.referral-hero__eyebrow::before,
.referral-hero__eyebrow::after {
    content: "";
    display: inline-block;
    width: 3.5rem;
    height: 1px;
    margin: 0 1rem 0.25rem;
    background: currentColor;
    opacity: 0.5;
}

.referral-hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.referral-hero__audience {
    margin: 0.75rem 0 0;
    color: #f1c768;
    font-family: "Shippori Mincho", serif;
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    font-style: italic;
}

.referral-hero__summary {
    width: min(100%, 680px);
    margin: 1.25rem auto 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
}

.referral-hero__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin-top: 1.75rem;
    padding: 0.2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease;
}

.referral-hero__action:hover,
.referral-hero__action:focus-visible {
    background: #ffffff;
    color: #23346d;
}

/* Preserve the client's split offer while giving it a deliberate card treatment. */
.promo-split-section.referral-offer {
    box-sizing: border-box;
    width: min(calc(100% - 2.5rem), 1280px);
    min-height: 0;
    margin: clamp(2.5rem, 6vw, 5rem) auto;
    background: #ffffff;
    border: 1px solid #e0dcd3;
    border-radius: 1.25rem;
    box-shadow: 0 18px 50px rgba(35, 52, 109, 0.1);
}

.referral-offer .promo-content {
    box-sizing: border-box;
    padding: clamp(2.25rem, 5vw, 4.5rem);
}

.referral-offer__eyebrow {
    margin-bottom: 1.25rem;
    color: #23346d;
}

.referral-offer .u-180143e156 {
    max-width: 620px;
    font-size: clamp(2.35rem, 4vw, 3.7rem) !important;
    line-height: 1.08 !important;
}

.referral-offer .u-5eb66149be {
    max-width: 620px;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
    font-size: clamp(1.1rem, 2vw, 1.35rem) !important;
    line-height: 1.55 !important;
}

.referral-offer .u-e7c77887d6 {
    box-sizing: border-box;
    max-width: 620px;
    margin-bottom: 2rem !important;
    border-radius: 0 0.75rem 0.75rem 0 !important;
}

.referral-offer .works-container {
    max-width: 620px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.referral-offer .works-title {
    margin-bottom: 1.5rem;
}

.referral-offer .promo-image {
    align-self: stretch;
    height: auto;
    min-height: 34rem;
    border-left-width: 6px;
    border-top-left-radius: 9rem;
}

/* Improve the handoff from the offer into the existing form. */
.content-area.referral-form-section {
    scroll-margin-top: 13rem;
    padding: clamp(3.5rem, 7vw, 6rem) 1.25rem !important;
    background: linear-gradient(180deg, #f8f6f0 0%, #ffffff 100%) !important;
}

.referral-form-section .help-card {
    box-sizing: border-box;
    max-width: 760px;
    padding: clamp(1.5rem, 5vw, 3.5rem);
    border: 1px solid #e0dcd3;
    border-top: 5px solid #23346d;
    border-radius: 1rem;
    box-shadow: 0 18px 45px rgba(35, 52, 109, 0.1);
}

.referral-form__eyebrow {
    margin-bottom: 0.75rem;
    color: #23346d;
    text-align: center;
}

.referral-form-section .u-dec9f92f5e {
    margin-bottom: 0.75rem !important;
    font-size: clamp(2rem, 5vw, 3rem);
}

.referral-form__intro {
    max-width: 560px;
    margin: 0 auto 2.5rem;
    color: #555555;
    font-size: 1.05rem;
    line-height: 1.65;
    text-align: center;
}

.referral-form-section form h3 {
    margin-top: 2.75rem;
    margin-bottom: 1.5rem;
}

.referral-form-section form h3:first-of-type {
    margin-top: 0;
}

.referral-form-section input,
.referral-form-section textarea {
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .site-header .menu-link,
    .site-header .dropbtn {
        box-sizing: border-box;
    }

    .referral-hero {
        padding-block: 4.25rem;
    }

    .referral-hero__eyebrow::before,
    .referral-hero__eyebrow::after {
        width: 1.5rem;
        margin-inline: 0.55rem;
    }

    .promo-split-section.referral-offer {
        flex-direction: column;
        width: min(calc(100% - 2rem), 680px);
        margin-block: 2rem 3.5rem;
    }

    .referral-offer .promo-content {
        order: 1;
        width: 100%;
        text-align: center;
    }

    .referral-offer .promo-image {
        order: 2;
        width: 100%;
        min-height: 16rem;
        border-top: 5px solid #23346d;
        border-left: 0;
        border-radius: 4.5rem 0 0 0;
    }

    .referral-offer .u-e7c77887d6,
    .referral-offer .works-container {
        margin-inline: auto;
        text-align: left;
    }

    .referral-offer .steps-row {
        gap: 0.35rem;
    }

    .referral-offer .icon-wrapper {
        padding: 0.75rem;
    }

    .referral-offer .step-arrow {
        font-size: 1.1rem;
    }

    .referral-offer .step-text {
        font-size: 0.86rem;
    }

    .content-area.referral-form-section {
        scroll-margin-top: 7rem;
        padding-inline: 1rem !important;
    }

    .referral-form-section .help-card {
        padding-inline: 1.25rem;
    }

    .referral-form-section form h3 {
        font-size: 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .referral-hero__action {
        transition: none;
    }
}
