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

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }

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

/* ── Hero Animations ── */
@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        opacity: 0;
        transform: translateY(25px);
        transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .hero-anim.hero-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Navbar ── */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background: rgba(10, 26, 46, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ── Menu List Items ── */
#menu .border-b {
    transition: border-color 0.3s ease;
}

#menu .border-b:hover {
    border-color: rgba(228, 184, 53, 0.3);
}

#menu div:hover .text-white {
    color: #ecce6a;
    transition: color 0.3s ease;
}

#menu div:hover .text-white\/40 {
    color: rgba(236, 206, 106, 0.5);
    transition: color 0.3s ease;
}

/* ── Form Focus States ── */
#contact-form input:focus,
#contact-form textarea:focus {
    border-bottom-color: #d4a017;
}

/* ── Custom Selection ── */
::selection {
    background: rgba(212, 160, 23, 0.2);
    color: #102a43;
}

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

/* ── Mobile Menu Animation ── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* ── Subtle Parallax on Hero ── */
#hero img {
    will-change: transform;
}

/* ── Gallery Hover ── */
#gallery .aspect-square {
    overflow: hidden;
    position: relative;
}

#gallery .aspect-square::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 26, 46, 0);
    transition: background 0.4s ease;
    pointer-events: none;
}

#gallery .aspect-square:hover::after {
    background: rgba(10, 26, 46, 0.1);
}

/* ── Utility: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
