/* =========================================================
   STAFFER — FULL WEBSITE LOADER
========================================================= */

#siteLoader {

    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;

    justify-content: center;

    width: 100vw;

    height: 100svh;

    background: var(--charcoal);

    color: var(--ivory);

    overflow: hidden;

    opacity: 1;

    visibility: visible;

    transition:
        opacity 1s cubic-bezier(.22,1,.36,1),
        visibility 1s;

}


/* =========================================================
   LOADER INNER
========================================================= */

.loader-inner {

    width: min(
        420px,
        calc(100vw - 44px)
    );

}


/* =========================================================
   BRAND
========================================================= */

.loader-brand {

    margin-bottom: 45px;

    color: var(--ivory);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size:
        clamp(
            34px,
            5vw,
            58px
        );

    font-weight: 500;

    letter-spacing: .34em;

    line-height: 1;

    text-align: center;

    transform: translateX(.17em);

}


/* =========================================================
   STATUS
========================================================= */

.loader-status {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 12px;

    color: var(--beige);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;

    font-weight: 500;

    letter-spacing: .2em;

}


#loaderPercent {

    color: var(--gold);

}


/* =========================================================
   PROGRESS BAR
========================================================= */

.loader-progress {

    position: relative;

    width: 100%;

    height: 1px;

    overflow: hidden;

    background:
        rgba(
            244,
            240,
            231,
            .16
        );

}


#loaderProgress {

    position: absolute;

    left: 0;

    top: 0;

    width: 0%;

    height: 100%;

    background: var(--gold);

    transform-origin: left center;

    transition:
        width .25s
        cubic-bezier(.22,1,.36,1);

}


/* =========================================================
   DECORATIVE LINE
========================================================= */

.loader-line {

    width: 1px;

    height: 55px;

    margin:
        35px
        auto
        0;

    background:
        linear-gradient(
            to bottom,
            var(--gold),
            transparent
        );

    transform-origin: top;

    animation:
        loaderLine 1.8s
        ease-in-out
        infinite;

}


@keyframes loaderLine {

    0%,
    100% {

        transform:
            scaleY(.35);

        opacity: .35;

    }

    50% {

        transform:
            scaleY(1);

        opacity: 1;

    }

}


/* =========================================================
   LOADING COMPLETE
========================================================= */

#siteLoader.loader-complete {

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

}


/* =========================================================
   WEBSITE REVEAL
========================================================= */

body {

    overflow-x: hidden;

}


body.site-loading {

    overflow: hidden;

}


body.site-loaded main {

    animation:
        websiteReveal
        1.2s
        cubic-bezier(.22,1,.36,1)
        both;

}


@keyframes websiteReveal {

    from {

        opacity: 0;

        transform:
            translateY(18px)
            scale(.995);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .loader-inner {

        width:
            calc(100vw - 44px);

    }


    .loader-brand {

        margin-bottom: 38px;

        font-size: 32px;

        letter-spacing: .28em;

        transform:
            translateX(.14em);

    }


    .loader-status {

        font-size: 7px;

    }


    .loader-line {

        height: 45px;

        margin-top: 28px;

    }

}