@charset "UTF-8";


/* –––––––––––––––––––––––––––––––––––––––––––– */
.h9 {
    transition: all .3s ease-in;
    transition: translate .5s ease-in;
    font-size: 1.4em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    animation: fadeInTitle 1s forwards;
    transition: opacity 0.3s ease;
    cursor: pointer; /* Impostiamo il cursore per far capire che è cliccabile */
}

/* Animazione per il titolo */
@keyframes slideInLeft {
    0% {
      transform: translateY(-200%);
    }
    100% {
      transform: translateY(0%);
    }
  }

@keyframes fadeInTitle {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}



/* Animazione per il titolo quando è cliccato (fade-out) */
@keyframes fadeOutTitle {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Stili generali */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    
    overflow: hidden; /* Impedisce lo scorrimento mentre l'animazione è attiva */
}

/* Contenitore dell'intestazione */
.header-splash {
    animation: 1s ease-out 0s 1 slideInLeft;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: none;
    position: absolute;
    z-index: 100;
    padding: var(--padding-sito);
}

/* Contenitore delle immagini */
.image-stack {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* Nasconde le immagini inizialmente */
    animation: fadeInImages 1s forwards;
    animation-delay: .5s;
}

/* Animazione per le immagini */
@keyframes fadeInImages {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Le immagini sovrapposte */
.image-stack img {
    position: absolute;
    max-width: calc( (100vw/8) * 6);
    max-height: 80vh;
    object-fit: cover;
    transition: none;
    z-index: 0;
}

.immagine {
    position: relative;
    width: 100px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Sottotitoli */
.header-splash h2 {
    position: absolute;
    justify-content: right;
    align-items: center;
    right: 0;
    padding: var(--padding-sito)
}

@keyframes fadeInSubtitle {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.mobile-break {
    display: none;
}

h2 {
    text-align: right;
}

/* Animazione del fade-out per sottotitoli e immagini quando il titolo è cliccato */
.header-splash.clicked h2,
.image-stack.clicked {
    animation: fadeOutTitle 1s forwards; /* Annulla l'opacità per scomparire */
    animation-delay: 0s;
}

/* Classi per dispositivi mobili */
@media (max-width: 768px) {
    /* body.mobile-device { HO TOLTO -RUBEN
    } */

    /* .mobile-break {
        display: block;
    } */

    .h9 {
        font-size: .8em;
    }
}

.h9:hover{
    color: var(--color-gray);
    transition: all .3s ease-in-out;
    transition: translate .5s ease-in-out;
    translate: 15px;
}
.h9:not(:hover){
    transition: all .3s ease-out;
    transition: translate .5s ease-out;
    color: var(--color-black);
    translate: 0px;
}


/* Nuove animazioni per il fade-out */
@keyframes fadeOutImages {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fadeOutTitle {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Aggiungere la classe per il fade-out */
.header-splash.fade-out h2 {
    animation: fadeOutTitle 1s forwards;
}

.image-stack.fade-out img {
    animation: fadeOutImages 1s forwards;
    animation-delay: 0.5s; /* Delay per far sparire le immagini dopo il titolo */
}

.image-stack img {
    opacity: 0;
    transition: opacity 1s ease; /* Imposta una transizione per un'animazione fluida */
}

.image-stack img:first-child {
    opacity: 1; /* La prima immagine sarà visibile */
}

.fade-out {
    opacity: 0;
    transition: opacity 1s ease; /* Personalizza la durata e la transizione come vuoi */
}

.header-splash, .image-stack, .header-splash h2 {
    transition: opacity 1s ease;
}

a{
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1920px){

    .h9 {
        font-size: 5em;
    }

    }