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

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

body {
    overflow-x: hidden;
}

::selection {
    background: #1B4332;
    color: #FDFCF8;
}

/* ── Navbar ───────────────────────────────────────────────────── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

.nav-logo-text {
    color: #FDFCF8;
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #1B4332;
}

.nav-link {
    color: rgba(253, 252, 248, 0.8);
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-link {
    color: #4a6b5a;
}

#navbar.scrolled .nav-link:hover {
    color: #1B4332;
}

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

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

.hamburger-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .hamburger-line:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
    width: 5px;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Floating Cards ───────────────────────────────────────────── */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-coffee {
    animation-delay: 0s;
}

.card-bar {
    animation-delay: -2s;
}

.card-community {
    animation-delay: -4s;
}

.card-location {
    animation-delay: -1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ── Scroll Reveal Animations ─────────────────────────────────── */
.about-reveal,
.menu-reveal,
.menu-card-reveal,
.gallery-img-reveal,
.visit-reveal,
.contact-reveal,
.contact-form-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .about-reveal,
    .menu-reveal,
    .menu-card-reveal,
    .gallery-img-reveal,
    .visit-reveal,
    .contact-reveal,
    .contact-form-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .about-reveal.revealed,
    .menu-reveal.revealed,
    .menu-card-reveal.revealed,
    .gallery-img-reveal.revealed,
    .visit-reveal.revealed,
    .contact-reveal.revealed,
    .contact-form-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .menu-card-reveal:nth-child(2) {
        transition-delay: 0.15s;
    }

    .gallery-img-reveal:nth-child(2) { transition-delay: 0.05s; }
    .gallery-img-reveal:nth-child(3) { transition-delay: 0.1s; }
    .gallery-img-reveal:nth-child(4) { transition-delay: 0.15s; }
    .gallery-img-reveal:nth-child(5) { transition-delay: 0.2s; }
}

/* ── Button Focus States ──────────────────────────────────────── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

/* ── Smooth Image Loading ─────────────────────────────────────── */
img {
    background-color: #dce8e0;
}

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

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

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

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