/* ============================================
   Makayla Wingert Realtor — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Selection color */
::selection {
    background: #166534;
    color: #fefce8;
}

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

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}
#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile menu link transitions */
.mobile-link {
    transition: color 0.2s ease, transform 0.2s ease;
}
.mobile-link:hover {
    transform: scale(1.05);
}

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: translateY(5px) rotate(45deg);
}
#menuBtn.active #bar2 {
    opacity: 0;
}
#menuBtn.active #bar3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* Navbar scroll state */
#nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08);
}

/* Scroll-reveal base: content is VISIBLE by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scroll-reveal hidden state — applied via JS only */
@media (prefers-reduced-motion: no-preference) {
    .reveal.reveal-hidden {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.reveal-hidden-delay-1 {
        transition-delay: 0.1s;
    }
    .reveal.reveal-hidden-delay-2 {
        transition-delay: 0.2s;
    }
    .reveal.reveal-hidden-delay-3 {
        transition-delay: 0.3s;
    }
}

/* Reduce motion: disable all transitions */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal.reveal-hidden {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2386efac' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Subtle image hover zoom */
img {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Print styles */
@media print {
    nav, #contactForm, #formSuccess, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
