/* Custom styles for Jacquies Pallet Furniture */

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

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

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c47f91;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c47f91;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* Scroll reveal animations - below the fold only */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reveal.revealed {
        opacity: 1;
        transform: none;
    }
    img:hover {
        transform: none;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c47f91;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #dbafba;
    color: #2b0f17;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf5f7;
}

::-webkit-scrollbar-thumb {
    background: #dbafba;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c47f91;
}

/* Image loading placeholder */
img {
    background-color: #f5e9ed;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

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

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

/* Fade in animation for form success */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#form-success.show {
    animation: fadeIn 0.4s ease forwards;
}

/* Subtle parallax-like effect for hero */
#hero {
    background-attachment: fixed;
}

@media (prefers-reduced-motion: reduce) {
    #hero {
        background-attachment: scroll;
    }
}
