/* ============================================
   SWANN STREET BAKERY & MARKET — STYLES
   Premium Dark Luxury Theme
   Colors: Emerald Green + Cream + Gold
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #060a08;
    color: #fdf9ed;
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060a08;
}
::-webkit-scrollbar-thumb {
    background: #064e3b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4a853;
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #fdf9ed;
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* Hidden state for scroll-reveal — applied by JS only */
.reveal.is-hidden {
    opacity: 0;
    transform: translateY(40px);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .reveal.is-hidden {
        opacity: 0;
        transform: translateY(40px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal.is-hidden {
        opacity: 1;
        transform: none;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(6, 10, 8, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

#navbar.scrolled .menu-line {
    background: #d4a853;
}

/* ---------- Mobile Menu ---------- */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* ---------- Mobile Menu Button ---------- */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 6px;
}

/* ---------- Gold Accent Line Animation ---------- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.gold-shimmer {
    background: linear-gradient(90deg, #d4a853, #e8c876, #d4a853);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ---------- Button Hover Glow ---------- */
button:hover, a:hover {
    /* handled via Tailwind utilities */
}

/* ---------- Image Aspect Ratios ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Focus Styles ---------- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ---------- Smooth Section Transitions ---------- */
section {
    position: relative;
}

/* ---------- Hero Image Parallax (subtle) ---------- */
#hero img {
    will-change: transform;
}

/* ---------- Card Hover Effects ---------- */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* ---------- Gold Gradient Text Utility ---------- */
.text-gold-gradient {
    background: linear-gradient(135deg, #e8c876 0%, #d4a853 50%, #c49a3c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Subtle Grain Texture Overlay ---------- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---------- Product Card Shine Effect ---------- */
.relative.rounded-2xl::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transition: left 0.7s ease;
    pointer-events: none;
    border-radius: inherit;
}

.relative.rounded-2xl:hover::after {
    left: 150%;
}
