/* Base & Utilities */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #064e3b;
    color: #fff;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #064e3b;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navbar styles */
#navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#navbar:not(.scrolled) .nav-link {
    color: #1f2937;
}

/* Mobile menu */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
}

.mobile-menu.open .mobile-nav-link {
    animation: fadeInUp 0.4s ease forwards;
}

.mobile-menu.open .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.open .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.open .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.open .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu.open .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu.open .mobile-nav-link:nth-child(6) { animation-delay: 0.3s; }

/* Mobile menu button animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Image hover effects */
.rounded-2xl.overflow-hidden img,
.rounded-3xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button hover effects */
.rounded-full.bg-emerald-800 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rounded-full.bg-emerald-800:hover {
    transform: translateY(-2px);
}

/* Card hover effects */
.rounded-3xl {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rounded-3xl:hover {
    transform: translateY(-4px);
}

/* Floating card animation */
.absolute.-bottom-6.-left-6 {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Decorative circle animations */
.absolute.rounded-full.blur-3xl {
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Menu item hover */
.space-y-5 > div:hover {
    transform: translateX(4px);
    transition: transform 0.3s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .absolute.-bottom-6.-left-6 {
        display: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    .absolute {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}
