@font-face {
  font-family: 'AudiTRN';
  src: url('/fonts/AudiTRN.woff') format('woff'); /* Ensure path is correct */
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

.main-wrapper{
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

html, body{
    background-color: #2B2929;
    overflow: hidden;
    margin: 0;
    display: block;
    height: 100dvh;
    width: 100dvw;
}

.car-container{
    aspect-ratio: 2400 / 1850;
    position: absolute;
    left: -5%;
    top: 50%;
    width: 110%;
    transform: translateY(-50%);
    transform-origin: center center;
}

.car-container::before{
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(180deg, rgba(43, 41, 41, 1) 0%, rgba(43, 41, 41, 1) calc(100% - 150px), rgba(43, 41, 41, 0) 100%);
    z-index: 1;
    animation: openHeight 6s ease 1;
    animation-fill-mode: forwards;
    animation-delay: -1.5s;
}

.car-container::after{
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(0deg, rgba(43, 41, 41, 1) 0%, rgba(43, 41, 41, 1) calc(100% - 150px), rgba(43, 41, 41, 0) 100%);
    z-index: 1;
    animation: openHeight 6s ease 1;
    animation-fill-mode: forwards;
    animation-delay: -1.5s;
}

.nuvolari-edges{
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
}

.nuvolari-edges::before{
    content: "";
    display: none;
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(180deg, rgba(43, 41, 41, 1) 0%, rgba(43, 41, 41, 0) 100%);
    z-index: 1;
}

.nuvolari-edges::after{
    content: "";
    display: none;
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(0deg, rgba(43, 41, 41, 1) 0%, rgba(43, 41, 41, 0) 100%);
    z-index: 1;
}

.nuvolari-body{
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    animation: carFadeIn 6s ease 1;
    animation-fill-mode: forwards;
    animation-delay: -1.5s;
}

.nuvolari-headlights{
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    animation: carFadeIn 6s ease 1;
    animation-fill-mode: forwards;
    animation-delay: -1.5s;
}

.nuvolari-logo{
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    animation: logoFadeOut 6s ease 1;
    z-index: 2;
    animation-fill-mode: forwards;
    animation-delay: -1.5s;
}

.join-button{
    font-family: 'AudiTRN';
    border-radius: 50px;
    background-color: #FF2D00;
    color: #F5F2F2;
    text-align: center;
    font-size: 15px;
    font-weight: 400px;
    padding: 16px 34px;
    position: absolute;
    left: 50%;
    top: calc(50% + 40dvh);
    z-index: 3;
    transform: translateX(-50%) translateY(-50%);
    text-wrap: nowrap;
    opacity: 0;
    text-decoration: none;
    animation: buttonAppear 1.5s 1;
    animation-fill-mode: forwards;
    animation-delay: 3.5s;
    pointer-events: none;
    box-shadow: 0px 0px 50px rgba(255, 45, 0, 0);
    transition: box-shadow .5s;
}

.join-button:hover{
    box-shadow: 0px 0px 50px rgba(255, 45, 0, .8);
}

@keyframes logoFadeOut{
    0%{
        opacity: 1;
    }
    50%{
        opacity: 1;
    }
    100%{
        opacity: 0;
    }
}

@keyframes carFadeIn{
    0%{
        opacity: 0;
    }
    50%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

@keyframes openHeight{
    0%{
        height: 50%;
    }
    50%{
        height: 50%;
        opacity: 1;
    }
    61%{
        opacity: .9;
    }
    100%{
        height: 10%;
        opacity: 0;
    }
}

@keyframes buttonAppear{
    0%{
        opacity: 0;
        pointer-events: none;
    }
    35%{
        pointer-events: all;
    }
    100%{
        opacity: 1;
        pointer-events: all;
    }
}

@keyframes mobileScale{
    0%{
        transform: translateY(-50%) scale(1.5);
    }
    8%{
        transform: translateY(-50%) scale(1.5);
    }
    100%{
        transform: translateY(-50%) scale(1);
    }
}

@media(max-width: 768px){
    .join-button{
        font-size: 14px;
        padding: 15px 33px;
        animation-delay: 2.5s;
        /* top: 85%; */
    }

    .car-container{
        width: 150%;
        left: -25%;
    }

    .car-container{
        animation: mobileScale 4.5s ease 1;
        animation-delay: 2s;
        animation-fill-mode: forwards;
        transform: translateY(-50%) scale(1.5);
    }

    .car-container::before{
        background: linear-gradient(180deg, rgba(43, 41, 41, 1) 0%, rgba(43, 41, 41, 1) calc(100% - 100px), rgba(43, 41, 41, 0) 100%);
    }

    .car-container::after{
        background: linear-gradient(0deg, rgba(43, 41, 41, 1) 0%, rgba(43, 41, 41, 1) calc(100% - 100px), rgba(43, 41, 41, 0) 100%);
    }
}

@media (min-aspect-ratio: 1080/588){
    .join-button{
        /* position: fixed; */
        /* top: auto; */
        /* bottom: calc(50% - 42vh); */
    }
}

@media(max-width: 768px) and (min-aspect-ratio: 702/454){
    .join-button{
        /* position: fixed; */
        /* top: auto; */
        /* bottom: calc(50% - 42vh); */
    }
}

@media(max-width: 768px) and (max-aspect-ratio: 702/454) and (max-height: 700px){
    .join-button{
        /* position: fixed; */
        /* top: auto; */
        /* bottom: calc(50% - 30vh); */
    }
}