/* ─── Base & Typography ─── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #ebad96;
    color: #2e1913;
}

/* ─── Navbar ─── */
#navbar {
    background: rgba(254, 252, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(196, 120, 90, 0.08);
    transition: box-shadow 0.4s ease, background 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 252, 248, 0.96);
    box-shadow: 0 1px 20px rgba(46, 25, 19, 0.07);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c4785a;
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

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

.mobile-link {
    position: relative;
}

/* ─── Scroll Reveal ─── */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .group:hover img,
    .group-hover\:scale-110 {
        transform: none;
    }
}

/* ─── Form ─── */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(196, 120, 90, 0.15);
}

/* ─── Smooth image loading ─── */
img {
    image-rendering: auto;
    loading: lazy;
}

/* ─── Subtle animations ─── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #c4785a;
}
