/* How it works page, first section (template-parts/hiw/hero.php, docs/sections/hiw/hiw-hero.png). Fonts, colours,
   buttons and the header over the hero: home-hero.css (body .amerlink-genesis-home). */

.hiw-hero {
    position: relative;
    min-height: min(820px, max(660px, 42vw));
    overflow: hidden;
    background: var(--amh-navy);
    color: #fff;
    isolation: isolate;
}

/* Photo on the right, under a navy gradient that carries the texts on the left. */
.hiw-hero-media {
    position: absolute;
    z-index: -2;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(57%, 1100px); /* starts past the texts: the faces stay clear of them */
}

.hiw-hero-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 22%;
}

.hiw-hero-shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        linear-gradient(90deg, #071f49 0%, #0b2c62 36%, rgba(14, 55, 117, .85) 44%, rgba(14, 55, 117, .3) 53%, rgba(14, 55, 117, 0) 62%),
        linear-gradient(180deg, rgba(0, 29, 63, .5) 0%, rgba(0, 29, 63, 0) 24%),
        linear-gradient(0deg, rgba(0, 27, 61, .4) 0%, rgba(0, 27, 61, 0) 20%);
}

/* "More / Than a Dream / A Plan" in the sky, as in the design (below the header menu). */
.hiw-hero-handwritten {
    position: absolute;
    top: clamp(180px, 13vw, 240px);
    right: 6%;
    margin: 0;
    color: #0c1d45;
    font-family: 'Segoe Print', 'Bradley Hand', cursive;
    font-size: clamp(24px, 2.1vw, 40px);
    font-style: italic;
    line-height: 1.22;
    text-align: center;
    transform: rotate(-10deg);
}

.hiw-hero-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-hero-inner {
    display: flex;
    width: min(100% - 64px, 1510px);
    min-height: inherit;
    flex-direction: column;
    justify-content: center;
    margin-inline: auto;
    padding: clamp(190px, 12vw, 220px) 0 clamp(56px, 4.5vw, 84px);
}

.hiw-hero-copy {
    width: min(100%, 46%, 820px);
}

.hiw-hero-eyebrow {
    margin: 0 0 18px;
    color: #d5e6f5;
    font-size: clamp(12px, .95vw, 16px);
    font-weight: 600;
    letter-spacing: .19em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hiw-hero-title {
    margin: 0 0 clamp(14px, 1.2vw, 22px);
    color: #fff;
    font-size: clamp(42px, 3.9vw, 70px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.04;
}

.hiw-hero-subtitle {
    margin: 0 0 clamp(12px, 1vw, 18px);
    color: #fff;
    font-size: clamp(19px, 1.55vw, 28px);
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.3;
}

.hiw-hero-description {
    width: min(100%, 650px);
    margin: 0 0 clamp(26px, 2.4vw, 40px);
    color: rgba(255, 255, 255, .92);
    font-size: clamp(16px, 1.2vw, 21px);
    line-height: 1.55;
}

.hiw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* The white button of the design: pink text on white (the primary button is the home one). */
.amh-button.hiw-button-light {
    border-color: #fff;
    background: #fff;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12);
    color: var(--amh-pink);
}

.amh-button.hiw-button-light:hover,
.amh-button.hiw-button-light:focus-visible {
    background: #fff4f9;
    color: #d90063;
}

.hiw-hero-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: clamp(22px, 2vw, 32px) 0 0;
    color: rgba(255, 255, 255, .88);
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.4;
}

.hiw-hero-note-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

/* Wide screens: the title on one line, as in the design (it still ends before the faces in the photo). */
@media (min-width: 1181px) {
    .hiw-hero-title {
        white-space: nowrap;
    }
}

/* Narrower: the photo starts further right, so the texts keep off the faces. */
@media (min-width: 1081px) and (max-width: 1180px) {
    .hiw-hero-media {
        width: 52%;
    }
}

/* Tablets: the photo shows more of its left side (the faces move right), the gradient stays under the texts. */
@media (max-width: 1080px) {
    .hiw-hero-media {
        width: 56%;
    }

    .hiw-hero-photo {
        object-position: 28% 22%;
    }

    .hiw-hero-shade {
        background:
            linear-gradient(90deg, #071f49 0%, #0b2c62 38%, rgba(14, 55, 117, .85) 50%, rgba(14, 55, 117, .35) 64%, rgba(14, 55, 117, 0) 76%),
            linear-gradient(180deg, rgba(0, 29, 63, .5) 0%, rgba(0, 29, 63, 0) 24%);
    }

    .hiw-hero-copy {
        width: min(100%, 46%);
    }

    /* The tablet crop puts the boy's head where the sky was. */
    .hiw-hero-handwritten {
        display: none;
    }
}

/* Narrow tablets: a narrower strip of the photo, from further left (the girl; the boy is out of the frame). */
@media (min-width: 781px) and (max-width: 900px) {
    .hiw-hero-media {
        width: 50%;
    }

    .hiw-hero-photo {
        object-position: 15% 22%;
    }
}

/* Phones: the texts first on navy, the photo under them (no text over the faces). */
@media (max-width: 780px) {
    .hiw-hero {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    .hiw-hero-inner {
        width: min(100% - 36px, 660px);
        min-height: 0;
        padding: 170px 0 34px;
    }

    .hiw-hero-copy {
        width: 100%;
    }

    .hiw-hero-shade {
        display: none;
    }

    .hiw-hero-media {
        position: relative;
        z-index: 0;
        order: 2;
        width: 100%;
        aspect-ratio: 883 / 793;
    }

    .hiw-hero-media::after {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, var(--amh-navy) 0%, rgba(0, 42, 84, 0) 26%);
        content: '';
    }

    .hiw-hero-photo {
        object-position: 50% 30%;
    }

    .hiw-hero-handwritten {
        z-index: 1;
        display: block;
        top: 15%;
        right: 5%;
        font-size: 19px;
    }

    .hiw-hero-actions {
        flex-direction: column;
        gap: 14px;
    }

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