/* ========== BASE STYLES ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy-900: #0a1628;
    --navy-800: #0f2140;
    --navy-700: #152e58;
    --navy-600: #1c3d70;
    --navy-500: #244a82;
    --navy-200: #c5d5e8;
    --navy-100: #e8eef6;
    --navy-50: #f4f7fb;
    --gold-500: #c9a84c;
    --gold-400: #d4b962;
    --gold-300: #e0ca7e;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--navy-900);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

    .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 if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========== NAVBAR SCROLL STATE ========== */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled span {
    color: var(--navy-900) !important;
}

#navbar.scrolled a:not(.bg-navy-900) {
    color: var(--navy-700) !important;
}

#navbar.scrolled a:not(.bg-navy-900):hover {
    color: var(--gold-500) !important;
}

/* ========== MOBILE MENU TRANSITIONS ========== */
#mobileMenu {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

/* ========== FORM STYLES ========== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ========== SELECTION ========== */
::selection {
    background-color: rgba(201, 168, 76, 0.2);
    color: var(--navy-900);
}

/* ========== FOCUS VISIBLE ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--navy-50);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy-500);
}
