/* Custom styles beyond Tailwind */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header scroll state */
#header.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

#header.scrolled .nav-link {
    color: #064e3b;
}

#header.scrolled .menu-line {
    background: #064e3b;
}

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

#mobileMenu.closed .mobile-link {
    animation: none;
    opacity: 0;
}

#mobileMenu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hamburger animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

.menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Selection color */
::selection {
    background: #065f46;
    color: #fefdf8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #34d399;
    outline-offset: 2px;
}

/* Hover underline animation for nav links */
.nav-link {
    position: relative;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #065f46, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle entrance animation for hero elements */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animated {
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-animated:nth-child(2) { animation-delay: 0.15s; }
.hero-animated:nth-child(3) { animation-delay: 0.3s; }
.hero-animated:nth-child(4) { animation-delay: 0.45s; }
