/* EFFECTS & ANIMATIONS */

/* REVEAL ANIMATIONS — gated behind .in-view, added by IntersectionObserver on scroll */
.reveal {
    opacity: 1;
}

.reveal-fade {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-fade.in-view {
    animation: fadeInUp 0.8s ease both;
}

.reveal-card {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
}

.reveal-card.in-view {
    animation: scaleInUp 0.6s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* SPLIT TEXT ANIMATIONS */
.reveal[data-split="lines"] {
    overflow: hidden;
}

.reveal[data-split="lines"] .line {
    display: block;
    opacity: 0;
}

.reveal[data-split="lines"].in-view .line {
    animation: lineReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.reveal[data-split="lines"].in-view .line:nth-child(1) { animation-delay: 0.1s; }
.reveal[data-split="lines"].in-view .line:nth-child(2) { animation-delay: 0.2s; }
.reveal[data-split="lines"].in-view .line:nth-child(3) { animation-delay: 0.3s; }
.reveal[data-split="lines"].in-view .line:nth-child(4) { animation-delay: 0.4s; }

@keyframes lineReveal {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HOVER EFFECTS */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hover-accent {
    transition: color 0.3s ease, border-color 0.3s ease;
}

.hover-accent:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* SPLASH SCREEN */
.splash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: splash-fade 0.6s ease 1.3s forwards;
}

.splash__content {
    text-align: center;
}

.splash__text {
    font-family: 'Syne', serif;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    animation: splash-text 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes splash-fade {
    0% {
        opacity: 1;
        visibility: visible;
    }
    99% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes splash-text {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* FADE IN/OUT */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-out {
    animation: fadeOut 0.6s ease;
}

/* SCALE IN/OUT */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.scale-in {
    animation: scaleIn 0.6s ease;
}

.scale-out {
    animation: scaleOut 0.6s ease;
}

/* SLIDE IN */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease;
}

.slide-in-right {
    animation: slideInRight 0.6s ease;
}

/* UNDERLINE ANIMATION */
.underline-animate {
    position: relative;
    text-decoration: none;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* PULSE */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* BOUNCE */
.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* SCROLL TRIGGER */
.scroll-trigger {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-trigger.active {
    opacity: 1;
    transform: translateY(0);
}

/* REDUCED MOTION: keep content immediately visible, drop decorative movement */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-fade,
    .reveal-card,
    .reveal[data-split="lines"] .line,
    .scroll-trigger,
    .splash {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .splash {
        display: none !important;
    }

    .hero__aura,
    .pulse,
    .bounce {
        animation: none !important;
    }

    .project-card:hover,
    .video-item:hover,
    .process-step:hover,
    .btn:hover {
        transform: none !important;
    }
}
