/* Home call to action "Ready to Find Your Best-Fit U.S. College?" (template-parts/home/cta.php). Fonts, --amh-* colours
   and .amh-button: home-hero.css. Sizes follow the 2172 px wide design (1vw = 21.72 px there); the section is 20%
   lower than the design (26.67vw instead of 33.33vw), the texts and buttons keep the design's size. */

.amc-section {
    --amc-navy: #00214b;
    --amc-text: #d5deec;
    --amc-line: rgba(126, 161, 214, .28);
    --amc-photo: 29.1vw;
    position: relative;
    display: flex;
    overflow: hidden;
    min-height: clamp(380px, 26.67vw, 640px);
    align-items: center;
    background:
        radial-gradient(38% 60% at 16% 56%, rgba(0, 14, 38, .32), rgba(0, 14, 38, 0) 100%),
        radial-gradient(45% 70% at 100% 0, rgba(28, 88, 160, .45), rgba(28, 88, 160, 0) 70%),
        linear-gradient(180deg, #01275a 0%, #002049 55%, #001a3c 100%);
    color: #fff;
}

/* The photo on the right, its left side and both ends fading into the background. */
.amc-media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--amc-photo);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 42%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.amc-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 50% 40%;
}

.amc-inner {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    align-items: center;
    padding: clamp(40px, 3.4vw, 80px) clamp(20px, 3.5vw, 90px);
}

.amc-copy {
    width: 46.2vw;
    min-width: 0;
    flex: 0 0 auto;
}

.amc-title {
    margin: 0;
    padding: 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(26px, 2.1vw, 54px);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.amc-description {
    margin: clamp(8px, .75vw, 20px) 0 0;
    padding: 0;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(16px, 1.29vw, 33px);
    line-height: 1.35;
}

.amc-actions {
    display: flex;
    flex-wrap: wrap;
    margin-top: clamp(20px, 1.66vw, 42px);
    gap: clamp(12px, 1.5vw, 38px);
}

.amc-button {
    min-height: clamp(50px, 3.73vw, 96px);
    gap: clamp(14px, 1.3vw, 30px);
    padding: 8px clamp(18px, 1.4vw, 36px);
    border-radius: clamp(6px, .4vw, 10px);
    font-size: clamp(15px, 1.15vw, 29px);
    white-space: nowrap;
}

.amc-button-primary {
    min-width: 20.4vw;
    box-shadow: 0 0 clamp(16px, 1.3vw, 34px) rgba(245, 0, 114, .45);
}

.amc-button-primary span {
    font-size: 1.45em;
}

.amc-button-outline {
    min-width: 18.3vw;
    border-width: 1.5px;
    border-color: rgba(255, 255, 255, .88);
    background: rgba(0, 18, 46, .3);
}

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

/* Features: a line on their left, as in the design. */
.amc-features {
    display: grid;
    margin: 0 0 0 clamp(20px, 2.44vw, 62px);
    padding: clamp(10px, .7vw, 18px) 0 clamp(10px, .7vw, 18px) clamp(20px, 2.35vw, 60px);
    border-left: 1px solid var(--amc-line);
    gap: clamp(14px, 1.66vw, 42px);
    list-style: none;
}

.amc-feature {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: clamp(14px, 1.47vw, 38px);
    list-style: none;
}

.amc-feature-icon {
    display: grid;
    width: clamp(44px, 2.8vw, 72px);
    height: clamp(44px, 2.8vw, 72px);
    flex: 0 0 auto;
    place-items: center;
    border: 1.5px solid rgba(255, 255, 255, .78);
    border-radius: 50%;
}

.amc-feature-icon svg {
    width: 52%;
    height: 52%;
}

.amc-feature-copy {
    display: grid;
    margin: 0;
    padding: 0;
    gap: clamp(3px, .45vw, 11px);
}

.amc-feature-title {
    color: #fff;
    font-size: clamp(15px, .92vw, 24px);
    font-weight: 600;
    line-height: 1.25;
}

.amc-feature-text {
    color: var(--amc-text);
    font-size: clamp(13px, .82vw, 21px);
    line-height: 1.3;
}

/*
 * Tablets: the photo keeps the right 40%, the texts and the features one above the other on the left.
 */
@media (max-width: 1100px) {
    .amc-section {
        --amc-photo: 42%;
        min-height: 0;
    }

    .amc-image {
        object-position: 42% 30%;
    }

    .amc-inner {
        display: block;
        padding: 56px 32px;
    }

    .amc-copy,
    .amc-features {
        width: auto;
        max-width: 60%;
    }

    .amc-button-primary,
    .amc-button-outline {
        min-width: 0;
    }

    .amc-features {
        margin: 32px 0 0;
        padding: 26px 0 0;
        border-top: 1px solid var(--amc-line);
        border-left: 0;
    }
}

/*
 * Phones: the photo as a band above the texts (its middle: the cap, the hair and the campus), fading into the
 * background at the sides and the bottom.
 */
@media (max-width: 700px) {
    .amc-section {
        display: block;
        background: linear-gradient(180deg, #01275a 0%, var(--amc-navy) 40%, #001a3c 100%);
    }

    .amc-media {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: min(100%, 632px);
        margin-inline: auto;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, #000 0, #000 62%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, #000 0, #000 62%, transparent 100%);
    }

    .amc-image {
        height: auto;
        aspect-ratio: 632 / 400;
        object-position: 50% 38%;
    }

    .amc-inner {
        width: min(100% - 36px, 600px);
        margin: -28px auto 0;
        padding: 0 0 48px;
    }

    .amc-copy,
    .amc-features {
        max-width: none;
    }

    .amc-title {
        font-size: clamp(26px, 7vw, 32px);
        text-wrap: balance;
    }
}

@media (max-width: 520px) {
    .amc-actions {
        display: grid;
    }

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

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