/* ============================================
   Lola's Cafe — Custom Styles
   ============================================ */

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

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

/* Selection */
::selection {
    background-color: rgba(4, 120, 87, 0.2);
    color: #064E3B;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(251, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.08);
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease 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 */
body.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

body.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ============================================
   Menu Tabs
   ============================================ */
.menu-tab {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(167, 243, 208, 0.6);
    transition: all 0.3s ease;
}

.menu-tab.active {
    background: rgba(251, 249, 246, 0.15);
    color: #FBF9F6;
}

.menu-tab:hover:not(.active) {
    color: rgba(251, 249, 246, 0.9);
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only apply animation on devices that support it and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Floating cards animation
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card-delay {
    animation: float 6s ease-in-out 3s infinite;
}

/* ============================================
   Image hover effects
   ============================================ */
.rounded-2xl.overflow-hidden {
    overflow: hidden;
}

.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Input focus styles
   ============================================ */
input:focus,
textarea:focus {
    border-image: linear-gradient(to right, #047857, #059669) 1;
}

input:focus + label,
textarea:focus + label {
    color: #047857;
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(4, 120, 87, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(4, 120, 87, 0.4);
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar,
    #contact,
    .reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
