/* ========== BASE OVERRIDES ========== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(224, 82, 46, 0.2);
    color: inherit;
}

/* ========== NAV SCROLL STATE ========== */
#site-header.scrolled {
    background: rgba(42, 26, 18, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

#site-header.scrolled #logo-text {
    color: #fff;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

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

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #f49e82;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* ========== FORM FOCUS ========== */
input:focus,
textarea:focus {
    outline: none;
}

/* ========== SMOOTH SCROLL OFFSET ========== */
section[id] {
    scroll-margin-top: 80px;
}

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

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

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

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

/* ========== IMAGE LOADING ========== */
img {
    background-color: #f3e8cc;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-up, .reveal-left, .reveal-right, .reveal-fade {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========== PRINT ========== */
@media print {
    #site-header,
    #mobile-menu,
    .reveal-up, .reveal-left, .reveal-right, .reveal-fade {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
}
