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

:root {
    --terracotta-500: #E55228;
    --terracotta-600: #D63B18;
    --cream: #FDF8F0;
    --warm: #F5EDE0;
    --bark: #3D2B1F;
}

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

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--cream);
}
::-webkit-scrollbar-thumb {
    background: var(--terracotta-400);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--terracotta-600);
}

/* Selection */
::selection {
    background: rgba(229, 82, 40, 0.2);
    color: var(--bark);
}

/* 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;
    }
}

/* Scroll reveal animations — progressive enhancement, only when JS is available */
.reveal {
    opacity: 1;
    transform: none;
    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[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 43, 31, 0.08);
}

/* Hero image parallax-like subtle effect */
.hero img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Smooth focus outlines */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--terracotta-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, footer { display: none; }
    body { color: #000; background: #fff; }
    .hero { min-height: auto; padding: 2rem 0; }
}
