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

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Video Intro Animations */
#video-intro.fade-out {
    transform: translateY(-100%);
    pointer-events: none;
}

/* Hero Button Stagger Animation */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-btn-animate {
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
/* Stacked Section Shadows for Depth */
section.sticky {
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5);
}

/* Layer Transition Effects */
.layer-transition {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.layer-enter {
    transform: translateY(100%);
}

.layer-enter-active {
    transform: translateY(0);
}

.layer-exit {
    transform: translateY(-100%);
}

/* Service Card Hover Effects */
.service-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

/* Scroll Progress Indicator */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    width: 0%;
    transition: width 0.1s ease;
}
/* Text Reveal Animation */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    transform: translateY(0);
    opacity: 1;
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-text.hidden {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
    transform: translateY(100px);
    opacity: 0;
}

/* Gradient Text Animation */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* Mobile Menu Transitions */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

/* Parallax Image Effect */
.parallax-img {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Button Glow Effect */
.glow-button {
    position: relative;
    overflow: hidden;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b5cf6, #d946ef, #8b5cf6);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
    filter: blur(10px);
}

.glow-button:hover::before {
    opacity: 0.7;
}

/* Custom Selection Color */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: white;
}

/* Loading Progress Bar Animation */
@keyframes progressPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.progress-pulse {
    animation: progressPulse 1.5s ease-in-out infinite;
}

/* Layer Transition Effects */
.layer-transition {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

/* Noise Texture Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Smooth Image Loading */
img {
    opacity: 1;
    transition: opacity 0.3s;
}

img[data-src] {
    opacity: 0;
}

/* Focus States for Accessibility */
a:focus-visible, button:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 4px;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}