/* ============================================
   SIP N SABOR — Custom Styles
   Premium Dark Luxury Bakery & Grocery
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(201, 168, 108, 0.3);
    color: #E8D5C0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0F0A06;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 108, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 108, 0.5);
}

/* ---- Hero Animations ---- */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: heroFadeUp 1s ease-out forwards;
}

.hero-img {
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
}

/* ---- Navbar ---- */
#navbar.scrolled {
    background: rgba(15, 10, 6, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 108, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

/* ---- Mobile Menu ---- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ---- Menu Button Animation ---- */
#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* ---- Reveal Animations (progressive enhancement) ---- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* ---- Fallback: ensure content is visible without JS ---- */
@supports not (animation-name: heroFadeUp) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* ---- Card Hover Effects ---- */
.group img {
    will-change: transform;
}

/* ---- Button Focus States ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(201, 168, 108, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Image Aspect Ratio Fallbacks ---- */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* ---- Gold Shimmer Effect ---- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ---- Subtle Glow on Interactive Elements ---- */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* ---- Print Styles ---- */
@media print {
    #navbar,
    #mobile-menu,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
