/* Custom styles for A-1 Eagle Awning */

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

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

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

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

/* Staggered delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(31, 53, 31, 0.08);
}

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

#navbar.scrolled .nav-link::after {
    background-color: #2f542f;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

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

/* Selection color */
::selection {
    background-color: #2f542f;
    color: #fefdf8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9dc49d;
}

/* Image loading placeholder */
img {
    background-color: #e3efe3;
}

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

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.2;
    }
}
