/* ===== CUSTOM STYLES ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fafaf5;
}
::-webkit-scrollbar-thumb {
    background: #d4a06a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c0603a;
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}
.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal on scroll — default visible, JS adds hidden state */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is loaded, we add .js-reveal-hidden to start hidden */
.js-loaded .reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

/* Reveal state (added by JS) */
.js-loaded .reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.js-loaded .reveal-on-scroll:nth-child(1) { transition-delay: 0ms; }
.js-loaded .reveal-on-scroll:nth-child(2) { transition-delay: 100ms; }
.js-loaded .reveal-on-scroll:nth-child(3) { transition-delay: 200ms; }
.js-loaded .reveal-on-scroll:nth-child(4) { transition-delay: 300ms; }

/* Header scroll state */
#site-header.scrolled {
    background: rgba(254, 252, 248, 0.95);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

#site-header.scrolled .font-display {
    color: #1c1917;
}

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

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .animate-scroll-indicator {
        animation: none;
    }
    .group img {
        transition: none !important;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #C0603A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #f6c4b4;
    color: #5e2d1e;
}
