/* ========================================
   WEB DESIGN KASHMIR — ANIMATIONS
   Scroll reveals, kinetic typography, 
   hero animations, particle canvas styles
   ======================================== */

/* ========================================
   HERO MESH GRADIENT ANIMATION
   ======================================== */
.hero-bg {
    animation: heroShift 8s ease-in-out infinite alternate;
    background-size: 200% 200%;
}

@keyframes heroShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 50% 100%; }
    100% { background-position: 100% 50%; }
}

/* ========================================
   KINETIC TYPOGRAPHY — WORD REVEAL
   ======================================== */
.hero-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
    animation: wordReveal 0.7s ease forwards;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Stagger delays — applied via inline style */
.hero-title .word:nth-child(1) { animation-delay: 0.1s; }
.hero-title .word:nth-child(2) { animation-delay: 0.2s; }
.hero-title .word:nth-child(3) { animation-delay: 0.3s; }
.hero-title .word:nth-child(4) { animation-delay: 0.4s; }
.hero-title .word:nth-child(5) { animation-delay: 0.5s; }
.hero-title .word:nth-child(6) { animation-delay: 0.6s; }
.hero-title .word:nth-child(7) { animation-delay: 0.7s; }
.hero-title .word:nth-child(8) { animation-delay: 0.8s; }
.hero-title .word:nth-child(9) { animation-delay: 0.9s; }
.hero-title .word:nth-child(10) { animation-delay: 1.0s; }
.hero-title .word:nth-child(11) { animation-delay: 1.1s; }
.hero-title .word:nth-child(12) { animation-delay: 1.2s; }

/* ========================================
   HERO SUBTITLE FADE IN
   ======================================== */
.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

/* Hero CTAs stagger */
.hero-ctas {
    animation: fadeInUp 0.8s ease 1.0s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Hero trust stats */
.trust-stats {
    animation: fadeInUp 0.8s ease 1.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Hero image */
.hero-image {
    animation: fadeInRight 1s ease 0.6s forwards;
    opacity: 0;
    transform: translateX(30px);
}

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

/* ========================================
   BADGE GLOW PULSE
   ======================================== */
.hero-badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
    50% { box-shadow: 0 0 16px 4px rgba(59, 130, 246, 0.15); }
}

/* ========================================
   SCROLL REVEAL STAGGER (children)
   ======================================== */
.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.2s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.3s; }
.reveal-stagger > *:nth-child(7) { transition-delay: 0.35s; }
.reveal-stagger > *:nth-child(8) { transition-delay: 0.4s; }
.reveal-stagger > *:nth-child(9) { transition-delay: 0.45s; }
.reveal-stagger > *:nth-child(10) { transition-delay: 0.5s; }
.reveal-stagger > *:nth-child(11) { transition-delay: 0.55s; }
.reveal-stagger > *:nth-child(12) { transition-delay: 0.6s; }

/* ========================================
   ICON PULSE ON CARD HOVER
   ======================================== */
.bento-card:hover .bento-icon {
    animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* ========================================
   COUNTER TICK ANIMATION
   ======================================== */
.counter-animate {
    display: inline-block;
}

/* ========================================
   STEP CONNECTOR DRAW
   ======================================== */
.step-connector-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1s ease;
}

.step-connector-line.drawn {
    stroke-dashoffset: 0;
}

/* ========================================
   CTA BUTTON SHINE EFFECT
   ======================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: none;
    animation: btnShine 4s ease-in-out infinite;
}

@keyframes btnShine {
    0%, 85% { left: -100%; }
    100% { left: 200%; }
}

/* ========================================
   FLOATING WHATSAPP BOUNCE
   ======================================== */
.whatsapp-float {
    animation: whatsappBounce 2s ease-in-out infinite;
}

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

.whatsapp-float:hover {
    animation: none;
    transform: scale(1.1);
}

/* ========================================
   PRICING CARD POPULAR GLOW
   ======================================== */
.pricing-card.popular {
    animation: popularGlow 3s ease-in-out infinite alternate;
}

@keyframes popularGlow {
    0% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.1); }
    100% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.25); }
}

/* ========================================
   LOADING SKELETON
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 0%, var(--bg-surface2) 50%, var(--bg-surface) 100%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

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

/* ========================================
   PORTFOLIO CARD IMAGE ZOOM ON HOVER
   ======================================== */
.portfolio-card .portfolio-thumb img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   TESTIMONIAL CARD ENTRANCE
   ======================================== */
.testimonial-card.reveal.visible {
    animation: cardEntrance 0.6s ease forwards;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   FAQ ACCORDION SMOOTH OPEN
   ======================================== */
.faq-answer {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.3s ease;
}

/* ========================================
   NAV LINK UNDERLINE ANIMATION
   ======================================== */
@media (min-width: 1024px) {
    .nav-link::before {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 16px;
        right: 16px;
        height: 2px;
        background: var(--accent-blue);
        border-radius: 1px;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease;
    }
    
    .nav-link:hover::before,
    .nav-link.active::before {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* ========================================
   SECTION DIVIDER GRADIENT LINE
   ======================================== */
.section-divider {
    width: 80px;
    height: 3px;
    background: var(--gradient-cta);
    border-radius: 2px;
    margin: 0 auto 24px;
}

/* ========================================
   PARTICLE CANVAS
   ======================================== */
.hero-particles canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   3D TILT CARD SHADOW SHIFT
   ======================================== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card-inner {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* ========================================
   REDUCED MOTION — DISABLE ALL
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-bg { animation: none; }
    .hero-title .word { 
        animation: none; 
        opacity: 1; 
        transform: none; 
        filter: none; 
    }
    .hero-subtitle,
    .hero-ctas,
    .trust-stats,
    .hero-image {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .hero-badge { animation: none; }
    .btn-primary::after { animation: none; display: none; }
    .whatsapp-float { animation: none; }
    .pricing-card.popular { animation: none; }
    .skeleton { animation: none; }
    .reveal, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
    }
    .hero-particles canvas { display: none; }
}
