/* ========================================
   Animation Keyframes
   ======================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(5deg);
    }
    66% {
        transform: translateY(-10px) rotate(-5deg);
    }
}

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

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ========================================
   Reveal Animations (Intersection Observer)
   ======================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for children */
.couple-container .reveal:nth-child(1),
.events-container .reveal:nth-child(1),
.gift-container .reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.couple-container .reveal:nth-child(2),
.events-container .reveal:nth-child(2),
.gift-container .reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.couple-container .reveal:nth-child(3),
.events-container .reveal:nth-child(3),
.gift-container .reveal:nth-child(3) {
    transition-delay: 0.3s;
}

/* Timeline staggered animations */
.timeline-item:nth-child(1).reveal { transition-delay: 0.1s; }
.timeline-item:nth-child(2).reveal { transition-delay: 0.2s; }
.timeline-item:nth-child(3).reveal { transition-delay: 0.3s; }
.timeline-item:nth-child(4).reveal { transition-delay: 0.4s; }

/* Gallery staggered animations */
.gallery-item:nth-child(1).reveal { transition-delay: 0.1s; }
.gallery-item:nth-child(2).reveal { transition-delay: 0.15s; }
.gallery-item:nth-child(3).reveal { transition-delay: 0.2s; }
.gallery-item:nth-child(4).reveal { transition-delay: 0.25s; }
.gallery-item:nth-child(5).reveal { transition-delay: 0.3s; }
.gallery-item:nth-child(6).reveal { transition-delay: 0.35s; }

/* Countdown items staggered */
.countdown-item {
    animation: countdownPulse 2s ease-in-out infinite;
}

.countdown-item:nth-child(1) { animation-delay: 0s; }
.countdown-item:nth-child(3) { animation-delay: 0.2s; }
.countdown-item:nth-child(5) { animation-delay: 0.4s; }
.countdown-item:nth-child(7) { animation-delay: 0.6s; }

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* ========================================
   Parallax Effects
   ======================================== */

.parallax {
    will-change: transform;
}

.parallax-slow {
    transform: translateY(0);
    transition: transform 0.1s ease-out;
}

.parallax-medium {
    transform: translateY(0);
    transition: transform 0.15s ease-out;
}

.parallax-fast {
    transform: translateY(0);
    transition: transform 0.2s ease-out;
}

/* ========================================
   Decorative Elements Animation
   ======================================== */

.hero-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: rotateBg 60s linear infinite;
    pointer-events: none;
}

@keyframes rotateBg {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Button Hover Effects
   ======================================== */

.btn-open::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-open:hover::before {
    transform: translateX(100%);
}

/* ========================================
   Loading States
   ======================================== */

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s 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;
        scroll-behavior: auto !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .floating-ornaments {
        display: none;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .opening-cover,
    .music-control,
    .lightbox,
    .scroll-indicator {
        display: none !important;
    }
    
    .main-content {
        display: block !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
