/* Custom styles for Crescent Moon Healing */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #1a2846;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #273c69;
}

/* Navbar transitions */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(13, 20, 35, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .font-sans {
    color: #1a2846 !important;
}

#navbar.scrolled .nav-link {
    color: #4164af;
}

#navbar.scrolled .nav-link:hover {
    color: #1a2846;
    background: #f0f3f9;
}

/* Mobile menu animation */
#menuBtn.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active #bar2 {
    opacity: 0;
}
#menuBtn.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Mobile links */
.mobile-link {
    opacity: 1;
}

/* Scroll reveal base - visible by default for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Scroll reveal when animated - only applied via JS for below-fold */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-revealed="false"] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Subtle floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Selection color */
::selection {
    background: #f4db7a;
    color: #1a2846;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #f4db7a;
    outline-offset: 2px;
}

/* Select dropdown styling */
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='%236b7280' stroke-width='2.5' 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;
}

/* Image loading placeholder */
img {
    background-color: #f0f3f9;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        transition: none;
    }
    .scroll-reveal[data-revealed="false"] {
        opacity: 1;
        transform: none;
    }
    img, .group:hover img {
        transition: none;
    }
}
