/**
 * @license MIT, https://opensource.org/license/MIT
 */

.hero {
    isolation: isolate;
    overflow: hidden;
    position: relative;
}

.hero .background {
    position: absolute;
    inset: 0;
    margin: 0;
    z-index: -1;
}

.hero .background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

@media (prefers-reduced-motion: no-preference) {
    .hero .background.zoom img {
        animation: hero-zoom 10s ease-in-out infinite alternate;
    }
}

.hero .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem min(5%, 2rem) 4rem;
}

.hero:has(.background) {
    background-color: var(--flow-dark);
}

.cms-content > .hero:not(:has(.background)) {
    color-scheme: dark;
    background-color: var(--flow-dark);
}

.hero:not(:has(.background)) :is(h1, p, .cms-text) {
    color: #FFFFFF;
}

.hero:not(:has(.background)) p {
    color: #FFFFFFCC;
}

.hero .btn:not(:first-child) {
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.hero .btn:not(:first-child):hover {
    color: var(--pico-contrast);
    background-color: #FFFFFF;
}

.hero:has(.background)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, #0A2B3BB3 0%, #0A2B3BE6 100%);
}

@media screen and (min-width: 768px) {
    .hero:has(.background)::after {
        background: linear-gradient(90deg, #0A2B3BF2 0%, #0A2B3BD9 38%, #0A2B3B4D 72%, #0A2B3B1A 100%);
    }
}

.hero:has(.background) :is(h1, p, .cms-text) {
    color: #FFFFFF;
}

.hero:has(.background) .btn:not(:first-child) {
    color: #FFFFFF;
    border-color: #FFFFFF;
}

.hero:has(.background) .btn:not(:first-child):hover {
    color: var(--pico-contrast);
    background-color: #FFFFFF;
}

.hero .first {
    text-align: start;
    width: 100%;
}

.hero .second {
    display: block;
    width: 100%;
    margin: auto;
}

.hero h1 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    max-width: 18ch;
    font-size: calc(var(--pico-font-size) * 2.75);
    font-weight: 800;
    line-height: 1.05;
}

.hero .subtitle {
    display: inline-block;
    margin-bottom: 1.25rem;
    padding: 0.375rem 0.875rem;
    color: var(--pico-secondary-inverse);
    font-size: calc(var(--pico-font-size) * 0.75);
    font-weight: 700;
    border-radius: 999px;
    background-color: var(--pico-secondary);
}

.hero p {
    line-height: 1.6;
    color: var(--pico-muted-color);
    font-size: calc(var(--pico-font-size) * 0.85);
    font-weight: 400;
    max-width: 38rem;
}

.hero .actions {
    padding: 1.5rem 0;
}

.hero .btn {
    margin: 0.5rem 0.75rem 0.5rem 0;
}

.hero picture {
    margin-top: 3rem;
}

.hero .second picture {
    border-radius: calc(var(--pico-border-radius) * 2);
    overflow: hidden;
    box-shadow: 0 1.5rem 3rem -1rem #0A2B3B59;
    width: fit-content;
    margin: 3rem 0 0;
    display: block;
}

.hero .second img {
    display: block;
}

.hero .second.multiple {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
    gap: 1rem;
    max-width: 54rem;
    margin-top: 3rem;
}

.hero .second.multiple.swiffy-slider {
    --swiffy-slider-item-ratio: 4 / 3;
    display: block;
}

.hero .second.multiple picture,
.hero .second.multiple video {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.hero .second.multiple picture {
    aspect-ratio: 4 / 3;
}

.hero .second.multiple img,
.hero .second.multiple video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    object-fit: cover;
}

@media screen and (min-width: 768px) {
    .hero .container {
        padding: 7.5rem min(5%, 2rem) 6rem;
    }

    .hero h1 {
        font-size: calc(var(--pico-font-size) * 4.25);
    }

    .hero p {
        font-size: calc(var(--pico-font-size) * 1);
    }
}

@media screen and (min-width: 992px) {
    .hero .container:has(> .first + .second:not(.multiple)) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 4rem;
    }

    .hero .first + .second:not(.multiple) picture {
        margin: 0;
    }
}

.hero:has(+ .cards .layout-figures) .container {
    padding-bottom: 8rem;
}

.cms-content > .hero + .cards:has(.layout-figures) {
    position: relative;
    z-index: 1;
    margin-top: -5rem;
    background: none;
    border: 0;
}

.cms-content > .hero + .cards:has(.layout-figures) > .container {
    padding-block: 0 1rem;
}

.cms-content > .hero + .cards .card-list.layout-figures {
    padding: 2rem;
    background-color: var(--pico-contrast-background);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: calc(var(--pico-border-radius) * 2);
    box-shadow: 0 1.5rem 3rem -1rem #0A2B3B33;
}

@media screen and (max-width: 767px) {
    .cms-content > .hero + .cards .card-list.layout-figures.cols-auto {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem 1rem;
        padding: 1.5rem 1.25rem;
    }

    .cms-content > .hero + .cards .card-list.layout-figures .card-item {
        padding-inline-start: 0.875rem;
    }

    .cms-content > .hero + .cards .card-list.layout-figures .title {
        font-size: 2rem;
    }
}

@media screen and (min-width: 768px) {
    .hero:has(+ .cards .layout-figures) .container {
        padding-bottom: 10rem;
    }

    .cms-content > .hero + .cards .card-list.layout-figures {
        padding: 2.5rem 3rem;
    }
}
