/* Custom styles and overrides */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3d633d;
}

/* Selection color */
::selection {
    background: #4d7a4d;
    color: #FAF9F6;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid #4d7a4d;
    outline-offset: 2px;
}

/* Reduced 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;
    }
}

/* Animation for scroll reveals */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(42, 66, 42, 0.1);
}

/* Button hover effects */
a[href^="tel:"],
a[href^="mailto:"] {
    text-decoration: none;
}

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

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(77, 122, 77, 0.1);
}

/* Loading state for buttons */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Print styles */
@media print {
    #navbar,
    #contact-form,
    iframe {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
