/* Base styles and custom properties */
:root {
    --emerald-50: #f2fdf4;
    --emerald-100: #e1f7e7;
    --emerald-500: #38a865;
    --emerald-600: #238449;
    --emerald-700: #176b3b;
    --emerald-950: #052414;
    --cream-50: #fdfcfa;
    --cream-100: #fef9f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Nunito', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

::-webkit-scrollbar-track {
    background: var(--cream-50);
}

::-webkit-scrollbar-thumb {
    background: var(--emerald-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--emerald-400);
}

/* Selection color */
::selection {
    background: var(--emerald-200);
    color: var(--emerald-950);
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(35, 132, 73, 0.08);
}

#navbar.scrolled .nav-link {
    color: #374151;
}

#navbar.scrolled .nav-link:hover {
    color: var(--emerald-600);
}

#navbar.scrolled .logo-text {
    color: var(--emerald-800);
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Staggered scroll reveal */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-800 { animation-delay: 0.8s; }

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

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

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

/* Focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, var(--cream-100) 0%, var(--emerald-50) 100%);
}

/* Print styles */
@media print {
    #navbar, #mobile-menu-btn, .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
