/* ---------------------------------
   Hero
--------------------------------- */

.hero {
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;

    position: relative;
    overflow: hidden;

    color: #fff;
    background-color: var(--bg-dark);

    /*
     * Keeps the hero as its own layout/paint region.
     * This also helps prevent viewport/browser chrome
     * changes from affecting unrelated page layout.
     */
    contain: layout paint;
}


/* ---------------------------------
   Additional image shading
--------------------------------- */

.hero::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(20, 20, 21, 0.38) 0%,
            rgba(20, 20, 21, 0.12) 50%,
            rgba(20, 20, 21, 0.05) 100%
        ),
        linear-gradient(
            0deg,
            rgba(20, 20, 21, 0.25) 0%,
            transparent 55%
        );
}


/* ---------------------------------
   Background image
--------------------------------- */

.hero__media {
    width: 100%;
    height: 100%;

    position: absolute;
    inset: 0;
    z-index: 0;

    display: block;
    overflow: hidden;
}

.hero__media img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    /*
     * Prevent the image itself from participating
     * in viewport-dependent sizing calculations.
     */
    max-width: none;
}


/* ---------------------------------
   Dark overlay
--------------------------------- */

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(20, 22, 23, 0.78) 0%,
            rgba(20, 22, 23, 0.18) 45%,
            rgba(20, 22, 23, 0.52) 100%
        );
}


/* ---------------------------------
   Scroll fade overlay
--------------------------------- */

.hero__fade {
    position: absolute;
    inset: 0;
    z-index: 1;

    background-color: var(--bg-dark);

    opacity: 0;

    pointer-events: none;
}


/* ---------------------------------
   Top navigation
--------------------------------- */

.hero__top {
    width: calc(100% - 2rem);
    max-width: 100rem;
    margin: auto;

    position: absolute;
    top: 1.25rem;
    left: 50%;
    z-index: 3;

    transform: translateX(-50%);

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ---------------------------------
   Logo
--------------------------------- */

.hero__logo {
    width: clamp(8rem, 24vw, 18rem);

    display: block;

    position: relative;

    isolation: isolate;
}

.hero__logo::before {
    content: "";

    position: absolute;
    inset: -0.35rem -0.5rem;
    z-index: -1;

    filter: blur(0.2rem);

    pointer-events: none;
}

.hero__logo img {
    width: 100%;
    height: auto;

    display: block;

    filter:
        drop-shadow(0 1px 1px rgba(255, 255, 255, 0.45))
        drop-shadow(0 0 2px rgba(255, 255, 255, 0.18));
}


/* ---------------------------------
   Legacy hero menu
--------------------------------- */

.hero__menu {
    position: fixed;

    top: clamp(1.5rem, 3vw, 2.5rem);
    right: clamp(1.5rem, 4vw, 4rem);

    z-index: 100;

    padding: 0;

    font-family: "Manrope", sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--text-light);

    background-color: transparent;

    border: 1px solid transparent;
    border-radius: 100rem;

    cursor: pointer;

    transform: scale(1);

    transition:
        padding 0.4s ease,
        background-color 0.4s ease,
        border-color 0.4s ease,
        backdrop-filter 0.4s ease,
        transform 0.4s ease;
}


/* ---------------------------------
   Site menu toggle
--------------------------------- */

.site-menu-toggle {
    position: fixed;

    top: clamp(1.5rem, 3vw, 2.5rem);
    right: clamp(1.5rem, 4vw, 4rem);

    z-index: 10001;

    padding: 0.7rem 1rem;

    font-family: "Manrope", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;

    color: var(--text-light);

    background-color: rgba(20, 20, 21, 0.28);

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 100rem;

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    cursor: pointer;

    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.site-menu-toggle.is-open {
    color: var(--text-light);

    background-color: rgba(20, 20, 21, 0.85);

    border-color: rgba(255, 255, 255, 0.2);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-menu-toggle.is-floating {
    background-color: rgba(20, 20, 21, 0.65);

    border-color: rgba(255, 255, 255, 0.18);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* ---------------------------------
   Main hero content
--------------------------------- */

.hero__content {
    width: calc(100% - 2rem);
    max-width: 100rem;

    position: absolute;

    left: 50%;
    bottom: clamp(7rem, 16svh, 11rem);

    z-index: 2;

    transform: translateX(-50%);
}

.hero__eyebrow {
    margin: 0 0 0.75rem;

    font-family: "Manrope", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;

    color: rgba(255, 255, 255, 0.9);

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero__title {
    max-width: 10ch;

    margin: 0;

    font-family: "Cormorant Garamond", serif;
    font-size: clamp(3.5rem, 15vw, 6rem);
    font-weight: 500;

    line-height: 0.9;
    letter-spacing: -0.035em;

    color: #fff;
}


/* ---------------------------------
   Scroll indicator
--------------------------------- */

.hero__scroll {
    width: 3.5rem;
    height: 3.5rem;

    position: absolute;

    right: clamp(1.25rem, 4vw, 4rem);
    bottom: clamp(1.5rem, 4vw, 3rem);

    z-index: 5;

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

    color: var(--text-light);

    text-decoration: none;

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
}

.hero__scroll::after {
    content: "";

    position: absolute;
    inset: -1px;

    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;

    pointer-events: none;

    animation: hero-scroll-pulse 2.3s ease-out infinite;
}

.hero__scroll-arrow {
    width: 0.65rem;
    height: 0.65rem;

    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;

    animation: hero-scroll-arrow 1.8s ease-in-out infinite;
}

.hero,
.hero__media,
.hero__media img,
.hero__content {
    -webkit-transform-origin: center center;
    transform-origin: center center;
}


/* ---------------------------------
   Scroll animations
--------------------------------- */

@keyframes hero-scroll-pulse {

    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    65% {
        transform: scale(1.65);
        opacity: 0;
    }

    100% {
        transform: scale(1.65);
        opacity: 0;
    }

}

@keyframes hero-scroll-arrow {

    0%,
    100% {
        transform: translateY(-0.2rem) rotate(45deg);
    }

    50% {
        transform: translateY(0.15rem) rotate(45deg);
    }

}


/* =========================================
   Mobile Portrait
========================================= */

@media only screen
    and (max-width: 47.99rem)
    and (orientation: portrait) {

    .hero {
        height: 100svh;
        min-height: 100svh;
        max-height: 100svh;
    }

    .hero__media {
        position: absolute;
        inset: 0;

        width: 100%;
        height: 100%;
    }

    .hero__media img {
        width: 100%;
        height: 100%;

        object-fit: cover;
        object-position: center;

        transform: none;
        scale: 1;
    }

    .hero__content {
        width: calc(100% - 2rem);

        left: 50%;
        bottom: 35%;

        transform: translateX(-50%);
    }

    .hero__eyebrow {
        margin-bottom: 0.75rem;

        font-size: 0.7rem;
        letter-spacing: 0.12em;
    }

    .hero__title {
        max-width: 10ch;

        margin: 0;

        font-family: "Cormorant Garamond", serif;

        /*
         * Fixed mobile size rather than viewport sizing.
         */
        font-size: 4rem;

        font-weight: 500;
        line-height: 1.1;
    }

    .hero__scroll {
        width: 3rem;
        height: 3rem;

        left: 0;
        right: 0;
        bottom: 1.5rem;

        margin-inline: auto;
    }

    .hero__scroll-arrow {
        width: 0.55rem;
        height: 0.55rem;
    }
}

/* =========================================
   Tablet
========================================= */

@media only screen
    and (min-width: 48rem)
    and (max-width: 63.99rem) {

    .hero__logo {
        width: clamp(16rem, 26vw, 20rem);

        top: 2rem;
        left: 2.5rem;
    }

    .hero__content {
        width: min(90%, 42rem);

        position: absolute;

        top: 18%;
        left: 50%;
        bottom: auto;

        transform: translateX(-50%);

        text-align: center;
    }

    .hero__eyebrow {
        margin-bottom: 0.9rem;

        font-size: 1.25rem;
        letter-spacing: 0.14em;
    }

    .hero__title {
        max-width: 11ch;

        margin-inline: auto;

        font-size: clamp(6rem, 11vw, 8.5rem);

        line-height: 0.92;

        text-align: center;
    }

    .site-menu-toggle {
        top: 2rem;
        right: 2.5rem;
    }

    .hero__scroll {
        width: 3.25rem;
        height: 3.25rem;

        left: 0;
        right: 0;
        bottom: 2.5rem;

        margin-inline: auto;
    }

    .hero__scroll-arrow {
        width: 0.6rem;
        height: 0.6rem;
    }

}


/* =========================================
   Desktop
========================================= */

@media only screen and (min-width: 64rem) {

    .hero__top,
    .hero__content {
        width: calc(100% - 6rem);
    }

    .hero__top {
        top: 2rem;
    }

    .hero__logo {
        width: clamp(9rem, 13vw, 14rem);
    }

    .hero__content {
        position: absolute;

        top: 50%;
        left: clamp(14rem, 20vw, 26rem);
        bottom: auto;

        transform: translateY(-50%);
    }

    .hero__title {
        font-size: clamp(5rem, 8vw, 8.5rem);
    }

}


/* =========================================
   Short / Landscape Hero
========================================= */

@media only screen
    and (max-height: 31rem)
    and (orientation: landscape) {

    .hero__content {
        width: 48%;
        max-width: 28rem;

        position: absolute;

        top: 52%;
        left: 2rem;
        bottom: auto;

        transform: translateY(-50%);

        text-align: left;
    }

    .hero__eyebrow {
        margin-bottom: 0.4rem;

        font-size: 0.5rem;
        letter-spacing: 0.1em;

        text-align: left;
    }

    .hero__title {
        max-width: none;

        margin: 0;

        /*
         * Deliberately NOT based on vh.
         *
         * This prevents mobile browser chrome changes
         * from resizing the headline while scrolling.
         */
        font-size: clamp(2.25rem, 5vw, 3.25rem);

        line-height: 0.9;

        text-align: left;
    }

    .hero__logo {
        width: 8rem;
    }

    .site-menu-toggle {
        top: 1rem;
        right: 1rem;
    }

    .hero__scroll {
        width: 2.5rem;
        height: 2.5rem;

        left: auto;
        right: 1rem;
        bottom: 1rem;

        margin: 0;
    }

}