/* ============================================
   FESTE - Animations Stylesheet
   Beautiful animations for Feste website
   ============================================ */

/* Cursive Writing Animation for "Feste" Title */
@keyframes write {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.animated-title {
    opacity: 0;
    animation: fadeInWrite 2s ease forwards;
}

@keyframes fadeInWrite {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
.slide-up {
    opacity: 0;
    transform: translateY(30px);
}

.slide-up.in-view {
    animation: slideUp 0.8s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Right Animation */
.slide-right {
    opacity: 0;
    transform: translateX(-30px);
}

.slide-right.in-view {
    animation: slideRight 0.8s ease forwards;
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Floating Animation */
.floating {
    animation: float 6s ease-in-out infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(252, 202, 70, 0.4);
    }
    50% {
        box-shadow: 0 4px 32px rgba(252, 202, 70, 0.8);
    }
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Scroll Indicator Animation */
/* @keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
} */

/* Film Reel Rotation */
@keyframes filmReelRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.film-reel-rotating {
    animation: filmReelRotate 20s linear infinite;
}

/* Loading Animation */
@keyframes loading {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* Card Flip Animation */
@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.5) 50%,
        rgba(255,255,255,0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Bounce In Animation */
.bounce-in {
    opacity: 0;
    transform: scale(0.3);
}

.bounce-in.in-view {
    animation: bounceIn 0.8s ease forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In Animation */
.rotate-in {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

.rotate-in.in-view {
    animation: rotateIn 1s ease forwards;
}

@keyframes rotateIn {
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--secondary-color);
    animation: typewriter 3s steps(40) 1s forwards,
               blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
    50% {
        border-color: transparent;
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(252, 202, 70, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 1s ease-out;
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.in-view {
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

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

/* Spotlight Effect */
@keyframes spotlight {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(252, 202, 70, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(252, 202, 70, 0);
    }
}

.spotlight {
    animation: spotlight 2s infinite;
}

/* Parallax Effect (controlled by JS) */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Glowing Effect */
@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px var(--secondary-color));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--secondary-color));
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Morphing Shape Animation */
@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morphing {
    animation: morph 8s ease-in-out infinite;
}

/* Page Transition */
@keyframes pageTransition {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-transition {
    animation: pageTransition 0.5s ease;
}

/* Interactive Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Feature Card Animations */
.feature-card {
    animation-play-state: paused;
}

.feature-card.in-view {
    animation: bounceIn 0.8s ease forwards;
    animation-play-state: running;
}

/* Demo Animation */
@keyframes demoFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.demo-action {
    transition: all 0.3s ease;
}

.demo-action:hover {
    transform: scale(1.1);
    animation: demoFade 2s infinite;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}