/* ─── Base & Reset ─── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

/* ─── Hero Animations ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

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

/* ─── Fallback: visible when JS is disabled or reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ─── Navbar scroll state ─── */
#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 .fixed a,
#navbar.scrolled button {
    color: white;
}

/* ─── Selection ─── */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #0f2140;
}

/* ─── Focus styles ─── */
input:focus, textarea:focus, button:focus, a:focus {
    outline: 2px solid #c9a84c;
    outline-offset: 2px;
}

/* ─── Smooth image loading ─── */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ─── Mobile menu transition ─── */
#mobile-menu {
    animation: slideDown 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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