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

body {
    overflow-x: hidden;
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

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

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

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

/* Selection color */
::selection {
    background: #A7F3D0;
    color: #064E3B;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding: 0.5rem 0;
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #EDE8DD 0%, #D1FAE5 100%);
}

/* Smooth transitions for all interactive elements */
a, button, input, textarea {
    transition: all 0.2s ease;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Ensure text readability on gradient backgrounds */
.text-emerald-200 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Glass morphism utilities */
.glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
