/* Custom animations and utilities */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s ease-out;
}

/* Reveal animations for scroll — progressive enhancement, hidden by default */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }

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

/* Fallback: ensure content is visible even without JS */
@supports not (animation: fade-up 0.8s ease-out) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(16, 42, 67, 0.08);
}

.navbar-scrolled .nav-link {
    color: #102a43 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #d67d0a !important;
}

.navbar-scrolled #bar1,
.navbar-scrolled #bar2,
.navbar-scrolled #bar3 {
    background-color: #102a43 !important;
}

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

/* Mobile menu transitions */
#mobileMenu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image loading placeholder */
img {
    background-color: #f0f4f8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Selection color */
::selection {
    background-color: #f2c95c;
    color: #102a43;
}
