/* How it works page, fifth section (template-parts/hiw/control.php, docs/sections/hiw/hiw-what-you-control.png).
   Fonts and --amh-* colours: home-hero.css (body .amerlink-genesis-home). */

.hiw-control {
    position: relative;
    display: flex;
    min-height: clamp(520px, 37vw, 720px);
    align-items: center;
    overflow: hidden;
    padding: clamp(56px, 5vw, 96px) 0;
    background:
        radial-gradient(ellipse 50% 70% at 80% 40%, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 70%),
        linear-gradient(180deg, #f1f6fd 0%, #e8f0fa 100%);
    color: #33446a;
    isolation: isolate;
}

/* The student on the left, fading into the section under the text. */
.hiw-control-media {
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    width: 52%;
}

.hiw-control-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% 40%;
    -webkit-mask-image: linear-gradient(90deg, #000 68%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 68%, transparent 100%);
}

/* "Your / Future. / Your Choice." on the columns, as in the design. */
.hiw-control-handwritten {
    position: absolute;
    top: 20%;
    left: 64%;
    margin: 0;
    color: #fff;
    font-family: 'Segoe Print', 'Bradley Hand', cursive;
    font-size: clamp(26px, 2.4vw, 46px);
    font-style: italic;
    line-height: 1.25;
    text-shadow: 0 2px 14px rgba(0, 20, 60, .3);
    transform: rotate(-10deg);
}

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

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

.hiw-control-content {
    width: min(48%, 860px);
    margin-left: auto;
}

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

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

.hiw-control-description {
    margin: clamp(12px, 1vw, 18px) 0 0;
    font-size: clamp(16px, 1.15vw, 21px);
    line-height: 1.55;
}

.hiw-control-list {
    display: grid;
    gap: clamp(12px, 1.1vw, 20px);
    margin: clamp(22px, 2vw, 34px) 0 0;
    padding: 0;
    list-style: none;
}

.hiw-control-item {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1vw, 18px);
    margin: 0;
    padding: 0;
    color: #33446a;
    font-size: clamp(16px, 1.15vw, 21px);
    line-height: 1.4;
}

.hiw-control-check {
    width: clamp(28px, 2vw, 40px);
    height: clamp(28px, 2vw, 40px);
    flex: 0 0 auto;
    color: var(--amh-pink);
}

/* Narrow photo beside the text: its sides are cut off and the face moves right, under the note (< 30 px apart). */
@media (min-width: 901px) and (max-width: 1239px) {
    .hiw-control-handwritten {
        display: none;
    }
}

/* Tablets and phones: the photo as a strip above the text. */
@media (max-width: 900px) {
    .hiw-control {
        display: block;
        min-height: 0;
        padding-top: 0;
    }

    .hiw-control-media {
        position: relative;
        z-index: 0;
        width: 100%;
        height: clamp(300px, 62vw, 520px);
        margin-bottom: 8px;
    }

    .hiw-control-photo {
        object-position: 35% 35%;
        -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
    }

    .hiw-control-handwritten {
        top: 16%;
        left: auto;
        right: 6%;
        font-size: clamp(19px, 4.4vw, 34px);
    }

    .hiw-control-content {
        width: auto;
        max-width: 720px;
        margin-left: 0;
    }
}

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

/* Narrow phones: a smaller note closer to the edge, away from the face. */
@media (max-width: 420px) {
    .hiw-control-handwritten {
        right: 3%;
        font-size: 16px;
    }
}

@media (max-width: 340px) {
    .hiw-control-handwritten {
        display: none;
    }
}
