/* =============================================
   SYNERGY - Additional Animations
   ============================================= */

/* ----------------------------------------------
   Text Reveal Animations
   ----------------------------------------------- */
.char {
    display: inline-block;
}

.word {
    display: inline-block;
}

/* ----------------------------------------------
   Fade Animations
   ----------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

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

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

/* ----------------------------------------------
   Glow Animations
   ----------------------------------------------- */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--purple-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--purple-glow), 0 0 60px var(--purple-glow);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowGold {
    0%, 100% {
        box-shadow: 0 0 20px var(--gold-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--gold-glow), 0 0 60px var(--gold-glow);
    }
}

.glow-gold {
    animation: glowGold 3s ease-in-out infinite;
}

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

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

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

.float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

/* ----------------------------------------------
   Spin Animation
   ----------------------------------------------- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 10s linear infinite;
}

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

.shimmer {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.05) 50%, 
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* ----------------------------------------------
   Scale on Hover
   ----------------------------------------------- */
.hover-scale {
    transition: transform var(--transition-fast);
}

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

/* ----------------------------------------------
   Border Glow Animation
   ----------------------------------------------- */
@keyframes borderGlow {
    0%, 100% {
        border-color: var(--purple-glow);
    }
    50% {
        border-color: var(--gold-glow);
    }
}

.border-glow {
    animation: borderGlow 3s ease-in-out infinite;
}

/* ----------------------------------------------
   Slide Up for Sections
   ----------------------------------------------- */
.section-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s ease, transform 1s ease;
}

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

/* ----------------------------------------------
   Number Count Glow
   ----------------------------------------------- */
.number-glow {
    text-shadow: 0 0 30px var(--purple-glow);
}

/* ----------------------------------------------
   Button Shake
   ----------------------------------------------- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* ----------------------------------------------
   Confetti burst for form success
   ----------------------------------------------- */
@keyframes confettiFall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: 50%;
    left: 50%;
    animation: confettiFall 3s ease-in forwards;
    pointer-events: none;
    z-index: 100000;
}

/* ----------------------------------------------
   Loading spinner
   ----------------------------------------------- */
@keyframes spinner {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    animation: spinner 1s linear infinite;
}

/* ----------------------------------------------
   Typing effect
   ----------------------------------------------- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor {
    animation: blink 1s step-end infinite;
}

/* ----------------------------------------------
   Gradient rotate
   ----------------------------------------------- */
@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-rotate {
    background-size: 200% 200%;
    animation: gradientRotate 4s ease infinite;
}

/* ----------------------------------------------
   Input focus glow
   ----------------------------------------------- */
.input-glow:focus {
    animation: inputGlow 1.5s ease infinite;
}

@keyframes inputGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(168, 85, 247, 0); }
}

/* =============================================
   VISIBILITY FALLBACKS - Ensure all content is visible
   even if JS/GSAP/AOS fails to load
   ============================================= */
/* Force all AOS elements visible */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}
.aos-init,
.aos-animate {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* Card base visibility */
.bento-card,
.portfolio-card,
.pricing-card,
.testimonial-card,
.process-step,
.why-point,
.stat-item {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Hero text word break fix */
.hero-title .line span {
    display: inline-block !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
}
.hero-title .line {
    display: block !important;
    font-size: clamp(2.5rem, 8vw, 5rem) !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
}
.hero-title .line-1 {
    color: #ffffff !important;
}
.hero-title .line-2 {
    background: linear-gradient(135deg, #a855f7, #f59e0b) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}
