/* How it works page, last section (template-parts/hiw/cta.php, docs/sections/hiw/hiw-potentail.png). Fonts, --amh-*
   colours and .amh-button: home-hero.css (body .amerlink-genesis-home). */

.hiw-cta {
    position: relative;
    display: flex;
    min-height: clamp(560px, 40vw, 780px);
    align-items: center;
    overflow: hidden;
    padding: clamp(56px, 5vw, 96px) 0;
    background: #f3f7fd;
    color: #33446a;
    isolation: isolate;
}

/* The photo across the whole section; the sky on the left is lightened under the texts. */
.hiw-cta-media {
    position: absolute;
    z-index: -1;
    inset: 0;
}

.hiw-cta-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(246, 249, 254, .82) 0%, rgba(246, 249, 254, .62) 32%, rgba(246, 249, 254, 0) 56%);
    content: '';
}

.hiw-cta-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 50%;
}

/* "More / Than a Dream / A Plan" in the sky on the right, as in the design. */
.hiw-cta-handwritten {
    position: absolute;
    z-index: 1;
    top: 11%;
    right: 2.5%;
    margin: 0;
    color: #0c1d45;
    font-family: 'Segoe Print', 'Bradley Hand', cursive;
    font-size: clamp(26px, 2.3vw, 46px);
    font-style: italic;
    line-height: 1.22;
    text-align: center;
    transform: rotate(-10deg);
}

.hiw-cta-handwritten::after {
    display: block;
    width: 78%;
    height: 3px;
    margin: 10px 0 0 auto;
    border-radius: 3px;
    background: var(--amh-pink);
    content: '';
    transform: rotate(-6deg);
}

.hiw-cta-inner {
    width: min(100% - 64px, 1510px);
    margin-inline: auto;
}

/* Left of the student in the photo. */
.hiw-cta-content {
    max-width: min(860px, calc(56vw - 32px));
}

.hiw-cta-eyebrow {
    margin: 0 0 clamp(8px, .7vw, 14px);
    color: var(--amh-pink);
    font-size: clamp(13px, 1vw, 18px);
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hiw-cta-title {
    margin: 0;
    padding: 0;
    color: var(--amh-navy);
    font-family: inherit;
    font-size: clamp(32px, 3.2vw, 62px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.hiw-cta-description {
    max-width: 820px;
    margin: clamp(14px, 1.2vw, 22px) 0 0;
    color: #2c3d63;
    font-size: clamp(16px, 1.2vw, 22px);
    line-height: 1.55;
}

.hiw-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(14px, 1.2vw, 24px);
    margin-top: clamp(24px, 2.2vw, 40px);
}

.amh-button.hiw-cta-button-outline {
    border: 2px solid var(--amh-navy);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
    color: var(--amh-navy);
}

.hiw-cta-button-outline span {
    font-family: Arial, sans-serif;
    font-size: 27px;
    font-weight: 400;
    line-height: .7;
}

.amh-button.hiw-cta-button-outline:hover,
.amh-button.hiw-cta-button-outline:focus-visible {
    background: var(--amh-navy);
    color: #fff;
}

.hiw-cta-actions .amh-button:focus-visible {
    outline: 3px solid var(--amh-blue);
    outline-offset: 2px;
}

.hiw-cta-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: clamp(20px, 1.8vw, 32px) 0 0;
    color: #33446a;
    font-size: clamp(14px, 1vw, 18px);
    line-height: 1.4;
}

.hiw-cta-note-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

/* Tablets and phones: the texts on the light background, the photo as a strip under them. */
@media (max-width: 1180px) {
    .hiw-cta {
        display: flex;
        min-height: 0;
        flex-direction: column-reverse;
        align-items: stretch;
        padding: clamp(48px, 7vw, 72px) 0 0;
    }

    .hiw-cta-media {
        position: relative;
        z-index: 0;
        height: clamp(300px, 48vw, 520px);
        margin-top: clamp(28px, 4vw, 44px);
    }

    .hiw-cta-media::after {
        background: linear-gradient(180deg, #f3f7fd 0%, rgba(243, 247, 253, 0) 28%);
    }

    .hiw-cta-photo {
        object-position: 72% 40%;
    }

    /* On the sky left of the student: on the right it would cover his head. */
    .hiw-cta-handwritten {
        top: 16%;
        right: auto;
        left: 5%;
        font-size: clamp(18px, 3vw, 32px);
    }

    .hiw-cta-content {
        max-width: 760px;
    }
}

@media (max-width: 600px) {
    .hiw-cta-inner {
        width: min(100% - 36px, 660px);
    }

    .hiw-cta-actions {
        flex-direction: column;
    }

    .hiw-cta-actions .amh-button {
        width: 100%;
    }
}
