/* === Base & Utilities === */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #e05330;
    color: #fefdf8;
}

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

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

/* Fallback: ensure content is visible even without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* === Navbar === */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-serif {
    color: #1e1d1a !important;
}

#navbar.scrolled .text-stone-500 {
    color: #9e9584 !important;
}

/* === Mobile menu === */
#mobile-menu {
    animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ec;
}
::-webkit-scrollbar-thumb {
    background: #d8d3c7;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #bab3a3;
}

/* === Focus styles === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #e05330;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* === Print styles === */
@media print {
    #navbar, #contact-form, .scroll-reveal { display: none; }
    body { color: #000; background: #fff; }
}
