/* ============================================
   BOZA CAFÉ – Botanical Coffee House Theme
   ============================================ */

:root {
    --coffee: #4B3621;
    --beige: #F5F5DC;
    --off-white: #FAF9F6;
    --caramel: #C68E17;
    --sage: #6B8F71;
    --forest: #3A5A40;
    --mint: #E8F0E4;
}

/* ── Base ── */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(107, 143, 113, 0.15);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Fredoka', sans-serif;
    color: var(--coffee);
    background-color: var(--off-white);
    font-size: 16px;
    line-height: 1.6;
}

/* ── Fix leaf clipping: allow Y overflow, clip X only ──
   body already has overflow-x-hidden via Tailwind,
   so sections only need to clip horizontally. */

section {
    overflow-x: clip;
    overflow-y: visible;
}

/* ── Navigation ── */

#main-nav {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: transparent;
    transition: backdrop-filter 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

#main-nav.scrolled {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(250, 249, 246, 0.85);
    box-shadow: 0 1px 24px rgba(75, 54, 33, 0.06);
}

#main-nav.scrolled .nav-link {
    color: var(--coffee);
}

/* Dark nav variant for pages with dark backgrounds (e.g. menu) */
body.bg-coffee #main-nav.scrolled {
    background: rgba(75, 54, 33, 0.9);
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.15);
}

body.bg-coffee #main-nav.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

/* ── Leaf Floating Animation ── */

.leaf-float {
    animation: leafFloat 7s ease-in-out infinite;
    pointer-events: none;
}

@keyframes leafFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-16px) rotate(-1.5deg); }
    75% { transform: translateY(-6px) rotate(1deg); }
}

/* Background leaf drift (from components.js) */
@keyframes leafDrift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(3deg); }
    50% { transform: translateY(-18px) rotate(-2deg); }
    75% { transform: translateY(-8px) rotate(1deg); }
}

/* ── Global card / box shadows ── */

.about-card,
.info-block .bg-white,
.info-block .bg-white\/70,
[class*="rounded-2xl"][class*="border"],
[class*="rounded-3xl"][class*="border"] {
    box-shadow: 0 2px 12px rgba(75, 54, 33, 0.04), 0 1px 3px rgba(75, 54, 33, 0.03);
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease;
}

/* Glassmorphism panels & dark cards get a subtler shadow */
[class*="backdrop-blur"],
.bg-forest[class*="rounded"],
.bg-coffee[class*="rounded"] {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ── Menu Cards ── */

.menu-card {
    cursor: default;
    min-height: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.menu-card:active {
    transform: scale(0.97);
}

@media (min-width: 768px) {
    .menu-card {
        min-height: 110px;
    }

    .menu-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    }
}

/* ── Gallery ── */

.gallery-img {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-wrapper {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    transition: box-shadow 0.4s ease, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 768px) {
    .gallery-img:hover {
        transform: scale(1.04);
    }

    .gallery-wrapper:hover {
        z-index: 20;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    }
}

/* ── Marquee ── */

.marquee-container {
    animation: marquee 35s linear infinite;
    user-select: none;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Wave dividers - clip X to prevent horizontal bleed ── */

.relative.-mt-px {
    overflow-x: clip;
    overflow-y: visible;
}

/* ── Scrollbar ── */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--sage);
    border: 3px solid var(--off-white);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--forest);
}

/* ── Mobile Menu ── */

#mobile-menu:not(.hidden) {
    animation: mobileMenuIn 0.25s ease-out forwards;
}

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

.mobile-menu-inner {
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Mobile Responsiveness ── */

@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    /* Touch targets */
    a:not(.no-min-height), button {
        min-height: 44px;
    }

    /* Smooth scroll sections */
    section {
        scroll-margin-top: 64px;
    }

    /* Hero viewport fix */
    .hero-section {
        min-height: 100svh;
        min-height: -webkit-fill-available;
    }

    /* Gentler leaf animations on mobile */
    .leaf-float {
        animation-duration: 9s !important;
    }

    /* Better text on mobile */
    h1, h2, h3 {
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }

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

    /* Touch feedback on interactive elements */
    .menu-card, .gallery-wrapper {
        -webkit-user-select: none;
        user-select: none;
        touch-action: manipulation;
    }
}

/* ── Performance ── */

.leaf-float,
.gallery-img,
.hero-logo,
.menu-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ── About Cards Visibility Fallback ── */

.about-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease;
}

/* ── Selection Color ── */

::selection {
    background: rgba(107, 143, 113, 0.3);
    color: var(--coffee);
}

::-moz-selection {
    background: rgba(107, 143, 113, 0.3);
    color: var(--coffee);
}
