/* ===== Base & Typography ===== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #c47d52;
    color: #faf6f3;
}

/* ===== Hero Animations ===== */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 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; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scroll Reveal ===== */
.reveal {
    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.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== Service Cards ===== */
.service-card {
    cursor: pointer;
}

.service-card img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Gallery Items ===== */
.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Navbar ===== */
#site-header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#site-header.scrolled {
    background-color: rgba(253, 252, 249, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 43, 31, 0.08);
}

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

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

/* ===== Custom Select ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d703d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ===== Smooth Image Loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #c47d52;
    outline-offset: 2px;
}

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

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

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

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