/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Floating donut animations */
@media (prefers-reduced-motion: no-preference) {
    .floating-donut {
        animation: float 6s ease-in-out infinite;
        position: absolute;
    }
    
    @keyframes float {
        0%, 100% { transform: translateY(0px) rotate(0deg); }
        33% { transform: translateY(-15px) rotate(5deg); }
        66% { transform: translateY(8px) rotate(-3deg); }
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(20, 184, 166, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

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

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

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

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

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

/* Selection color */
::selection {
    background: #99f6e4;
    color: #134e4a;
}

/* Smooth image loading */
img {
    background-color: #f0fdfa;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

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

/* Card hover effects */
.reveal {
    will-change: opacity, transform;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #14B8A6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    nav, .floating-donut, #hero .absolute {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
