/* ========================================
   Charles Martin Real Estate — Custom Styles
   ======================================== */

/* Base */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #d4551a;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #faf7f2;
}
::-webkit-scrollbar-thumb {
    background: #d4a652;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4551a;
}

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

#navbar.scrolled {
    background-color: rgba(250, 247, 242, 0.98);
    box-shadow: 0 1px 0 rgba(212, 85, 26, 0.1);
}

/* Service cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(212, 85, 26, 0.08);
}

/* Area cards */
.area-card {
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.area-card:hover {
    box-shadow: 0 24px 48px rgba(26, 23, 20, 0.2);
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(212, 85, 26, 0.08);
}

/* Mobile menu animation */
#mobileMenu.open {
    max-height: 400px;
}

#menuBtn.active #menuLine1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active #menuLine2 {
    opacity: 0;
}

#menuBtn.active #menuLine3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* Select 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='%236b6560' 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 0 center;
    padding-right: 2rem;
}

/* Focus visible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4551a;
    outline-offset: 2px;
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

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

/* Print */
@media print {
    #navbar,
    #contact,
    iframe {
        display: none;
    }
    
    body {
        background: #fff;
        color: #1a1714;
    }
}
