/* ==========================================================================
   PARALLAX EFFECTS
========================================================================== */
// Parallax title: Translate X
.title-parallax {
    transform: translateX(var(--translateX));
    will-change: transform;
}



/* ==========================================================================
   REVEAL ANIMATIONS
========================================================================== */
.anim-mask {
    display: block;
    overflow: hidden;
}

// Translate each letter from a direction
[data-aos="letters-translate-top"],
[data-aos="letters-translate-bottom"] {
    white-space: nowrap;

    span {
        display: inline-block;
        transition: transform 1000ms $ease-quart;
        will-change: transform;


        @for $i from 1 to 8 {
            &:nth-child(#{$i}) {
                transition-delay: $i * 40ms;
            }
        }
    }

    &.aos-animate {
        span {
            transform: translate(0, 0);
        }
    }
}
[data-aos="letters-translate-top"] {
    span {
        transform: translate(0, -100%);
    }
}
[data-aos="letters-translate-bottom"] {
    span {
        transform: translate(0, 100%);
    }
}

// Carousel prev/active/next photos
[data-aos="carousel-prev"] {
    transform: translate(-16%, -4%) rotate(-3deg) scale(0.8);
    opacity: 0;
    transition-duration: 1.6s;
    transition-delay: 450ms;

    &.aos-animate {
        transform: translate(-9%, -1%) rotate(-1deg) scale(0.9);
        opacity: 1;
    }
}
[data-aos="carousel-active"] {
    transform: scale(0.8);
    opacity: 0;
    transition-delay: 400ms;

    &.aos-animate {
        transform: scale(1);
        opacity: 1;
    }
}
[data-aos="carousel-next"] {
    transform: translate(16%, -4%) rotate(3deg) scale(0.8);
    opacity: 0;
    transition-duration: 1.6s;
    transition-delay: 500ms;

    &.aos-animate {
        transform: translate(9%, -1%) rotate(1deg) scale(0.9);
        opacity: 1;
    }
}


// Scale down and Fade in
[data-aos="scale-down-fade-in"] {
    transform: scale(1.1);
    opacity: 0;
    transition: transform 2s $ease-quart, opacity 2s $ease-quart;
    will-change: transform, opacity;

    &.aos-animate {
        transform: scale(1);
        opacity: 1;
    }
}


// Location reveal
[data-aos="location"] {
    img {
        opacity: 0;
        transform: scale(1.15);
        transition: opacity 0.6s $ease-quart, transform 0.6s $ease-quart;
        will-change: opacity, transform;
    }

    h3, p {
        transform: translateY(150%);
        transition: transform 0.6s $ease-quart;
        will-change: transform;
    }
    h3 {
        transition: all 0.6s $ease-quart;
        transition-delay: 100ms;
    }
    p {
        transition-delay: 200ms;
    }

    &.aos-animate {
        img {
            opacity: 1;
            transform: scale(1);
        }
        h3, p {
            transform: translateY(0);
        }
    }
}



/* ==========================================================================
   KEYFRAMES ANIMATIONS
========================================================================== */
// Rotate button dashes
@keyframes rotateDashes {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/*
** Spinning globe
*/
@keyframes moveContinents {
    0% { transform: translate(0,0); }
    100% { transform: translate(-80.26px, 28.2px); }
}
.anim-spinGlobe {
    animation: moveContinents 1.7s linear infinite;
    animation-play-state: paused;
}
// Small
@keyframes moveContinentsSmall {
    0% { transform: translate(0,0); }
    100% { transform: translate(-96.95px, 0); }
}
.anim-spinGlobeSmall {
    animation: moveContinentsSmall 1.5s linear infinite;
    animation-play-state: paused;
}


/*
** Layout
*/
// List
@keyframes layoutListOdd {
    0% { transform: translateX(0); }
    100% { transform: translateX(4px); }
}
@keyframes layoutListEven {
    0% { transform: translateX(0); }
    100% { transform: translateX(-4px); }
}

// Grid
@keyframes layoutGridOdd {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}
@keyframes layoutGridEven {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}
