/* ============================================
   Jessica Short — Realtor | Custom Styles
   ============================================ */

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

/* Selection color */
::selection {
    background: rgba(160, 70, 126, 0.2);
    color: #271126;
}

/* Navbar transition states */
.nav-link {
    transition: color 0.3s ease;
}

/* Scroll reveal base — content is always visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll reveal active state (applied by JS) */
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll reveal hidden state (applied by JS only, progressive enhancement) */
.reveal.reveal-hidden {
    opacity: 0;
    transform: translateY(24px);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Subtle hover underline on nav links */
@media (prefers-reduced-motion: no-preference) {
    .nav-link {
        position: relative;
    }
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 1px;
        background: currentColor;
        transition: width 0.3s ease;
        opacity: 0.5;
    }
    .nav-link:hover::after {
        width: 100%;
    }
}

/* Form select arrow fix */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2380467e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

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

/* Reduced motion preference */
@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;
    }
}

/* Print styles */
@media print {
    nav, #contact-form, .animate-bounce {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    .bg-plum-950, .bg-plum-50 {
        background: #fff !important;
        color: #000 !important;
    }
}
