/* === Base & Utilities === */
*, *::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: rgba(232, 93, 46, 0.2);
    color: inherit;
}

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

.hero-anim {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

/* === Scroll Reveal (progressive enhancement) === */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

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

/* Fallback: ensure content is visible without JS */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

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

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

#navbar.scrolled {
    background: rgba(253, 249, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(200, 140, 100, 0.15);
}

#navbar.scrolled .font-serif {
    color: #b53219;
}

#navbar.scrolled a.text-gray-600 {
    color: #4b5563;
}

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

#mobile-menu.open #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu.open #bar2 {
    opacity: 0;
}

#mobile-menu.open #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* === Smooth image loading === */
img {
    display: block;
}

/* === Focus styles === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #e85d2e;
    outline-offset: 3px;
    border-radius: 4px;
}

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

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

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

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