/* Home "Two Paths" section (template-parts/home/two-paths.php). Fonts, --amh-* colours and .amh-button: home-hero.css. */

/*
 * Wide screens: the texts sit on the photo where the design has them. The section keeps the photo's proportions
 * (1916 x 821) and every position and size is a share of its width, so the texts stay clear of the two people.
 */
.amt-section {
    --amt-blue: #0a7cf2;
    --amt-navy: #0a1b46;
    position: relative;
    overflow: hidden;
    min-height: clamp(460px, 42.85vw, 860px);
    background: var(--amt-navy);
    color: #fff;
}

.amt-media {
    position: absolute;
    inset: 0;
}

.amt-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
}

/* Soft shade under the three texts. */
.amt-media::after {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(24% 34% at 14% 56%, rgba(4, 16, 48, .5), rgba(4, 16, 48, 0) 100%),
        radial-gradient(18% 30% at 50% 46%, rgba(4, 16, 48, .42), rgba(4, 16, 48, 0) 100%),
        radial-gradient(22% 34% at 87% 56%, rgba(4, 16, 48, .5), rgba(4, 16, 48, 0) 100%);
    content: '';
}

.amt-inner {
    position: absolute;
    inset: 0;
}

.amt-title {
    position: absolute;
    z-index: 1;
    top: 34%;
    left: 50%;
    width: max-content;
    max-width: 26%;
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(30px, 2.3vw, 50px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.22;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
    transform: translateX(-50%);
}

.amt-title::after {
    display: block;
    width: 40%;
    height: 4px;
    margin: .5em auto 0;
    border-radius: 100%;
    background: var(--amh-pink);
    content: '';
}

.amt-path {
    position: absolute;
    top: 44%;
}

.amt-path-academic {
    left: 4.1%;
    width: 21.5%;
}

.amt-path-athletic {
    right: 3.6%;
    width: 18.6%;
}

.amt-path-title {
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(18px, 1.25vw, 28px);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.25;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}

.amt-path-description {
    margin: .5em 0 1.35em;
    color: #e3ecfb;
    font-size: clamp(14px, 1.02vw, 21px);
    line-height: 1.45;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}

.amt-button {
    min-height: clamp(44px, 3.2vw, 62px);
    white-space: nowrap;
    gap: 14px;
    padding: 8px clamp(18px, 2.2vw, 42px);
    background: var(--amt-blue);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    font-size: clamp(14px, .98vw, 19px);
}

.amt-button:hover,
.amt-button:focus-visible {
    background: #0b6ad6;
}

.amt-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.amt-arrow {
    width: 1.1em;
    height: 1.1em;
    flex: 0 0 auto;
}

/*
 * Narrower screens: the photo above, the headline and both paths below it. Only the middle of the photo (both
 * people) is shown, so the parts where the design had the side texts stay out; it is at most 75% of the screen
 * height tall (narrower than the screen on landscape tablets), with its sides fading into the background.
 */
@media (max-width: 1150px) {
    .amt-section {
        min-height: 0;
    }

    .amt-media {
        position: relative;
        inset: auto;
        width: min(100%, calc(75vh * 1120 / 821));
        margin-inline: auto;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    }

    .amt-image {
        height: auto;
        aspect-ratio: 1120 / 821;
        object-position: 52.7% 50%;
    }

    .amt-media::after {
        background: linear-gradient(180deg, rgba(10, 27, 70, .15) 0%, rgba(10, 27, 70, 0) 45%, var(--amt-navy) 100%);
    }

    .amt-inner {
        position: relative;
        inset: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 32px;
        width: min(100% - 64px, 1100px);
        margin: 0 auto;
        padding: 8px 0 clamp(48px, 6vw, 72px);
    }

    /* Between the two people of the cropped photo: sized from the photo box width (100vw or 75vh * 1120 / 821). */
    .amt-title {
        left: 48.5%;
        max-width: 40%;
        font-size: min(4.1vw, 4.19vh);
    }

    .amt-path {
        position: static;
        width: auto;
        padding: clamp(20px, 2.4vw, 28px);
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 12px;
        background: rgba(255, 255, 255, .05);
    }

    .amt-path-title {
        font-size: clamp(20px, 2.2vw, 24px);
    }

    .amt-path-description {
        font-size: clamp(15px, 1.6vw, 17px);
    }
}

@media (max-width: 780px) {
    .amt-inner {
        grid-template-columns: minmax(0, 1fr);
        width: min(100% - 36px, 660px);
    }
}

/* Phones: the headline under the photo. */
@media (max-width: 520px) {
    .amt-title {
        position: relative;
        top: auto;
        left: auto;
        width: auto;
        max-width: none;
        padding: 4px 18px 0;
        font-size: clamp(26px, 7vw, 32px);
        transform: none;
    }

    .amt-title br {
        display: none;
    }

    .amt-title::after {
        width: 120px;
    }

    .amt-button {
        width: 100%;
        white-space: normal;
    }
}

/* Phones: the line breaks typed in the panel would leave a single word on a line ("Intelligent / Platform."); the heading
   wraps on its own, balanced. */
@media (max-width: 520px) {
    .amt-title {
        text-wrap: balance;
    }

    .amt-title br {
        display: none;
    }
}
