/* -------------------------------------------
   Intro Section
------------------------------------------- */

#intro {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;

    header {
        position: relative;
        height: 100%;
        width: 100%;
        overflow: hidden;
        
    }
}
#intro header{
  transition: background-color 1500ms ease;
  background-color: transparent;
}

#intro header video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
}

/* fallback */
#intro header #intro-fallback {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 1;
    transition: opacity 3s ease;
}

#intro header #intro-fallback.show {
    opacity: 1;
}

#intro header #intro-fallback img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}


/* --- Fallback images animation

#intro header #intro-fallback img:nth-of-type(1) {
    animation: img1 15s linear infinite;
}

#intro header #intro-fallback img:nth-of-type(2) {
    animation: img2 15s linear infinite;
}

@keyframes img1 {
    0% { transform: translateX(0); } 
    100%   { transform: translateX(-100%); }   
}

@keyframes img2 {
    0% { transform: translateX(98%); }  
    100%   { transform: translateX(0); }    
} 
*/



/* ---- WRITING ---- */
#intro-phrase {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    color: #000;
    z-index: 2;
    transform: translateY(-50%);
    transition: opacity 0.4s ease;
}

/* "Tomorrow is today with an idea + Milano"  */
#intro-phrase #first-phrase {
    position: relative;
    margin: 1px auto;
    width: 94%;
    display: flex;
    justify-content: space-between;
    letter-spacing: 4px;
    font-family: 'Latinka', sans-serif;
    font-weight: 200;
    font-size: 2vw;
    transition: opacity 1s;
}

#intro-phrase #first-phrase span:nth-of-type(1) {
    transition-delay: 0.4s;
}

#intro-phrase #first-phrase span:nth-of-type(2) {
    transition-delay: 0.8s;
}

#intro-phrase #first-phrase span:nth-of-type(3) {
    transition-delay: 1.2s;
}

#intro-phrase #first-phrase span:nth-of-type(4) {
    transition-delay: 1.6s;
}

#intro-phrase #first-phrase span:nth-of-type(5) {
    transition-delay: 2s;
    justify-self: end;
}

#intro-phrase #first-phrase span,
#intro-phrase #first-phrase #milano,
#intro-phrase #word-herezie {
    transition: opacity 0.5s ease, color 2s;
}

#intro-phrase #first-phrase span,
#intro-phrase #first-phrase #milano {
    opacity: 0;
}

/* "Milano" */
#intro-phrase #first-phrase #milano {
    color: white;
    position: absolute;
    right: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

/* "Tomorrow is today with an idea" SHOW */
#intro-phrase.start #first-phrase span {
    opacity: 1;
}

/* "Tomorrow is today with an idea" OUT */
#intro-phrase.start #first-phrase.out span:not(#milano) {
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* "Milano" SHOW */
#intro-phrase.start #first-phrase.out #milano {
    opacity: 1;
}

/* "HEREZIE" */
#intro-phrase #word-herezie {
    font-family: 'Latinka', sans-serif;
    font-weight: 200;
    font-size: 22vw;
    text-align: center;
    opacity: 0;
    letter-spacing: 33px;
    line-height: 1em;
    color: rgb(0, 0, 0);
    transform: translateX(0.6%);
    transition: opacity 0.8s, color 2s;
}

#intro-phrase #word-herezie.show {
    opacity: 1;
}

@media (min-width: 901px) and (max-width: 1120px) {
    #intro-phrase #word-herezie {
        font-size: 20vw;
        transform: translateX(1.5%);
    }
}

@media (min-width: 769px) and (max-width: 900px) {
    #intro-phrase #word-herezie {
        font-size: 18.7vw;
        transform: translateX(1.5%);
    }
}

@media (max-width: 768px) {
    #intro-phrase #word-herezie {
        letter-spacing: 10px;
        transform: translateX(1%);
    }

    #intro-phrase #first-phrase {
        letter-spacing: 1px;
    }
}

@media (min-width: 425px) and (max-width: 768px) {
    #intro-phrase #word-herezie {
        font-size: 22vw;
    }
}

@media (max-width: 424px) {
    #intro-phrase #word-herezie {
        font-size: 21vw;
    }
}

/* MacOS */
.is-mac #intro-phrase #word-herezie {
    line-height: 0.7em;
}


/* ---- SCROLL DOWN ARROW ---- */

#scroll_down {
    max-height: 0;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    margin-bottom: 60px;
    transition: max-height 2s ease;
    z-index: 2;
}

#scroll_down svg {
    fill: transparent;
    stroke: #fff;
}

#scroll_down:hover svg {
    fill: #000;
    stroke: #fff;
}
