/* Custom styles for Teton River Ranch */

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

/* Navbar transition */
#navbar.scrolled {
    background: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #99f6e4;
    color: #042f2e;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

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

/* Fade-in animations (progressive enhancement - JS adds class) */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }

.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Only apply animations if user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .fade-in,
    .fade-in-stagger {
        opacity: 0;
        transform: translateY(24px);
    }
    .fade-in-stagger > * {
        opacity: 0;
        transform: translateY(16px);
    }
}
