/* Custom styles for Brandon Eves Utah 1st Real Estate */

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

/* Custom selection color */
::selection {
    background-color: #a61641;
    color: white;
}

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

/* Navbar transition */
#navbar {
    background-color: transparent;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(116, 23, 50, 0.1);
}

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

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(4px, -4px);
}

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

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

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

/* 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);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 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='%23741732' stroke-width='2'%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;
}

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

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

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

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

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