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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal base — content is always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Initial state is visible — JS adds the animated class */
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

#navbar.scrolled .font-serif {
    color: #064e3b !important;
}

/* Mobile menu transition */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Selection color */
::selection {
    background: #a7f3d0;
    color: #064e3b;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}
