/* ── Base & Typography ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
}

::selection {
    background-color: #C0523A;
    color: #ffffff;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .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);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Fallback: always visible when JS is disabled */
.no-js .reveal,
:not(.js-enabled) .reveal {
    opacity: 1;
    transform: none;
}

/* ── Navbar ── */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.92);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Mobile Menu ── */
#mobile-menu {
    z-index: 50;
}

.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ── Image Hover Effects ── */
img {
    max-width: 100%;
    height: auto;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #C0523A;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Smooth Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

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

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