/* ─── Base & Reset ─── */
*, *::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;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background-color: #c93e1f;
    color: #fefcf5;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf7ee;
}
::-webkit-scrollbar-thumb {
    background: #e05530;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a72e18;
}

/* ─── Navbar ─── */
#navbar {
    background: transparent;
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(167, 46, 24, 0.08);
}

.nav-brand {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.5s ease;
}

#navbar.scrolled .nav-brand {
    color: #36271a;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

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

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

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

.nav-menu-btn {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

#navbar.scrolled .nav-menu-btn {
    border-color: rgba(74, 55, 40, 0.2);
    color: #4a3728;
}

/* ─── Mobile Menu ─── */
.mobile-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
    color: #c93e1f;
    transform: translateY(-2px);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* ─── Menu Tabs ─── */
.menu-tab {
    background: transparent;
    color: #8d542b;
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    background: #e05530;
    color: #fefcf5;
    box-shadow: 0 4px 12px rgba(224, 85, 48, 0.3);
}

.menu-tab:not(.active):hover {
    background: rgba(224, 85, 48, 0.1);
}

/* ─── Animations ─── */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceSlow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.animate-fade-in {
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.9s ease forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.9s ease 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.9s ease 0.4s forwards;
    opacity: 0;
}

.animate-bounce-slow {
    animation: bounceSlow 2.5s ease-in-out infinite;
}

/* ─── Reveal on Scroll (progressive enhancement) ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Hover image effect ─── */
.rounded-2xl.overflow-hidden {
    overflow: hidden;
}

.rounded-2xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ─── Form focus rings ─── */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(224, 85, 48, 0.2);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.15;
    }
}
