/* ========================================
   Darren Pluim — Real Estate Website
   Burgundy & Blush · Warm & Friendly
======================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Nav ---------- */
#nav {
    transition: box-shadow 0.3s ease;
}

#nav.scrolled {
    box-shadow: 0 4px 24px rgba(123, 45, 59, 0.1);
}

.nav-link {
    position: relative;
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

#mobile-menu.open {
    display: block;
}

#mobile-menu.hidden {
    display: none;
}

/* ---------- FAQ ---------- */
.faq-item {
    background: white;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item.open .faq-content {
    max-height: 300px;
    padding-top: 0;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* ---------- Form ---------- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B2D3B' 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 12px center;
    padding-right: 40px;
}

/* ---------- Reduced Motion ---------- */
@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 {
        opacity: 1 !important;
        transform: none !important;
    }

    .animate-bounce {
        animation: none !important;
    }
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(123, 45, 59, 0.2);
    color: #4d1b23;
}
