/* Custom styles for The RANCH HOUSE Retreat */

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

body {
    overflow-x: hidden;
}

/* Hero Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
    }
}

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

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.reveal-grid.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-grid.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-grid.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-grid.revealed > *:nth-child(4) { transition-delay: 0.4s; }

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(6, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

::-webkit-scrollbar-track {
    background: #060e1a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

/* Selection */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: #f0fdf4;
}

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

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

/* Mobile adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}
