/* Custom styles and overrides */

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

/* Selection color */
::selection {
    background-color: rgba(44, 102, 49, 0.2);
    color: #19351a;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif {
    color: #19351a !important;
}

#navbar.scrolled .tracking-\[0\.2em\] {
    color: #2c6631 !important;
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#menuBtn.active .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .hamburger span:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Image hover effects */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #97c69e;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #2c6631;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    nav, #backToTop, .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* Large desktop */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
