/* ===================================
   Crossroads Furniture — Custom Styles
   =================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* --- Selection --- */
::selection {
    background-color: #9c1f34;
    color: #fce4e7;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f5;
}
::-webkit-scrollbar-thumb {
    background: #d93d58;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b9263d;
}

/* --- Fade In Animation --- */
.fade-in {
    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);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Stagger children --- */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.is-visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.is-visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.is-visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.is-visible > *:nth-child(6) { transition-delay: 0.3s; }

.fade-in-stagger.is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Nav Link Underline --- */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #b9263d;
    transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover::after {
    width: 100%;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

/* --- Hamburger Animation --- */
.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Mobile Link --- */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #b9263d;
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 80%;
}

/* --- Image Hover Overlay --- */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* --- Input Autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #faf8f5 inset !important;
    -webkit-text-fill-color: #2a2119 !important;
}

/* --- Focus Visible --- */
*:focus-visible {
    outline: 2px solid #b9263d;
    outline-offset: 2px;
}

/* --- Print --- */
@media print {
    header, footer, #contact-form, .fade-in {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
