/* Sargent Lodge — Custom Styles */

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

body {
    overflow-x: hidden;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2D5A3D;
}

/* Selection color */
::selection {
    background: #2D5A3D;
    color: #FDFBF7;
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 90, 61, 0.1);
}

#navbar.scrolled .font-display,
#navbar.scrolled .font-accent {
    color: #1f402a !important;
}

#navbar.scrolled .menu-line {
    background: #1f402a !important;
}

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }
#mobileMenu.open .mobile-link:nth-child(6) { transition-delay: 0.6s; }

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

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

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px currentColor;
}

/* Smooth image loading */
img {
    image-rendering: auto;
}

/* Print styles */
@media print {
    #navbar,
    #mobileMenu {
        display: none;
    }
    
    body {
        color: #1f402a;
        background: white;
    }
}

/* 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* High contrast */
@media (prefers-contrast: high) {
    .font-body,
    .font-display,
    .font-accent {
        color: #13281a;
    }
    
    input,
    textarea {
        border-width: 2px;
    }
}

/* Landscape on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 8rem 0;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
}
