*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal — progressive enhancement, only when JS runs */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Nav scroll state */
#nav.scrolled {
    background: rgba(20, 20, 24, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile link focus */
.mobile-link:focus-visible {
    outline: 2px solid #B85342;
    outline-offset: -2px;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: #B85342;
    color: white;
}
