/* ============================================
   NECTAR AVENUE — Custom Styles
   Premium Dark Luxury Bakery & Grocer
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #070e14;
    color: #e8e6e1;
    font-family: 'Montserrat', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #070e14;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

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

#navbar.scrolled {
    background: rgba(7, 14, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Scroll Animations (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Scroll Line Animation ---------- */
@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scrollLine {
    animation: scrollLine 1.8s ease-in-out infinite;
}

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

#mobileMenu.close {
    opacity: 0;
    pointer-events: none;
}

/* ---------- Mobile Menu Lines ---------- */
.menu-line {
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#menuToggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuToggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuToggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 24px;
}

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

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.18s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.26s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.34s; }

/* ---------- Image Shimmer Loading ---------- */
img {
    background: linear-gradient(110deg, #0f1923 8%, #131f2b 18%, #0f1923 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

img[src], img.loaded {
    animation: none;
    background: none;
}

/* ---------- Focus Styles ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(201, 168, 76, 0.6);
    outline-offset: 3px;
}

/* ---------- Subtle Gold Glow on Cards ---------- */
.reveal:hover {
    filter: none;
}

/* ---------- Print ---------- */
@media print {
    body { background: #fff; color: #000; }
    #navbar, #backToTop { display: none; }
}
