.hero {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 560px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    overflow: hidden;

    background-color: var(--root);
    color: var(--txt);
}

.hero.small {
    height: 300px;
    min-height: 0;
    margin-top: var(--nav-h);
}
.hero.small .hero-cover {
    position: relative;
    height: 100%;
    flex-direction: column;
    gap: 0;
}
.hero.small .hero-small-icon {
    height: 100px;
    flex: 0 0 auto;
}

.hero-small-icon .scale-1 {
    transform: scale(1);
    transition: 1s cubic-bezier(.5, .5, 0, 1);
    transform-box: fill-box;
    transform-origin: center;
    opacity: 1;
}
.hero-small-icon .hidden .scale-1 {
    transform: scale(.5);
    opacity: 0;
}

.hero-small-icon .scale-2 {
    transform: scale(1);
    transition: .5s cubic-bezier(.5, .5, 0, 1);
    transform-box: fill-box;
    transform-origin: center;
}
.hero-small-icon .hidden .scale-2 {
    transform: scale(.5);
}

.hero.small .hero-cover-text {
    margin: 0 auto;
    text-transform: lowercase;
    font-size: 80px;
    color: var(--txt);
}

.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-color: var(--root);
}

.hero-bg > div {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg .hero-grain {
    background-color: var(--root);
    background: url(/src/media/pattern.svg);
    background-repeat: repeat;
    background-size: 3px;
    opacity: .4;
}

.hero-bg .hero-pattern {
    background: url(/src/media/pattern.svg);
    background-repeat: repeat;
    background-size: 20px;
    opacity: .3;
}

.hero-bg .hero-img {
    background-image: url(/src/media/bg.png);
    background-size: 100%;
    background-position: center;
    opacity: .4;
}

/* .hero-bg .hero-grad {
    background-image: linear-gradient(
        90deg,
        hsl(var(--hue), var(--bg-1-s), 15%) 0%,
        transparent 100%);
} */

.hero-cover {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

:root {
    --a-s: 1;
    --hero-txt: calc(.41s * var(--a-s));
    --hero-anim-stroke: calc(.75s * var(--a-s));
    --hero-txt-delay: calc(.75s * var(--a-s));
    --hero-reveal: calc(3s * var(--a-s));
    --wobble-delay: calc(1.2s * var(--a-s));
    --wobble-time: calc(.8s * var(--a-s));
}

.hero-text-hold:not(.static) {
    display: grid;
    grid-template-columns: 0fr;
    overflow: hidden;
    animation: animate-hero-text-hold var(--hero-txt) cubic-bezier(1,0,0,1) var(--hero-txt-delay) forwards;
    margin-left: -40px;
}

.hero-cover .hero-logo {
    position: relative;
    flex: 0 0 200px;
    height: 200px;
    width: 200px;
    transform: translate(-50%, -50%);
    animation: animate-hero-logo var(--wobble-time) ease-in-out var(--wobble-delay) forwards;
}

.hero-cover .hero-text {
    min-width: 0;
    height: 120px;
    font-size: var(--h2);
}
.hero-cover .hero-text.bigger {
    height: 150px;
}
@media screen and (max-width: 435px) {
    .hero-cover .hero-text.bigger {
        height: 35vw;
    }
}

.hero-cover svg, .hero-cover path {
    position: relative;
    height: 100%;
}

.hero-cover .hero-logo .hero-logo-anim,
.hero-cover .hero-logo .hero-logo-reveal,
.hero-logo-reveal svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
}

.hero-logo-reveal {
    position: relative;
    transform: translate(-50%, -50%);
}
.hero-logo-reveal svg:first-child {
    opacity: 0;
    animation: animate-hero-reveal-blue var(--hero-reveal) ease-in-out forwards;
}
.hero-logo-reveal svg:last-child {
    opacity: 0;
    animation: animate-hero-reveal var(--hero-reveal) ease-in-out forwards;
}

.hero-logo-anim {
    opacity: 1;
    animation: animate-hero var(--hero-reveal) ease-in-out forwards;
}
.hero-logo-anim .hiw-stroke {
    animation: animate-hero-stroke var(--hero-anim-stroke) forwards cubic-bezier(.7, 0, 0, 1);
}

@keyframes animate-hero-logo {
    0% {transform: scale(1) translate(-50%, -50%)}
    20% {transform: scale(1.05) translate(-50%, -50%)}
    40% {transform: scale(.975) translate(-50%, -50%)}
    60% {transform: scale(1.005) translate(-50%, -50%)}
    80% {transform: scale(.9975) translate(-50%, -50%)}
    100% {transform: scale(1) translate(-50%, -50%)}
}

@keyframes animate-hero-text-hold {
    0% {
        grid-template-columns: 0fr;
        margin-left: -40px;
    }
    100% {
        grid-template-columns: 1fr;
        margin-left: 0px;
    }
}

@keyframes animate-hero {
    0% {
        transform: scale(2) rotate(-40deg);
        animation-timing-function: cubic-bezier(.5,0,0,1);
        opacity: 1;
    }

    40% {
        transform: scale(.7) rotate(0deg);
        animation-timing-function: cubic-bezier(.5,.5,0,1);
        opacity: 1;
    }

    46% {
        transform: scale(.9);
    }

    65% {
        transform: scale(1);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes animate-hero-reveal {
    0% {
        opacity: 0;
        animation-timing-function: cubic-bezier(.5,0,0,1);
        transform: scale(2);
    }

    40% {
        opacity: 0;
        animation-timing-function: cubic-bezier(.5,.5,0,1);
        transform: scale(.8);
    }

    44% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes animate-hero-reveal-blue {
    0% {
        opacity: 0;
        animation-timing-function: cubic-bezier(.5,0,0,1);
        transform: scale(2);
    }

    40% {
        opacity: 0;
        animation-timing-function: cubic-bezier(.5,.5,0,1);
        transform: scale(.8);
    }

    47% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        animation-timing-function: cubic-bezier(.5,.5,0,1);
        transform: scale(1);
    }
}

@keyframes animate-hero-stroke {
    0% {
        stroke-dashoffset: 10;
    }

    100% {
        stroke-dashoffset: 0;
    }
}