/* ── Reset & Base ── */
*, *::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;
}

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

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

.animate-fade-up {
    animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Navbar ── */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(8, 19, 44, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ── Mobile Menu ── */
#mobile-menu {
    animation: menuIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes menuIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-link {
    transition: color 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2d5197;
}

/* ── Selection ── */
::selection {
    background: rgba(232, 165, 16, 0.3);
    color: #f0f3f9;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
}

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