/* Base styles and custom properties */
:root {
    --color-navy-900: #1e3a5f;
    --color-navy-950: #0a1220;
    --color-gold-400: #fbbf24;
    --color-gold-500: #f59e0b;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Scroll reveal — progressive enhancement, visible by default */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .js-enabled .scroll-reveal:nth-child(2) { transition-delay: 100ms; }
    .js-enabled .scroll-reveal:nth-child(3) { transition-delay: 200ms; }
    .js-enabled .scroll-reveal:nth-child(4) { transition-delay: 300ms; }
    .js-enabled .scroll-reveal:nth-child(5) { transition-delay: 400ms; }
    .js-enabled .scroll-reveal:nth-child(6) { transition-delay: 500ms; }
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(30, 58, 95, 0.08);
}

.nav-scrolled #navbar {
    background: transparent;
}

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #1e3a5f;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.open {
    max-height: 400px;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

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