/* Custom styles beyond Tailwind */

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

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll reveal - progressive enhancement, only active with JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Hero is always visible - no reveal animation */
#hero {
    opacity: 1 !important;
}

/* Tree card hover effect */
.tree-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tree-card:hover {
    transform: translateY(-4px);
}

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060D1A;
}
::-webkit-scrollbar-thumb {
    background: #1A3F6E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #21508A;
}

/* Selection color */
::selection {
    background: rgba(42, 166, 106, 0.3);
    color: #D8F5E8;
}

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

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

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

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #7ED5AA;
    outline-offset: 2px;
}

/* Button ripple effect on focus */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #7ED5AA;
    outline-offset: 2px;
}
