/* ========================================
   Vivi's Cakes and Candy — Custom Styles
   Classic & Elegant · Plum + Amber
======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #732e49;
    color: #faf8f5;
}

/* --- Smooth Scroll Offset for Fixed Nav --- */
section[id] {
    scroll-margin-top: 80px;
}

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

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(115, 46, 73, 0.08);
}

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

#navbar.scrolled .font-serif,
#navbar.scrolled .font-sans {
    color: #1a1412;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* --- Hamburger Animation --- */
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* --- Scroll Reveal (progressive enhancement) --- */
@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);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* --- Gallery Hover --- */
.rounded-xl overflow-hidden img {
    display: block;
}

/* --- Custom Select Styling --- */
select option {
    background-color: #4a1e30;
    color: #faf8f5;
}

/* --- Form Input Focus --- */
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.6);
}

/* --- Image Loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* --- Subtle Hover on Cards --- */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.05);
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobileMenu,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
