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

body {
    overflow-x: hidden;
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #3e3e52;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e07a5f;
}

/* Navbar Scroll State */
#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
#mobile-menu.open {
    max-height: 400px;
}

/* Selection Color */
::selection {
    background: #e07a5f;
    color: #fff;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #e07a5f;
    outline-offset: 2px;
}

/* Form Select 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='%2378788c' 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;
    appearance: none;
    -webkit-appearance: none;
}

/* Image Loading */
img {
    image-rendering: auto;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
