/* Custom styles for Daniela S Cafe */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll reveal animations - progressive enhancement */
.scroll-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);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: none;
    }
    .group img {
        transition: none;
    }
}

/* Default hidden state for scroll reveals (enhanced by JS) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(42, 15, 18, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

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

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu links */
.mobile-menu-link {
    opacity: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
}

/* Image hover effects */
.group:hover img {
    transform: scale(1.05);
}

/* Button focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #ffc700;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf5f7;
}

::-webkit-scrollbar-thumb {
    background: #a8555f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8e3f4a;
}

/* Selection color */
::selection {
    background: #ffc700;
    color: #2a0f12;
}

/* Subtle pattern overlay for sections */
.bg-plum-950::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 199, 0, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Hero parallax-like effect on scroll */
#hero {
    background-attachment: fixed;
}

@media (prefers-reduced-motion: no-preference) {
    @media (min-width: 768px) {
        #hero {
            background-attachment: fixed;
        }
    }
}

/* Loading state for images */
img {
    background-color: #f5e9ed;
}

/* Card hover lift effect */
.scroll-reveal > div {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(94, 39, 46, 0.12);
}
