/* Custom styles for David Lifestyle Salon */

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

/* Hide scrollbar for mobile menu */
body.menu-open {
    overflow: hidden;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 249, 243, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(2, 46, 34, 0.08);
}

/* Reveal animations - progressive enhancement, only with JS */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile links */
.mobile-link {
    display: block;
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #047857;
}

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

/* Custom selection color */
::selection {
    background-color: rgba(4, 120, 87, 0.2);
    color: #022c22;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #f0fdf4 inset !important;
    -webkit-text-fill-color: #022c22 !important;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .mobile-link {
        transition: none;
    }

    #back-to-top {
        transition: none;
    }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .reveal {
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal[data-reveal] {
        transform: translateY(32px);
    }
}
