/* ===== Custom Styles for Harpers ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #5c7a4e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #45603c;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #5c7a4e;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

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

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays */
    .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 {
    will-change: transform;
}

/* Button focus states */
a:focus-visible, button:focus-visible {
    outline: 2px solid #5c7a4e;
    outline-offset: 2px;
}

/* Hero image composition on mobile */
@media (max-width: 1023px) {
    #hero {
        flex-direction: column;
        min-height: auto;
    }
    #hero > div:first-child {
        min-height: 70vh;
    }
    #hero > div:last-child {
        min-height: 50vh;
        position: relative;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Hamburger animation */
#menu-icon.active #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-icon.active #bar2 {
    opacity: 0;
}
#menu-icon.active #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 100%;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(44, 62, 41, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #1a2e1a !important;
}

.nav-scrolled .nav-logo-sub {
    color: #5c7a4e !important;
}

.nav-scrolled .nav-link {
    color: #2c3e29 !important;
}

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