/* assets/styles/loader.css */
.loader {
    align-items: center;
    background-color: #fff;
    display: flex;
    height: 100vh;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100vw;
    z-index: 9999;
}

.loader > div {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.loader__title {
    color: #fff;
    font-family: "Bebas neue pro", sans-serif;
    font-size: 4.875rem;
    position: relative;
    z-index: 0;
    margin: 0;
    padding: 0 0.3em;
}

.loader__title::before {
    animation: titleSlide 3s cubic-bezier(0.66, 0.29, 0.01, 0.88) 0s infinite forwards;
    background-color: #1a1a1a;
    content: '';
    height: 100%;
    left: -2%;
    position: absolute;
    transform: skew(-10deg, 0deg);
    top: 0;
    width: 0;
    z-index: -1;
}

.loader__subtitle {
    color: transparent;
    font-family: "Bebas neue pro", sans-serif;
    font-size: 2.8125rem;
    position: relative;
    width: fit-content;
    z-index: 0;
    margin: 0;
    padding: 0 0.3em;
}

.loader__subtitle::before {
    animation: subtitleSlide 3s cubic-bezier(0.66, 0.29, 0.01, 0.88) 0.5s infinite forwards;
    background-color: #8bc34a; /* $color-primary */
    color: #1a1a1a;
    content: '';
    height: 100%;
    left: -2%;
    position: absolute;
    transform: skew(-10deg, 0deg);
    top: 0;
    width: 0;
    z-index: -1;
}

@keyframes titleSlide {
    0% {
        left: -2%;
        right: auto;
        width: 0px;
    }

    50% {
        left: -2%;
        right: auto;
        width: 104%;
    }

    60% {
        left: auto;
        right: -2%;
        width: 104%;
    }

    70% {
        width: 0px;
    }
}

@keyframes subtitleSlide {
    0% {
        content: '';
        left: -2%;
        right: auto;
        width: 0px;
    }

    10% { content: 'E '; }
    18% { content: 'E s'; }
    19% { content: 'E su'; }
    21% { content: 'E suber'; }
    22% { content: 'E suberi'; }
    23% { content: 'E suberi'; }
    24% { content: 'E suberi S'; }
    27% { content: 'E suberi Sa'; }
    35% { content: 'E suberi Sac'; }
    49% { content: 'E suberi Sach'; }

    50% {
        left: -2%;
        right: auto;
        width: 104%;
    }

    60% {
        content: 'E suberi Sach';
        left: auto;
        right: -2%;
        width: 104%;
    }
    62% { content: 'E suberi Sac'; }
    62% { content: 'E suberi Sa'; }
    63% { content: 'E suber'; }
    64% { content: 'E '; }
    68% { content: 'E '; }
    69% { content: ''; }

    70% {
        width: 0px;
    }
}
