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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Smooth scroll for anchor links */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Navbar transition states */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(11, 31, 63, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 1;
}

/* Scroll reveal - progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7ED4C1;
}

/* Selection color */
::selection {
    background: #BCEAD9;
    color: #0B1F3F;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7ED4C1;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

/* Glass effect for navbar */
#navbar.scrolled .group {
    filter: none;
}

/* Ensure text contrast in hero */
#hero h1,
#hero p,
#hero a {
    position: relative;
    z-index: 1;
}

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

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
