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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── Scroll Reveal (progressive enhancement) ──────── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: content always visible if JS is disabled */
@supports not (animation-name: test) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Navbar ────────────────────────────────────────── */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

#navbar.scrolled .font-serif a {
    color: #ffffff;
}

/* ── Selection ─────────────────────────────────────── */
::selection {
    background: rgba(201, 152, 46, 0.25);
    color: #0a1628;
}

/* ── Focus ─────────────────────────────────────────── */
:focus-visible {
    outline: 1px solid #c9982e;
    outline-offset: 4px;
}

/* ── Input placeholders ────────────────────────────── */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* ── Smooth scroll offset for fixed nav ────────────── */
section[id] {
    scroll-margin-top: 80px;
}

/* ── Custom scrollbar ──────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 152, 46, 0.4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 152, 46, 0.7);
}
