/* Base & Utilities */
*, *::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(232, 106, 51, 0.2);
    color: #3d2416;
}

/* Scroll Reveal - Progressive Enhancement */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal.revealed:nth-child(2) { transition-delay: 0.08s; }
    .scroll-reveal.revealed:nth-child(3) { transition-delay: 0.16s; }
    .scroll-reveal.revealed:nth-child(4) { transition-delay: 0.24s; }
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(254, 250, 243, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(61, 36, 22, 0.08);
}

.nav-scrolled .nav-logo-text {
    color: #3d2416 !important;
}

.nav-scrolled a:not(.inline-flex) {
    color: #3d2416 !important;
    opacity: 0.7;
}

.nav-scrolled a:not(.inline-flex):hover {
    opacity: 1;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

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

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

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

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

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

/* Select dropdown arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c3a24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
