*, *::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(212, 74, 30, 0.3);
    color: #fdfaf5;
}

::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* Scroll reveal — progressive enhancement, only applied via JS */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu transitions */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

/* Nav scroll state */
#nav.scrolled {
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 74, 30, 0.15);
}

/* Button ripple on focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #d44a1e;
    outline-offset: 2px;
}

/* Subtle gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #d44a1e 0%, #e56b3e 50%, #cf9a4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
