/* Custom styles for J Whitener Boutique */

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

/* Custom selection color */
::selection {
    background-color: #284d34;
    color: #faf9f6;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar:not(.scrolled) {
    background-color: transparent;
}

#navbar:not(.scrolled) .font-serif,
#navbar:not(.scrolled) .text-warmgray-900 {
    color: #1c1917;
}

/* Nav links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #284d34;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

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

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

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

/* Image hover effects */
.group:hover img {
    transform: scale(1.05);
}

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

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

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

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

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #284d34;
    outline-offset: 2px;
}

/* Button hover lift */
button, a {
    transition: all 0.3s ease;
}

/* Form focus */
input:focus {
    box-shadow: 0 0 0 3px rgba(36, 77, 52, 0.1);
}

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

/* Menu lines animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Asymmetric hero image grid offset */
@media (min-width: 1024px) {
    .lg\:col-span-5 {
        padding-top: 4rem;
    }
}

/* Map container */
iframe {
    filter: saturate(0.8) contrast(1.05);
    transition: filter 0.3s ease;
}

iframe:hover {
    filter: saturate(1) contrast(1);
}

/* Fade in on scroll - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle pattern overlay for sections */
.bg-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(40, 77, 52, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}
