/* temp: */

.menu ul {
    display: flex;
    gap: 50px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* hero */

.hero__inner {
    position: relative;
    min-height: 75vh;

    /* background photos top out around 1920px wide — past this the full-bleed
       .container-fluid would stretch them beyond their native resolution on
       large/ultrawide monitors, so cap and center the card instead */

    max-width: 2560px;
    margin-inline: auto;

    padding: 50px 85px;
    border-radius: 16px;
    overflow: hidden;

    display: flex;
    justify-content: start;
    align-items: end;
}

section.hero.has-inner-container {
    position: relative;
    padding: 16px;
}

/*internal heros have less height to show below fold content*/

.hero--internal .hero__inner {
    min-height: 60vh;
    max-height: 65vh;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* alerts (home hero only): pre-shrink the hero so its bottom stays above the */
/* fold from the very first paint, then expand back out once the alert closes */

.hero--home {
    /* Shared with the bar's own collapse (alerts.css). The bar shrinking and the
	   hero growing back are one gesture, so they have to run on identical
	   timing — declared once here and inherited. */
    --alerts-collapse-dur: 0.5s;
    --alerts-collapse-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only animate once alerts.js has published the real measurement — otherwise
   the correction away from the fallback below animates on page load, which
   looks like the hero settling by itself. */
.hero--home.hero--alerts-ready .hero__inner {
    transition: min-height var(--alerts-collapse-dur) var(--alerts-collapse-ease);
}

.hero--home:has(.hero__alerts:not(.closed):not(.dismissed) .hero__alert) .hero__inner {
    /* --alerts-space is the space the bar actually occupies — its own box plus
	   the negative margin that tucks it under the hero's corners — measured in
	   alerts.js and kept current as the bar reflows. The 140px fallback was the
	   old hardcoded figure; it only covers the first paint now, and no longer
	   drifts out of true the moment an editor writes a longer alert. */
    /* floored so an unusually long alert cannot crush the hero to nothing; in
	   the normal case the floor never engages and the hero grows back by
	   exactly what the bar gives up */
    min-height: max(45vh, calc(75vh - var(--alerts-space, 140px)));
}

@media (prefers-reduced-motion: reduce) {
    .hero--home.hero--alerts-ready .hero__inner {
        transition: none;
    }
}

.hero--home .hero__background {
    /* fixed to the hero's normal height so the image never rescales/recrops when
       an open alert shrinks hero__inner above; its overflow just clips the extra
       off the bottom instead */
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    /* height: 75vh; */
    height: 100%;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* background: */

.hero__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero__background__image-slider,
.hero__background__image-slider .hero__background__slides,
.hero__background__image-slider .hero__background__slides .splide__track {
    width: 100%;
    height: 100%;
}

.hero__background__image-slider,
.hero__background__image {
    position: relative;
}

/*z indexes*/
.hero__background__image,
.hero__background__slides {
    z-index: auto;
    height: 100%;
}

.hero__background__slides .splide__arrows,
.hero__background__slides .splide__pagination {
    z-index: 10;
}

/*gradient*/
.hero__background__gradient {
    z-index: 2;
    top: unset;
    bottom: 0;
    height: 55%;
    background: var(--black-overlay-gradient);
}
.hero--blog-single .hero__background__gradient {
    height: 80%;
}

/*images*/
.hero__background__image img,
.hero__background__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/*default position*/
.hero__background__image img,
.hero__background__slide img {
    object-position: center;
}
/*img positions*/
.hero.hero--img-top .hero__background__image img,
.hero.hero--img-top .hero__background__slide img {
    object-position: top;
}
.hero.hero--img-center .hero__background__image img,
.hero.hero--img-center .hero__background__slide img {
    object-position: center;
}
.hero.hero--img-bottom .hero__background__image img,
.hero.hero--img-bottom .hero__background__slide img {
    object-position: bottom;
}

/*splide controls*/
.hero__background__slides .splide__arrows {
    position: absolute;
    right: 85px;
    bottom: 50px;
    z-index: 10;
}

.hero ul.splide__pagination {
    margin-right: 12px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* VARIATION: homepage slides (template-parts/heros/hero-slides.php) */

/* Each slide carries its own photo and text, so the slide takes over the
   padding and bottom-left placement .hero__inner gives the one-text hero */
.hero.hero--slides .hero__inner {
    display: block;
    padding: 0;
}

/* .hero__inner's min-height, alert adjustment included, passed down to the slide */
.hero__slides,
.hero__slides .splide__track,
.hero__slides .splide__list,
.hero__slide {
    min-height: inherit;
}

/* Shown before Splide mounts so the first slide paints with the page; the
   track's overflow hides the others until they are stacked for the fade */
.hero__slides.splide {
    visibility: visible;
}

.hero__slide {
    width: 100%;
    padding: 50px 85px;

    display: flex;
    justify-content: start;
    align-items: end;
}

/* The text doesn't cross-fade with the photo: the outgoing slide's text leaves
   fast and the incoming text comes in once it's gone, so two headings never
   overprint. Scoped to a mounted slider so slide 1 shows before the script runs. */
.hero__slides.is-initialized .hero__slide .hero__content {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hero__slides.is-initialized .hero__slide.is-active .hero__content {
    opacity: 1;
    transition: opacity 0.4s ease 0.4s;
}

@media (prefers-reduced-motion: reduce) {
    .hero__slides.is-initialized .hero__slide .hero__content {
        transition: none;
    }
}

/*img positions, per slide*/
.hero.hero--slides .hero__slide--img-top .hero__background__image img {
    object-position: top;
}
.hero.hero--slides .hero__slide--img-center .hero__background__image img {
    object-position: center;
}
.hero.hero--slides .hero__slide--img-bottom .hero__background__image img {
    object-position: bottom;
}

/*splide controls*/
.hero__slides .splide__arrows {
    position: absolute;
    right: 85px;
    bottom: 50px;
    z-index: 10;
}

/*pause / play: same size as the arrows but outlined, so a paused play icon
  doesn't read as another "next" arrow*/
.hero__toggle {
    width: 45px;
    height: 45px;
    padding: 0;
    border: 2px solid var(--white);
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: transparent;
    color: var(--white);
}

.hero__toggle .splide__toggle__play {
    padding-left: 4px; /* optically centers the triangle */
}

.hero__toggle .icon {
    font-size: 16px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* content: */

.hero__content {
    position: relative;
    z-index: 10;
    height: 100%;
    width: 100%;
    max-width: 85%;

    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: start;

    pointer-events: none;
}

.hero__content__title,
.hero__content__sub-title,
.hero__content__buttons {
    pointer-events: auto;
}

.hero__content__title {
    color: var(--white);
}

.hero__content__sub-title {
    margin-bottom: 0.5rem;
    text-transform: none;
    font-weight: 400;
    color: var(--white);
}

/*home hero sizes*/
.hero__content__title.hero__content__title--home {
    font-size: 64px;
    line-height: 1;
}

.hero__content__sub-title.hero__content__sub-title--home {
    font-size: 22px;
    line-height: 1.1;
}

/*internal hero sizes*/
.hero__content__title.hero__content__title--internal {
    font-size: 64px;
    line-height: 1;
}

.hero__content__sub-title.hero__content__sub-title--internal {
    font-size: 22px;
    line-height: 1.2;
}

.hero__content__buttons {
    margin-top: 20px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* VARIATION: boxed content hero */

.hero.hero--boxed-text .hero__inner {
    padding: 50px 85px 0 0;
}

/*content*/
.hero.hero--boxed-text .hero__content {
    min-width: 40%;
}

.hero.hero--boxed-text .hero__content__inner {
    width: 100%;
    max-width: 565px;
    height: fit-content;

    padding: 30px 30px 50px 85px;
    background: var(--blue-dk);
    border-radius: 0 16px;
}

/*font sizes*/
.hero.hero--boxed-text .hero__content__title.hero__content__title--internal {
    font-size: 48px;
    letter-spacing: -1.4px;
}

.hero.hero--boxed-text .hero__content__sub-title.hero__content__sub-title--internal {
    letter-spacing: -0.4px;
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* tablets */

@media (max-height: 850px) {
    /*internal heros have less height to show below fold content*/
    .hero--internal .hero__inner {
        min-height: 55vh;
        max-height: 60vh;
    }
}

@media (max-width: 992px) {
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* hero */

    .hero__inner {
        padding: 50px 50px;
    }

    .hero__slide {
        padding: 50px 50px;
    }

    .hero__slides .splide__arrows {
        right: 50px;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* background */

    .hero__background__gradient {
        height: 70%;
    }
    .hero--blog-single .hero__background__gradient {
        height: 100%;
        background: linear-gradient(180deg, #00000066, #000000aa);
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* content */

    .hero__content {
        max-width: 70%;
    }
}

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* MOBILE */

@media (max-width: 768px) {
    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* hero */

    section.hero,
    section.hero.has-inner-container {
        padding: 0;
    }

    .hero__inner {
        border-radius: 0;
    }

    /*internal pages hero shorter*/
    .hero--internal .hero__inner {
        min-height: 60vh;
        max-height: unset;
    }
    .hero--internal.hero--boxed-text .hero__inner {
        min-height: 40vh;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* background */

    .hero__background__gradient {
        height: 80%;
    }

    .hero--home .hero__background__overlay {
        background: #00000044;
    }

    /*internal*/
    .hero--internal .hero__background__overlay {
        background: #00000022;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* content */

    .hero__content {
        max-width: 100%;
    }

    /*home hero sizes*/
    .hero__content__title.hero__content__title--home {
        font-size: 40px;
        line-height: 1;
        letter-spacing: -1.2px;
    }

    /*internal hero sizes*/
    .hero__content__title.hero__content__title--internal {
        font-size: 45px;
        line-height: 1;
        letter-spacing: -1.2px;
    }

    /*splide controls*/
    .hero__background__slides .splide__arrows ul.splide__pagination {
        order: 3;
        margin-left: 12px;
        margin-right: 0;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* VARIATION: free content hero */

    /*hero*/
    .hero.hero--free-text .hero__inner {
        padding: 25px;
    }

    .hero.hero--free-text.hero--slider .hero__inner {
        padding-bottom: 110px;
    }

    /*splide controls*/
    .hero.hero--free-text .hero__background__slides .splide__arrows {
        bottom: 35px;
        right: unset;
        left: 25px;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* VARIATION: homepage slides */

    .hero.hero--free-text.hero--slides .hero__inner {
        padding: 0;
    }

    .hero__slide {
        padding: 25px 25px 110px;
    }

    .hero__slides .splide__arrows {
        bottom: 35px;
        right: unset;
        left: 25px;
    }

    .hero__slides .splide__arrows ul.splide__pagination {
        order: 3;
        margin-left: 12px;
        margin-right: 0;
    }

    /* after the dots, so a paused play icon doesn't read as a third arrow */
    .hero__slides .hero__toggle {
        order: 4;
    }

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
    /* VARIATION: boxed content hero */

    .hero.hero--boxed-text .hero__inner {
        padding: 0;
        padding-bottom: 25px;
        background: #00aeef22;

        display: flex;
        flex-direction: column;
    }

    /*background*/
    .hero.hero--boxed-text .hero__background {
        position: relative;
        inset: unset;
    }

    .hero.hero--boxed-text .hero__background__image img,
    .hero.hero--boxed-text .hero__background .hero__background__slide img {
        height: 230px;
    }

    .hero.hero--boxed-text .hero__background__slides .splide__arrows {
        right: unset;
        left: 30px;
        bottom: 70px;
    }

    /*content*/
    .hero.hero--boxed-text .hero__content {
        width: 100%;
        margin-top: -60px;
        padding: 0 25px;
    }

    .hero.hero--boxed-text .hero__content__inner {
        width: 100%;

        padding: 25px;
        border-radius: 16px;
    }
}
