*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(196, 65, 35, 0.15);
    color: #1C1917;
}

/* Scroll reveal animations */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* Thin scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #e17957;
    border-radius: 3px;
}

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

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(253, 249, 240, 0.95) !important;
    box-shadow: 0 1px 0 rgba(212, 87, 51, 0.08);
}

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

/* Image loading placeholder */
img {
    background-color: #f5d0c2;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.open {
    max-height: 400px;
}

/* Subtle line decorations */
.divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, #e17957, transparent);
}

/* Hover underline animation for links */
.hover-underline {
    position: relative;
}

.hover-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #c44123;
    transition: width 0.3s ease;
}

.hover-underline:hover::after {
    width: 100%;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .reveal-up {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
