/* ============================================
   D'Lolly's Uptown Bakeshop — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(13, 79, 79, 0.15);
    color: #0d4f4f;
}

img {
    display: block;
    max-width: 100%;
}

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

.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; }

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
}

/* --- Navbar transitions --- */
#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

#navbar.scrolled #nav-logo-text {
    color: #ffffff !important;
}

#navbar.scrolled .bg-white-logo #nav-logo-text {
    color: #0d4f4f !important;
}

/* --- Mobile menu active state --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

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

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

/* --- Hamburger animation --- */
.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Focus styles --- */
input:focus,
select:focus,
textarea:focus,
button:focus,
a:focus {
    outline: none;
}

/* --- Subtle image zoom on scroll --- */
@media (prefers-reduced-motion: no-preference) {
    .group img {
        will-change: transform;
    }
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f7f8f9;
}
::-webkit-scrollbar-thumb {
    background: #b8c3ce;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8a96a5;
}
