/* Bina's Cafe — Custom Styles */

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

html {
    scroll-behavior: smooth;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0540;
}
::-webkit-scrollbar-thumb {
    background: #4c1d95;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7e22ce;
}

/* Selection */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #faf5ff;
}

/* Nav transition */
#navbar.scrolled {
    background: rgba(26, 5, 64, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(76, 29, 149, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile link hover */
.mobile-link {
    display: block;
    border-bottom: 1px solid rgba(76, 29, 149, 0.2);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.7s 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; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}
img[loading="lazy"] {
    opacity: 0;
}
img[loading="lazy"].loaded {
    opacity: 1;
}
