*, *::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;
}

::selection {
    background-color: #1a3c28;
    color: #faf8f4;
}

/* Scroll Reveal Animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.is-visible:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll.is-visible:nth-child(3) { transition-delay: 0.2s; }
.reveal-on-scroll.is-visible:nth-child(4) { transition-delay: 0.3s; }

/* Navbar transition */
#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 60, 40, 0.08);
}

#navbar.scrolled .nav-link-text {
    color: #1a3c28;
}

#navbar.scrolled .menu-line {
    background-color: #1a3c28;
}

/* Section eyebrow */
.section-eyebrow {
    letter-spacing: 0.35em;
}

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: forwards;
}

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

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

.mobile-nav-link {
    position: relative;
}

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

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

/* Mobile menu button animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Image hover effects */
img {
    display: block;
    max-width: 100%;
}

/* Smooth focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #c9a66b;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Subtle pattern overlay for sections */
.bg-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(26, 60, 40, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Menu hover effects */
#menu .border-b {
    transition: border-color 0.3s ease;
}

#menu .border-b:hover {
    border-color: rgba(201, 166, 107, 0.3);
}

#menu .font-serif.text-lg {
    transition: color 0.3s ease;
}

#menu .border-b:hover .font-serif.text-lg {
    color: #c9a66b;
}

/* Gallery hover */
#gallery .overflow-hidden {
    position: relative;
}

#gallery .overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 26, 17, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

#gallery .overflow-hidden:hover::after {
    opacity: 1;
}

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

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .reveal-on-scroll {
        transform: translateY(24px);
    }
}

/* Print styles */
@media print {
    #navbar, .scroll-indicator, #mobile-menu-btn {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
