/**
 * @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%;
    border-radius: 0;
    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: 4rem min(5%, 2rem);
}

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

.hero:has(.background)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, #1F1815E6 0%, #1F1815B3 50%, #1F181540 100%);
}

.hero:has(.background) h1 {
    color: #FFFDF9;
}

.hero:has(.background) h1 em {
    color: var(--pico-secondary);
}

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

.hero:has(.background) .subtitle {
    color: var(--pico-secondary);
}

.hero:has(.background) .btn:first-child {
    color: var(--pico-secondary-inverse);
    background-color: var(--pico-secondary);
    border-color: var(--pico-secondary);
}

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

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

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

.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: 16ch;
    font-size: calc(var(--pico-font-size) * 2.75);
    line-height: 1.05;
}

.hero .subtitle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--pico-primary);
    font-family: var(--pico-font-family-monospace);
    font-size: calc(var(--pico-font-size) * 0.75);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero .subtitle::before {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: currentColor;
}

.hero p {
    color: var(--pico-muted-color);
    line-height: 1.7;
    font-size: var(--pico-font-size);
    max-width: 36rem;
}

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

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

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

.hero .second:not(.multiple) picture {
    display: block;
    width: fit-content;
    margin: 3rem auto 0;
}

.hero .second img {
    display: block;
}

.hero .second:not(.multiple) img {
    aspect-ratio: 4 / 5;
    max-height: 38rem;
    object-fit: cover;
    border-radius: 20rem 20rem var(--pico-border-radius) var(--pico-border-radius);
}

.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;
    border-radius: var(--pico-border-radius);
}

.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: 6rem min(5%, 2rem);
    }

    .hero:has(.background) .container {
        padding-block: 9rem;
    }

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

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

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

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