/* Base & Utilities */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Feature Items Animation */
.feature-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Navbar Transition */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-link {
    color: #3a3a44;
}

#navbar.scrolled .nav-text {
    color: #1a1a23;
}

/* Mobile Menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

::-webkit-scrollbar-track {
    background: #f6f6f7;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #a4a4b4;
}

/* Selection Color */
::selection {
    background: #ff8a57;
    color: #ffffff;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .feature-item,
    .group img,
    a,
    button {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
    border-radius: 4px;
}

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

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
