/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Scroll reveal — progressive enhancement, only active when JS runs and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .scroll-reveal.revealed {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .scroll-reveal.revealed.animated {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible even without JS */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .no-js .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 35, 66, 0.06);
}

.nav-scrolled .nav-text {
    color: #0A2342 !important;
}

.nav-scrolled .nav-link {
    color: #0A2342 !important;
}

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

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

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

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

/* Selection color */
::selection {
    background: #D1EDE6;
    color: #0A2342;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Button focus states */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #2A9D8F;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* Form input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #F9F3E8 inset !important;
    -webkit-text-fill-color: #0A2342 !important;
    caret-color: #0A2342;
}
