body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #222221;
    font-family: "Lato";
}

html {
    scroll-behavior: smooth;
}



/* --------------------------------- NAVBAR --------------------------------- */
nav ul li a {
    text-decoration: none;
    font-family: 'Lato';
    font-size: calc(20rem / 16);
    color: white;
    transition: 0.3s all;
}

nav ul li {
    position: relative;
    list-style: none;
    padding: 8px;
}

nav ul li::after {
    content: "";
    position: absolute;
    bottom: -5px;
    height: 2px;
    background-color: rgba(246, 216, 83);
    left: 50%;
    width: 0%;
    animation: navbarClosed 0.3s ease forwards;
}

nav ul li:hover::after {
    animation: navbarHover 0.3s ease forwards;
}

nav ul li {
    opacity: 0;
    animation: navbarLink  0.6s ease-in-out forwards;
}

nav ul li:first-child {
    animation-delay: 1s;
}

nav ul li:nth-child(2) {
    animation-delay: 1.4s;
}

nav ul li:nth-child(3) {
    animation-delay: 1.8s;
}

nav ul li:nth-child(4) {
    animation-delay: 2.2s;
}

nav button {
    opacity: 0;
    animation: navbarLink  0.6s ease-in-out forwards;
    animation-delay: 2.6s;
    justify-content: center;
}


nav button {
    display: flex;
    flex-grow: 0;
    gap: 6px;

    width: 14%;
    padding: 18px;

    color: #f5c14b;
    font-family: 'Lato';
    font-size: calc(16rem / 16);
    font-weight: 700;
    
    border-radius: 8px;
    backdrop-filter: blur(8px);
    border: 1.5px #d89b1d solid;
    background-color: rgba(41, 35, 29, 0.15) ;

    cursor: pointer;
    transition: all 0.5s
}

nav button:hover {
    box-shadow: 0 0 20px rgba(216, 155, 29, 0.45);

}   

nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;

    margin: 0px;
    padding: 0px;
}

nav ul li a {
    display: flex;
    gap: 4px;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    height: 75px;
    padding: 0px 2.5vh;
    width: 100%;
    
    position: fixed;
    z-index: 6;
    
    
    transition: 0.3s all;
    box-sizing: border-box;
}


nav div img {
    transition: 0.3s all;
    cursor: pointer;
    width: 240px;
}

nav div {
    display: flex;
    justify-content: center;

    width: 270px;

    animation: navbarLogo 1s ease-out forwards ;
}

nav img:hover {
    transform: scale(1.06);
}

/*Classe open quando Y > 50*/

.navbar-open {
    display: flex;

    height: 75px;
    width: 100%;
    padding: 4px 2.5vh;

    position: fixed;
    z-index: 3;

    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);

    transition: 0.3s all;
    box-sizing: border-box;
}

.navbar-open a {
    font-size: calc(18rem / 16);
}

.navbar-open img {
    transform: scale(0.9);
}

.navbar-open img:hover {
    transform: scale(1);
}


/* ------------------------------ MAIN CONTENT ------------------------------ */

.main-content {
    
}


/* -------------------------------- HERO PAGE ------------------------------- */

#hero-page {
    width: 100%;
    height: auto;
}

.hero-content {
    width: 100%;
    height: 100%;
    padding: 0 6vh;
    top: 0;
    left: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;

    position: absolute;
    z-index: 2;

    color: white;
    box-sizing: border-box;
}

.hero-content > h1, p {
    padding: 0;
    margin: 0;
}

.hero-content h1 {
    font-size: calc(65rem / 16);
    font-family: "Press Start 2P";
}

.hero-effect::after {
    content: '';
    position: absolute;
    z-index: 1;

    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-effect {
    display: block;
    position: relative;
    
    width: 100%;
    height: 80dvh;
    overflow: hidden;
}

.hero-effect > video {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    object-position: 10% 40%;
    object-fit: cover;
    
    display: block;
    animation: heroSfondo 1s ease-in-out;
}

#hero-title {
    width: 580px;
    opacity: 0;

    animation: heroTitolo 3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 2.8s;

    will-change: transform, opacity;
}

#hero-title2 {
    max-width: 780px;
    opacity: 0;

    animation: heroTitolo2 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 2.8s;

    will-change: transform, opacity;
}

.hero-content p {
    font-size: 1.1rem;
    opacity: 0;

    animation: fadeDown 1s ease-in-out forwards;
    animation-delay: 3.8s;
}

.hero-content div {
    display: flex;
    align-items: center;
    gap: 25px;

    width: 100%;
}

.hero-content div button {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;

    position: relative;

    width: 250px;
    height: 70px;
    padding: 0 18px;
    border-radius: 8px;

    color: black;
    font-family: 'Lato';
    font-size: calc(16rem / 16);
    font-weight: 700;

    transition: all 0.3s;
    animation: fadeLeft 2s ease-in-out forwards;
    opacity: 0;
    cursor: pointer;
}

.hero-content div button:first-child {

    backdrop-filter: blur(8px);
    border: 1px rgb(224, 152, 44) solid;
    background: linear-gradient(180deg, #f0b835,rgb(224, 152, 44));
    box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.0);
    animation-delay: 3.9s;
    z-index: 5;
}

.hero-content div button:nth-last-child(1) {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px #32CD32 solid;

    animation: FadeRight 0.8s ease-in-out forwards;
    animation-delay: 6s;
}

.hero-content div button i {
    transform: scale(1.5);
    transition: all 0.3s;
}

.hero-content div button:hover {
    gap: 14px;
}

.hero-content div button:first-child:hover {
    box-shadow: 0px 0px 25px rgb(224, 152, 44, 0.7);
}

.hero-content div button:nth-last-child(1):hover {
    box-shadow: 0px 0px 25px #32cd3265;
}

.hero-content div button:hover i {
    transform: scale(2) rotate(-10deg);
}

/* ---------------------------------- SETUP --------------------------------- */

.setup-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    
    margin-top: 20px;
}

.setup-content p {
    color: white;
}

.setup-content > p:first-child {
    font-size: 2rem;
    font-weight: 700;
    ;
}

.setup-content > p:nth-last-child(1) {
    font-size: 1rem;
    justify-content: center;
}

.setup-card {
    display: flex;
    flex-direction: row;
    gap: 14px;
}

.card {
    display: flex;
    flex-direction: row;
    gap: 15px;

    width: 480px;
    height: 200px;
    padding: 14px 18px;
    border-radius: 20px;

    background: linear-gradient(220deg, #292928 0%, #1a1a18 50%);
    border: 1.9px rgb(94, 94, 94) solid;
}

.card div:first-child {
    width: 120px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;

    position: relative;

    border-radius: 10px;
    background: linear-gradient(220deg, #292928 10%, #1a1a18 50%);
}

.card div img {
    width: 110px;
    transform: scale(0.9);
}

.card:nth-child(3) div img {
    transform: scale(0.7); /* Rimpicciolisce il logo senza rompere il flexbox */
    margin: 0;
    padding: 0;
}

.prova {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: end;
}

#img-2 {
    transform: scale(1.2);
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;

    margin-top: 20px;
}

.card-content p:first-child {
    font-size: 1.4rem;
}


.card-content button {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    text-align: center;

    font-size: 0.9rem;

    color: white;
    border: 1px #32CD32 solid;
    background-color: #32cd3260;
    backdrop-filter: blur(10px);
    border-radius: 6px;

    margin-top: 14px;
    padding: 16px 80px;

    cursor: pointer;
    transition: all 0.2s;
}

.card-content button i {
    transform: scale(1.1);
    position: relative;
    transition: all 0.4s;
    /*top: -1.5px;*/
}

.card-number {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;

    top: 4px;
    left: 10px;

    width: 30px;
    height: 40px;
    border-radius: 6px;
    transform: scale(1.2);

    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%2332CD32FF' stroke-width='3' stroke-dasharray='22' stroke-dashoffset='16' stroke-linecap='square'/%3e%3c/svg%3e");
    border-radius: 6px;
    background-color: #32cd3260;
    backdrop-filter: blur(10px);
}

.card-number p {
    padding: 10px;
    font-size: 1.2rem;

}

/* ---------------------------------- POPUP --------------------------------- */

.popUp-main {
    display: flex;
    flex-direction: column;
    position: fixed;
    align-items: center;
    gap: 8px;
    z-index: 9999;

    top: 50%;
    left: 50%;
    width: 850px;
    height: 500px;
    padding: 20px;
    transform: translate(-50%, -50%);

    box-shadow: 0px 0px 40px rgba(0, 0, 0, 0.8);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(14px);
    border: 1.9px rgb(94, 94, 94) solid;
    border-radius: 12px;

    box-sizing: border-box;
    transition: all 0.4s;
    opacity: 0;
    pointer-events: none;
}

.popUp-main p {
    color: rgb(255, 255, 255);
}

.popUp-main > p:nth-last-child(2) {
    font-size: 1rem;
}

.popUp-main > p:first-child {
    font-size: 2rem;
}

.popUp-main > i {
    position: absolute;

    top: 14px;
    right: 20px;

    color: white;
    transform: scale(1.9);
    cursor: pointer;
}

.cardContainer-popUp {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.card-popUp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 250px;
    height: 350px;
    padding: 10px;

    background-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0px 0px 25px rgb(0, 0, 0, 0);
    border: 1.9px wheat solid;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.card-popUp:hover {
    box-shadow: 0px 0px 25px rgba(245, 222, 179, 0.295);
}

.card-popUp .content-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.content-main > i {
    color: white;
    transform: scale(3);
    transition: all 0.2s;
}

.content-main > svg {
    color: white;
    transform: scale(3);
    transition: all 0.2s;
    overflow: visible;
}

.content-second button:nth-last-child(1) {
    display: flex;
    flex-direction: row;
}

.thunder-path {
    stroke-width: 0.6px;
    stroke: white;
    fill: white; 
    transition: fill 0.3s ease;
    stroke-linecap: round;

    stroke-dasharray: 4 40; 
    stroke-dashoffset: 0;
    
    stroke-opacity: 0;
}



.content-main p:first-child {
    font-size: 2rem;
    color: antiquewhite;
}

.content-main p:nth-last-child(1) {
    font-size: 1rem;
    text-align: center;
}

.content-second {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 14px;
}

.content-second > button {
    display: flex;
    flex-direction: row;
    flex: 1;
    justify-content: center;
    gap: 12px;

    position: relative;

    width: 220px;
    padding: 14px 20px;
    font-size: 0.80rem;

    color: white;
    background-color: rgba(245, 222, 179, 0.4);
    border-radius: 6px;
    border: 1px wheat solid;
    
    cursor: pointer;
}

.content-second button > i {
    transform: scale(2);
    position: absolute;
    opacity: 0;
    transition: all 0.4s;
}

.content-second button span {
    transition: all 0.4s;
}

.content-second button:hover span {
    transform: translateX(-30px);
}

.content-second button:hover i {
    opacity: 1;
    transform: scale(2) translateX(35px);
}

/*Second Card*/

.card-popUp:nth-child(2) {
    border: 1.9px #fc4e41 solid;
    box-shadow: 0px 0px 25px #fc4d4100;
}

.card-popUp:nth-child(2):hover svg {
    transform: scale(3.8);
}

.card-popUp:nth-child(2):hover {
    box-shadow: 0px 0px 25px #fc4d4141;
}


.card-popUp:nth-child(2) .content-main p:first-child {
    color: #fc4e41;
}

.card-popUp:nth-child(2) .content-second button {
    background-color: #fc4d4141;
    border: 1.9px #fc4e41 solid;
}

.card-popUp:nth-child(2):hover .setting-path {
    fill: rgba(255, 255, 255, 0.15);
    stroke-opacity: 1;
    animation: corsaSetting 1.2s linear infinite;
}

.setting-path {
    stroke-width: 0.6px;
    stroke-dasharray: 20 20; 
    stroke-dashoffset: 40; 
    
    stroke-opacity: 0;
    stroke: white;
    fill: white; 
    transition: fill 0.3s, stroke-opacity 0.3s;
}

/*Three Card*/

.card-popUp:nth-child(3) {
    border: 1.9px rgb(224, 152, 44) solid;
    box-shadow: 0px 0px 25px #fc4d4100;
}

.card-popUp:nth-child(3):hover {
    box-shadow: 0px 0px 25px rgba(224, 152, 44, 0.4);;
}

.card-popUp:nth-child(3) .content-main p:first-child {
    color: rgb(224, 152, 44);
}

.card-popUp:nth-child(3) .content-second button {
    background-color: rgba(224, 152, 44, 0.4);
    border: 1.9px rgb(224, 152, 44) solid;
}

.card-popUp:nth-child(3):hover svg {
    transform: scale(3.8);
}

.card-popUp:nth-child(3):hover .thunder-path {
    fill: rgba(255, 255, 255, 0.15); /* Il corpo si spegne leggermente */
    stroke-opacity: 1;               /* Appare il trattino */
    animation: corsaSingola 1.2s linear infinite;
}

footer {
    display: flex;
    justify-content: space-between;

    width: 100%;
    height: 14vh;

    margin-top: 18px;
    padding: 10px 6vh;

    color: white;
    background-color: rgba(13, 13, 13);
    border-top: 1.9px rgb(94, 94, 94) solid;

    box-sizing: border-box;
}

footer .footer-logo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;

    width: 340px;
}

.footer-logo > img {
    width: 290px;
}

.footer-infoby {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;

    width: 340px;
}

.footer-infoby > img {
    width: 25px;
}

.footer-version {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;

    width: 340px;
}

.footer-version > i {
    font-size: 1.4rem;
}


/* -------------------------------------------------------------------------- */
/*                             ANIMATION KEYFRAME                             */
/* -------------------------------------------------------------------------- */

/* ---------------------------- ANIMAZIONI NAVBAR --------------------------- */

@keyframes navbarHover {
    0% {left: 50%; width: 0%;}
    100% {left: 0%; width: 100%;}
}

@keyframes navbarClosed {
    0% {left: 0%; width: 100%;}
    100% {left: 50%; width: 0%;}
}

@keyframes navbarLogo {
    0% {transform: translateY(-85px) scale(0.8); opacity: 0;}
    100% {transform: translateY(0px) scale(1); opacity: 1;}
}

@keyframes navbarLogoHover {
    0% {transform: scale(1);}
    100% {transform: scale(1.06);}
}

@keyframes navbarLink {
    0% {transform: translateY(-85px) scale(1); opacity: 0;}
    100% {transform: translateY(0px) scale(1); opacity: 1;}
}

/* -------------------------------- HERO PAGE ------------------------------- */

@keyframes heroSfondo {
    0% {transform: scale(1.1);}
    100% {transform: scale(1.0);}
}

@keyframes heroTitolo {
    0% {transform: translateX(-550px); opacity: 0;}
    100% {transform: translateX(0px); opacity: 1;}
}

@keyframes heroTitolo2 {
    0% {transform: translateX(550px); opacity: 0;}
    100% {transform: translateX(0px); opacity: 1;}
}

@keyframes fadeDown {
    0% {transform: translateY(-35px); opacity: 0;}
    100% {transform: translateY(0px); opacity: 1;}
}

@keyframes fadeLeft {
    0% {transform: translateX(-500px); opacity: 0;}
    100% {transform: translateX(0px); opacity: 1;}
}

@keyframes FadeRight {
    0% {transform: translateX(-200px) scale(0.5); opacity: 0;}
    100% {transform: translateX(0px) scale(0.85); opacity: 1;}
}

/* -------------------------- ANIMAZIONI CARD POPUP ------------------------- */

@keyframes rotateThunder {
    0% {transform: scale(3) rotate(0deg);}
    33% {transform: scale(3) rotate(25deg);}
    66% {transform: scale(3) rotate(0deg);}
    100% {transform: scale(3) rotate(-25deg);}
}

@keyframes corsaSingola {
    from {
        /* Inizia da una posizione (es. 44) */
        stroke-dashoffset: 44; 
    }
    to {
        /* E finisce a 0 facendo il giro completo */
        stroke-dashoffset: 0;
    }
}

@keyframes corsaSetting {
    from {
        /* Inizia da una posizione (es. 44) */
        stroke-dashoffset: 40; 
    }
    to {
        /* E finisce a 0 facendo il giro completo */
        stroke-dashoffset: 0;
    }
}




@media (max-width: 768px) {
    .setup-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    }
}