/**
 * T8 Hotel - Animation System
 * Premium animations for luxury hotel experience
 */

/* ========================================
   1. PAGE LOAD ANIMATIONS
   ======================================== */

/* Header slide-down on load */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-animate {
    animation: slideDown 0.8s ease-out forwards;
}

/* Hero text reveal */
@keyframes revealUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-animate-1 { animation: revealUp 0.8s ease-out 0.2s both; }
.hero-animate-2 { animation: revealUp 0.8s ease-out 0.4s both; }
.hero-animate-3 { animation: revealUp 0.8s ease-out 0.6s both; }
.hero-animate-4 { animation: revealUp 0.8s ease-out 0.8s both; }

/* ========================================
   2. MICRO-INTERACTIONS
   ======================================== */

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

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

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Link Underline Animation */
.link-animate {
    position: relative;
    display: inline-block;
}

.link-animate::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease, left 0.3s ease;
}

.link-animate:hover::after {
    width: 100%;
    left: 0;
}

/* Image Hover Zoom (Ken Burns) */
.img-ken-burns {
    overflow: hidden;
}

.img-ken-burns img {
    transition: transform 8s ease;
}

.img-ken-burns:hover img {
    transform: scale(1.1);
}

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

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

/* Golden Glow on Hover */
.golden-glow {
    transition: box-shadow 0.3s ease;
}

.golden-glow:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* ========================================
   3. SPECIAL EFFECTS
   ======================================== */

/* Shimmer Effect for Logo */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.logo-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(212, 175, 55, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 3s infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Animation for CTAs */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }
}

.cta-pulse {
    animation: pulse 2s infinite;
}

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

/* ========================================
   4. PAGE TRANSITIONS
   ======================================== */

/* Fade transition */
.page-transition {
    animation: fadeIn 0.5s ease-out;
}

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

/* ========================================
   5. SCROLL-TRIGGERED ENHANCEMENTS
   ======================================== */

/* Smooth reveal for sections */
.reveal-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   6. ICON ANIMATIONS
   ======================================== */

/* Icon bounce on hover */
.icon-bounce:hover i,
.icon-bounce:hover svg {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-6px); }
    50% { transform: translateY(0); }
    75% { transform: translateY(-3px); }
}

/* Icon rotate on hover */
.icon-rotate:hover i,
.icon-rotate:hover svg {
    transform: rotate(360deg);
    transition: transform 0.5s ease;
}

/* ========================================
   7. TEXT ANIMATIONS
   ======================================== */

/* Text gradient animation */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient-animate {
    background: linear-gradient(90deg, #D4AF37, #F4E4BC, #D4AF37);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 3s ease infinite;
}

/* ========================================
   8. 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;
    }
}
