/* ===== Custom Styles for Noel's Home Decor & Gift Shop ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Hero Animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal — progressive enhancement: content is visible by default, JS adds the animation class */
.scroll-reveal {
    /* Default: visible */
}

.scroll-reveal.revealed {
    animation: revealIn 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes revealIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(253, 244, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(106, 31, 66, 0.08);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d44d8c, #f59e0b);
    border-radius: 4px;
}

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

/* Selection color */
::selection {
    background: #f9d0e1;
    color: #6a1f42;
}

/* Image placeholder fallback */
img {
    max-width: 100%;
    height: auto;
}

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

/* ===== Responsive Adjustments ===== */

/* Mobile (below 640px) */
@media (max-width: 639px) {
    .hero-anim {
        transform: translateY(20px);
    }
    
    @keyframes heroFadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Large screens */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
