/* =============================================
   MAAMADURAI SMART HOMES - ANIMATIONS
   ============================================= */

/* 3D Parallax Hero */
.parallax-container {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    perspective: 1000px;
}

.parallax-layer {
    position: absolute;
    inset: 0;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.parallax-layer--back {
    transform: translateZ(-300px) scale(1.3);
}

.parallax-layer--mid {
    transform: translateZ(-150px) scale(1.15);
}

.parallax-layer--front {
    transform: translateZ(0);
}

/* 3D Card Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) translateZ(20px);
}

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Glow Effects */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(197, 165, 114, 0.3);
    }

    to {
        box-shadow: 0 0 40px rgba(197, 165, 114, 0.6);
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.animate-on-scroll.fade-up {
    transform: translateY(60px);
}

.animate-on-scroll.fade-left {
    transform: translateX(-60px);
}

.animate-on-scroll.fade-right {
    transform: translateX(60px);
}

.animate-on-scroll.zoom-in {
    transform: scale(0.8);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Stagger children */
.stagger-children>* {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.stagger-children.is-visible>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.is-visible>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.is-visible>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.is-visible>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.is-visible>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children.is-visible>*:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.is-visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.6s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Image Reveal */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-dark);
    transform-origin: left;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1;
}

.image-reveal.is-visible::before {
    transform: scaleX(0);
    transform-origin: right;
}

/* Scroll Indicator */
.scroll-indicator {
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 25px;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    width: 6px;
    height: 10px;
    background: white;
    border-radius: 3px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDown 1.5s ease infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Pulse Ring */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--accent-gold);
    animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}