/* ========================================
   Homewood Customs — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(168, 23, 62, 0.2);
    color: #40081a;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f5;
}
::-webkit-scrollbar-thumb {
    background: #f9cdd8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f4a0b8;
}

/* ========================================
   Navigation
   ======================================== */
.nav-scrolled {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-link {
    position: relative;
}

/* ========================================
   Reveal Animations
   (progressive enhancement — JS adds class)
   ======================================== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-active .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger children */
.js-active .reveal:nth-child(1) { transition-delay: 0.05s; }
.js-active .reveal:nth-child(2) { transition-delay: 0.12s; }
.js-active .reveal:nth-child(3) { transition-delay: 0.19s; }
.js-active .reveal:nth-child(4) { transition-delay: 0.26s; }
.js-active .reveal:nth-child(5) { transition-delay: 0.33s; }
.js-active .reveal:nth-child(6) { transition-delay: 0.40s; }

/* ========================================
   FAQ Accordion
   ======================================== */
.faq-btn {
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.faq-btn:hover .faq-icon {
    transform: rotate(180deg);
}

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

.faq-content.open {
    max-height: 300px;
}

/* ========================================
   Form Styles
   ======================================== */
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='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8173e' stroke-width='2.5' 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 1rem center;
    padding-right: 2.5rem;
}

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

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

#mobile-menu.closing {
    animation: slideUp 0.25s ease forwards;
}

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

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

/* ========================================
   Focus visible for keyboard nav
   ======================================== */
:focus-visible {
    outline: 2px solid #a8173e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Utility: smooth hover transitions
   ======================================== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    header, footer, #back-to-top, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    a {
        color: #000;
    }
}
