/* Custom styles to complement Tailwind */

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

/* Custom selection color */
::selection {
    background-color: #047857;
    color: #fefdf8;
}

/* Fade-in animation for elements */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered fade-in for grid items */
.fade-in-stagger {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar transition */
.nav-scrolled {
    background-color: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.1);
}

.nav-scrolled .font-serif {
    color: #022c22 !important;
}

/* Image hover effects */
img {
    will-change: transform;
}

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

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

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

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

/* Mobile menu animation */
#mobile-menu {
    backdrop-filter: blur(10px);
}

/* Input focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Button hover lift effect */
button, a {
    will-change: transform;
}

/* Decorative line animation */
.group:hover .h-px {
    width: 48px;
    transition: width 0.3s ease;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fade-in,
    .fade-in-stagger {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    img,
    button,
    a {
        will-change: auto;
        transition: none;
    }
}
