*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Scroll reveal styles — progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.navbar-scrolled .mobile-link {
    color: #0B1D3A !important;
}

.navbar-scrolled #navbar .w-9 {
    background: #5EC094 !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #5EC094;
}

/* Selection color */
::selection {
    background: #C5EAD6;
    color: #0B1D3A;
}

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

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

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

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #E3F5EC 0%, #D0D9E8 100%);
}

/* Form select arrow */
select {
    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='%237091B0' 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 1rem center;
    appearance: none;
}

/* Subtle pattern for section backgrounds */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(11, 29, 58, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}
