/* Custom styles for Sage Hair Studio */

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(50, 61, 47, 0.08);
}

#navbar.scrolled #nav-logo-text,
#navbar.scrolled .nav-link {
    color: #3b4837;
}

#navbar.scrolled #nav-logo-icon svg {
    stroke: #3b4837;
}

#navbar.scrolled .nav-link {
    color: #3b4837;
}

#navbar.scrolled .nav-link:hover {
    color: #5a6f52;
}

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

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

.menu-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background-color: #3b4837;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-line.top {
    top: 9px;
}

.menu-line.middle {
    top: 15px;
}

.menu-line.bottom {
    top: 21px;
}

#menu-btn.active .menu-line.top {
    top: 15px;
    transform: translateX(-50%) rotate(45deg);
}

#menu-btn.active .menu-line.middle {
    opacity: 0;
}

#menu-btn.active .menu-line.bottom {
    top: 15px;
    transform: translateX(-50%) rotate(-45deg);
}

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

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

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

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #92a487;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23728a68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Selection color */
::selection {
    background: #d4d9cc;
    color: #1a2119;
}

/* Active nav link highlight */
.nav-link.active {
    color: #5a6f52;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #5a6f52;
    border-radius: 1px;
}

/* Image hover effects */
.rounded-2xl.overflow-hidden img {
    will-change: transform;
}

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

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