/* parallax is cool */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mouseScroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes arrowDown {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-5px, -5px);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(5px, 5px);
    }
}

@keyframes floatInRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes floatInLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.parallax-element {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.parallax-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.parallax-title {
    transition-delay: 0.2s;
}

.parallax-subtitle {
    transition-delay: 0.4s;
}

.parallax-card {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
    transition-delay: calc(var(--i, 0) * 0.2s);
}

.parallax-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../media/reviewbackground.jpeg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    transform: translateZ(-1px) scale(1.1);
}

/* review stuff */
@keyframes testimonialFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes quoteMarkIn {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authorSlideUp {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-slide {
    position: absolute;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1), opacity 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    transform: translateX(60px);
    z-index: 1;
}

.testimonial-slide.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 2;
}

.testimonial-slide.active .testimonial-content {
    animation: testimonialFadeIn 0.8s ease forwards;
}

.testimonial-slide.active .testimonial-author {
    opacity: 0;
    animation: authorSlideUp 0.6s ease forwards 0.3s;
}

.quote-mark {
    font-family: 'Georgia', serif;
    font-size: 6rem;
    line-height: 1;
    color: var(--gold);
    opacity: 0.3;
    position: absolute;
}

.quote-mark.opening {
    top: 2rem;
    left: 2rem;
}

.quote-mark.closing {
    bottom: 6rem;
    right: 2rem;
}

.testimonial-slide.active .quote-mark.opening {
    opacity: 0;
    animation: quoteMarkIn 0.6s ease forwards 0.1s;
}

.testimonial-slide.active .quote-mark.closing {
    opacity: 0;
    animation: quoteMarkIn 0.6s ease forwards 0.2s;
}

@keyframes productFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes productFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-15px);
    }
}

.products-grid {
    min-height: 300px;
}

.product-card {
    animation: productFadeIn 0.6s ease-out forwards;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.product-card.fade-out {
    animation: productFadeOut 0.6s ease-out forwards;
}

.product-card:nth-child(1),
.product-card:nth-child(2),
.product-card:nth-child(3),
.product-card:nth-child(4),
.product-card:nth-child(5),
.product-card:nth-child(6),
.product-card:nth-child(7),
.product-card:nth-child(8),
.product-card:nth-child(9) {
    animation-delay: 0s;
}

.product-card.fade-out:nth-child(1),
.product-card.fade-out:nth-child(2),
.product-card.fade-out:nth-child(3),
.product-card.fade-out:nth-child(4),
.product-card.fade-out:nth-child(5),
.product-card.fade-out:nth-child(6),
.product-card.fade-out:nth-child(7),
.product-card.fade-out:nth-child(8),
.product-card.fade-out:nth-child(9) {
    animation-delay: 0s;
}