/* ========================================
   InfiWits — Premium Animation System v2.0
   ======================================== */

/* ===========================
   FLOAT ANIMATIONS
   =========================== */
@keyframes iw-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes iw-float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

@keyframes iw-float-diagonal {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -8px) rotate(1deg); }
    50% { transform: translate(-5px, -15px) rotate(-1deg); }
    75% { transform: translate(-10px, -5px) rotate(0.5deg); }
}

/* ===========================
   GLOW EFFECTS
   =========================== */
@keyframes iw-pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.4), 0 0 80px rgba(99, 102, 241, 0.1); }
}

@keyframes iw-breathe {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* ===========================
   GRADIENT ANIMATIONS
   =========================== */
@keyframes iw-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes iw-gradient-rotate {
    0% { --iw-gradient-angle: 0deg; }
    100% { --iw-gradient-angle: 360deg; }
}

/* ===========================
   ROTATION
   =========================== */
@keyframes iw-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes iw-rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===========================
   SHIMMER & SHINE
   =========================== */
@keyframes iw-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes iw-shine-sweep {
    0% { transform: rotate(30deg) translateX(-200%); }
    100% { transform: rotate(30deg) translateX(200%); }
}

/* ===========================
   SCALE EFFECTS
   =========================== */
@keyframes iw-scale-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes iw-scale-in {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

/* ===========================
   SLIDE ANIMATIONS
   =========================== */
@keyframes iw-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes iw-slide-down {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes iw-slide-left {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes iw-slide-right {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===========================
   FADE
   =========================== */
@keyframes iw-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes iw-fade-in-blur {
    from { opacity: 0; filter: blur(10px); }
    to { opacity: 1; filter: blur(0); }
}

/* ===========================
   MORPHING BLOB
   =========================== */
@keyframes iw-morph-blob {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
    }
    75% {
        border-radius: 60% 30% 60% 40% / 70% 40% 50% 60%;
    }
}

.iw-blob {
    position: absolute;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: iw-morph-blob 15s ease-in-out infinite, iw-float-slow 8s ease-in-out infinite;
}

.iw-blob-indigo {
    background: rgba(99, 102, 241, 0.12);
}

.iw-blob-cyan {
    background: rgba(6, 182, 212, 0.08);
}

.iw-blob-violet {
    background: rgba(139, 92, 246, 0.1);
}

/* ===========================
   UTILITY ANIMATION CLASSES
   =========================== */
.iw-animate-float {
    animation: iw-float 3s ease-in-out infinite;
}

.iw-animate-float-slow {
    animation: iw-float-slow 5s ease-in-out infinite;
}

.iw-animate-pulse-glow {
    animation: iw-pulse-glow 3s ease-in-out infinite;
}

.iw-animate-rotate {
    animation: iw-rotate 20s linear infinite;
}

.iw-animate-rotate-slow {
    animation: iw-rotate-slow 40s linear infinite;
}

.iw-animate-gradient {
    background-size: 200% 200%;
    animation: iw-gradient-shift 4s ease-in-out infinite;
}

.iw-animate-breathe {
    animation: iw-breathe 4s ease-in-out infinite;
}

/* ===========================
   TILT EFFECT
   =========================== */
.iw-tilt {
    transition: transform var(--iw-transition-base);
    perspective: 1000px;
}

.iw-tilt:hover {
    transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(10px);
}

/* ===========================
   SHINE EFFECT
   =========================== */
.iw-shine {
    position: relative;
    overflow: hidden;
}

.iw-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.03) 40%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 60%,
            transparent 100%);
    transform: rotate(30deg) translateX(-100%);
    transition: none;
    pointer-events: none;
}

.iw-shine:hover::after {
    animation: iw-shimmer 0.8s ease-in-out;
}

/* ===========================
   MAGNETIC BUTTON
   =========================== */
.iw-magnetic {
    transition: transform var(--iw-transition-fast);
}

/* ===========================
   GRADIENT BORDER
   =========================== */
.iw-gradient-border {
    position: relative;
    background: var(--iw-bg-card);
    border-radius: var(--iw-radius-lg);
}

.iw-gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--iw-accent-gradient);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--iw-transition-base);
}

.iw-gradient-border:hover::before {
    opacity: 1;
}

/* ===========================
   DECORATIVE PATTERNS
   =========================== */
.iw-dot-pattern {
    background-image: radial-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.iw-grid-pattern {
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ===========================
   GLOW ORBS (Decorative)
   =========================== */
.iw-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.iw-orb-blue {
    background: rgba(99, 102, 241, 0.15);
}

.iw-orb-cyan {
    background: rgba(6, 182, 212, 0.1);
}

.iw-orb-gold {
    background: rgba(245, 158, 11, 0.08);
}

.iw-orb-violet {
    background: rgba(139, 92, 246, 0.12);
}

/* ===========================
   TYPING CURSOR
   =========================== */
.iw-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--iw-accent-primary);
    margin-left: 2px;
    animation: iw-blink 1s step-end infinite;
}

@keyframes iw-blink {
    50% { opacity: 0; }
}

/* ===========================
   HORIZONTAL SCROLL
   =========================== */
.iw-scroll-x {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.iw-scroll-x::-webkit-scrollbar {
    display: none;
}

.iw-scroll-x > * {
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ===========================
   BADGE WITH GLOW
   =========================== */
.iw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.375rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--iw-radius-full);
    background: rgba(99, 102, 241, 0.1);
    color: var(--iw-accent-secondary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===========================
   STAGGER WAVE ANIMATION
   =========================== */
.iw-stagger-wave > *:nth-child(1) { --iw-stagger-delay: 0s; }
.iw-stagger-wave > *:nth-child(2) { --iw-stagger-delay: 0.08s; }
.iw-stagger-wave > *:nth-child(3) { --iw-stagger-delay: 0.16s; }
.iw-stagger-wave > *:nth-child(4) { --iw-stagger-delay: 0.24s; }
.iw-stagger-wave > *:nth-child(5) { --iw-stagger-delay: 0.32s; }
.iw-stagger-wave > *:nth-child(6) { --iw-stagger-delay: 0.4s; }

/* ===========================
   ANIMATED RING DECORATION
   =========================== */
.iw-ring {
    position: absolute;
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: iw-rotate-slow 30s linear infinite;
}

.iw-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--iw-accent-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}