@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.2;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ============================================
   SCROLL ANIMATION SYSTEM
   ============================================ */

/* Hidden state - elements start invisible */
.scroll-hidden {
    opacity: 0;
    transition: none;
}

/* Revealed states */
.scroll-animated[data-scroll="fade-up"] {
    animation: scrollFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="fade-down"] {
    animation: scrollFadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="fade-left"] {
    animation: scrollFadeLeft 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="fade-right"] {
    animation: scrollFadeRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="scale-up"] {
    animation: scrollScaleUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="scale-down"] {
    animation: scrollScaleDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="zoom-in"] {
    animation: scrollZoomIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="blur-in"] {
    animation: scrollBlurIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="slide-up"] {
    animation: scrollSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="flip-up"] {
    animation: scrollFlipUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: bottom center;
    perspective: 1000px;
}

.scroll-animated[data-scroll="glow-in"] {
    animation: scrollGlowIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scroll-animated[data-scroll="clip-up"] {
    animation: scrollClipUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ---- KEYFRAMES ---- */

@keyframes scrollFadeUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.97);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes scrollFadeDown {
    0% {
        opacity: 0;
        transform: translateY(-60px) scale(0.97);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes scrollFadeLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px) scale(0.97);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes scrollFadeRight {
    0% {
        opacity: 0;
        transform: translateX(80px) scale(0.97);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes scrollScaleUp {
    0% {
        opacity: 0;
        transform: scale(0.7);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes scrollScaleDown {
    0% {
        opacity: 0;
        transform: scale(1.4);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes scrollZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-5deg);
        filter: blur(6px);
    }
    60% {
        transform: scale(1.05) rotate(1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0);
    }
}

@keyframes scrollBlurIn {
    0% {
        opacity: 0;
        filter: blur(20px) brightness(2);
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        filter: blur(0) brightness(1);
        transform: scale(1);
    }
}

@keyframes scrollSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollFlipUp {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateX(80deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg);
        filter: blur(0);
    }
}

@keyframes scrollGlowIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
        filter: brightness(0.5) blur(4px);
        box-shadow: 0 0 0 rgba(168, 85, 247, 0);
    }
    50% {
        box-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(1) blur(0);
        box-shadow: 0 0 0 rgba(168, 85, 247, 0);
    }
}

@keyframes scrollClipUp {
    0% {
        opacity: 0;
        clip-path: inset(100% 0 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* ---- STAGGER ANIMATION ---- */

[data-stagger-item] {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: none;
}

[data-stagger-item].stagger-animated {
    animation: staggerReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes staggerReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ---- TEXT REVEAL ---- */

.text-reveal-inner {
    transform: translateY(100%);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-revealed .text-reveal-inner {
    transform: translateY(0);
}

/* ---- PROGRESS BARS ---- */

.progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #a855f7, #7c3aed, #a855f7);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

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

/* ---- FLOATING ANIMATION (for hero decoration) ---- */

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(1deg); }
    75% { transform: translateY(5px) rotate(-1deg); }
}

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

/* ---- GRADIENT BORDER ANIMATION ---- */

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

.gradient-border {
    background: linear-gradient(270deg, #a855f7, #6366f1, #ec4899, #a855f7);
    background-size: 400% 400%;
    animation: gradientBorder 8s ease infinite;
}

/* ---- SHINE EFFECT ON HOVER ---- */

.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 45%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.05) 55%,
        transparent 100%
    );
    transform: rotate(30deg) translateX(-200%);
    transition: none;
}

.shine-effect:hover::after {
    transform: rotate(30deg) translateX(200%);
    transition: transform 0.8s ease;
}

/* ---- PULSE RING ---- */

@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(168, 85, 247, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
    }
}

.pulse-ring {
    animation: pulseRing 2s ease-out infinite;
}

/* ---- RIPPLE ON CLICK ---- */

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.4;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ---- COUNTER ANIMATION STYLES ---- */

[data-counter] {
    font-variant-numeric: tabular-nums;
}

/* ---- MAGNETIC BUTTON EFFECT ---- */

[data-magnetic] {
    display: inline-block;
    will-change: transform;
}

/* ---- TILT EFFECT ---- */

[data-tilt] {
    will-change: transform;
}

/* ---- PARALLAX ELEMENTS ---- */

[data-parallax] {
    will-change: transform;
    transition: none;
}