/* Custom styles for Rm Pallets */

html {
    scroll-behavior: smooth;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection color */
::selection {
    background: #059669;
    color: #f5f5f0;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(245, 245, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Fade-in animations for scroll sections */
.fade-in-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stagger children animation */
.fade-in-section .stagger-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

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

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.3s ease-in;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in-section,
    .fade-in-section .stagger-child,
    #mobile-menu {
        transition: none;
        opacity: 1;
        transform: none;
    }
    .stagger-child {
        opacity: 1;
        transform: none;
    }
    img:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    nav, #contact-form, button { display: none; }
    body { background: white; }
    section { padding: 20px 0; }
}
