/* =============================================
   CHANDNI SOFTWARE – PAGE-SPECIFIC ANIMATIONS
   ============================================= */

/* Hero ripple on click */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(224, 27, 36, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Glowing navbar pill on scroll */
.nav-pill-glow {
    box-shadow: 0 0 20px rgba(224, 27, 36, 0.4);
}

/* Typewriter cursor */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--red);
    margin-left: 2px;
    animation: blinkCursor 0.8s step-end infinite;
    vertical-align: middle;
}

@keyframes blinkCursor {
    50% {
        opacity: 0;
    }
}

/* Pulse ring (for icons) */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    border: 2px solid var(--red);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Animated gradient border */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--red), #ff6b6b, var(--red-dark), #ff4d5a);
    background-size: 300%;
    border-radius: inherit;
    z-index: -1;
    animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
    to {
        background-position: 300% center;
    }
}

/* Number scramble animation */
@keyframes numberScramble {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating decoration dots */
.deco-dot {
    position: absolute;
    border-radius: 50%;
    background: var(--red);
    animation: decoDot 6s ease-in-out infinite;
}

@keyframes decoDot {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.15;
    }

    33% {
        transform: translate(10px, -15px) scale(1.2);
        opacity: 0.25;
    }

    66% {
        transform: translate(-8px, 8px) scale(0.9);
        opacity: 0.1;
    }
}

/* Page transition */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--red);
    transform: scaleY(0);
    transform-origin: bottom;
}

.page-transition.enter {
    animation: pageEnter 0.4s ease-in forwards;
}

.page-transition.leave {
    animation: pageLeave 0.4s ease-out forwards;
}

@keyframes pageEnter {
    to {
        transform: scaleY(1);
    }
}

@keyframes pageLeave {
    from {
        transform: scaleY(1);
        transform-origin: top;
    }

    to {
        transform: scaleY(0);
    }
}

/* Hover lift for cards */
.card-lift {
    transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.3s ease;
}

.card-lift:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

/* Shimmer loading */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}