/* ==========================================================================
   Social Influence — Animations & Transitions
   GSAP ScrollTrigger + CSS keyframes + hover effects
   ========================================================================== */

/* ── GSAP Initial States ─────────────────────────────────────────────── */
/* Elements start hidden and animate in via GSAP ScrollTrigger */

.si-fade-up {
    opacity: 0;
    transform: translateY(30px);
}

.si-fade-in {
    opacity: 0;
}

.si-fade-left {
    opacity: 0;
    transform: translateX(-30px);
}

.si-fade-right {
    opacity: 0;
    transform: translateX(30px);
}

.si-scale-in {
    opacity: 0;
    transform: scale(0.9);
}

.si-reveal-up {
    clip-path: inset(100% 0 0 0);
}

/* ── GSAP Fallback: Show elements after 4s if GSAP hasn't loaded ────── */
/* This prevents elements staying invisible if GSAP/ScrollTrigger fails */
@keyframes si-gsap-fallback {
  to {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
}

.si-fade-up,
.si-fade-in,
.si-fade-left,
.si-fade-right,
.si-scale-in,
.si-stagger-children > * {
  animation: si-gsap-fallback 0.01s forwards;
  animation-delay: 4s;
}

.si-reveal-up {
  animation: si-gsap-fallback 0.01s forwards;
  animation-delay: 4s;
}

/* Case study cards — shorter fallback (2s) since they're hidden by GSAP fromTo
   and cards below the fold would create a whitespace gap otherwise */
.si-case-study-card {
  animation: si-gsap-fallback 0.01s forwards;
  animation-delay: 2s;
}

/* When GSAP has processed, it sets inline styles which override these */

/* ── Counter Animation ───────────────────────────────────────────────── */
.si-counter {
    font-family: var(--si-font-mono);
    font-weight: var(--si-weight-bold);
    font-variant-numeric: tabular-nums;
}

/* ── Stagger Container ───────────────────────────────────────────────── */
.si-stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}

/* ── CSS Keyframes ───────────────────────────────────────────────────── */

/* WhatsApp pulse ring */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Gradient shimmer for buttons */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Hero badge pulse dot */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

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

/* Spin for loading states */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Slide in from right (mobile menu) */
@keyframes slide-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Fade overlay */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Gradient text animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Glow pulse for accent elements */
@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--si-accent-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--si-accent-glow), 0 0 60px rgba(158, 0, 93, 0.1);
    }
}

/* Number count ticker */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hover Effects ───────────────────────────────────────────────────── */

/* Card lift */
.si-hover-lift {
    transition: transform var(--si-transition-base), box-shadow var(--si-transition-base);
}

.si-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--si-shadow-lg);
}

/* Image zoom on hover */
.si-hover-zoom {
    overflow: hidden;
}

.si-hover-zoom img {
    transition: transform 0.6s ease;
}

.si-hover-zoom:hover img {
    transform: scale(1.05);
}

/* Glow on hover */
.si-hover-glow {
    transition: box-shadow var(--si-transition-base);
}

.si-hover-glow:hover {
    box-shadow: var(--si-shadow-glow);
}

/* Border accent on hover */
.si-hover-border {
    transition: border-color var(--si-transition-base);
    border: 1px solid var(--si-border-dark);
}

.si-hover-border:hover {
    border-color: var(--si-accent-primary);
}

/* ── Decorative Background Elements ──────────────────────────────────── */

/* Radial gradient orb (used in hero/CTA sections) */
.si-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.si-orb-accent {
    background: var(--si-accent-primary);
    opacity: 0.08;
}

.si-orb-gold {
    background: #FBBF24;
    opacity: 0.06;
}

/* Dot grid pattern */
.si-dot-pattern {
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Grid lines pattern */
.si-grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── Accessibility: Reduced Motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .si-fade-up,
    .si-fade-in,
    .si-fade-left,
    .si-fade-right,
    .si-scale-in,
    .si-stagger-children > * {
        opacity: 1;
        transform: none;
    }

    .si-reveal-up {
        clip-path: none;
    }

    .si-hover-lift:hover {
        transform: none;
    }

    .si-hover-zoom:hover img {
        transform: none;
    }

    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
