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

body {
    overflow-x: hidden;
}

::selection {
    background: #B85C38;
    color: #FDFBF7;
}

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

#navbar.scrolled {
    background: rgba(42, 36, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

.nav-link {
    position: relative;
}

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

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

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

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

#navbar.scrolled .nav-link::after {
    background: #E0A87C;
}

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

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

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

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

.floating-card:nth-child(1) {
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -3s;
}

.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

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

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

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

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

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

::-webkit-scrollbar-track {
    background: #2A241E;
}

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

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

/* ─── Reduced 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;
    }
    
    .floating-card {
        animation: none;
    }
}

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