/* Custom styles — overrides and enhancements beyond Tailwind */

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

/* Custom selection color */
::selection {
    background-color: #548035;
    color: #FAFAF5;
}

/* Subtle gradient overlay on hero image */
.hero-img-overlay {
    position: relative;
}
.hero-img-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(34, 51, 23, 0.15));
    border-radius: 1.5rem;
    pointer-events: none;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF5;
}
::-webkit-scrollbar-thumb {
    background: #c5dbb2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9dbe7e;
}

/* FAQ active state */
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
.faq-item.active {
    border-color: #548035;
    background: #f2f7f0;
}

/* Mobile menu animations */
#mobile-menu.open {
    animation: slideIn 0.35s ease forwards;
}
@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
#mobile-menu.closing {
    animation: slideOut 0.3s ease forwards;
}
@keyframes slideOut {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Subtle floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.floating {
    animation: float 4s ease-in-out infinite;
}
.floating-delay {
    animation: float 4s ease-in-out 1s infinite;
}

/* Image aspect ratios to prevent layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion preference */
@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;
    }
    .floating, .floating-delay {
        animation: none;
    }
}
