/* ========================================
   Payless Depot — Custom Styles
   ======================================== */

/* Base / Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(74, 124, 68, 0.2);
    color: #1f341d;
}

/* ========================================
   Navbar
   ======================================== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(31, 52, 29, 0.08);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #fefdf8;
}

#navbar.scrolled .nav-logo-text {
    color: #1f341d;
}

/* ========================================
   Marquee Animation
   ======================================== */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ========================================
   Scroll Reveal (Progressive Enhancement)
   Only applies when JS is enabled AND user prefers motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays for grid items */
    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.15s; }
    .reveal:nth-child(4) { transition-delay: 0.2s; }
    .reveal:nth-child(5) { transition-delay: 0.25s; }
    .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* Default state: always visible (no-JS safe) */
.reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

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

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

.mobile-nav-link {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    padding: 0.5rem 0;
}

/* ========================================
   Smooth hover for image cards
   ======================================== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ========================================
   Focus styles for accessibility
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4a7c44;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

@media (min-width: 768px) {
    /* Subtle parallax-like effect on hero */
    #top {
        scroll-snap-align: start;
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar,
    .animate-marquee,
    #top {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
