/* Custom styles for Mi Ranchito */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF6F0;
}
::-webkit-scrollbar-thumb {
    background: #d97070;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(253, 246, 240, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(61, 43, 31, 0.08);
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b91c1c;
    transition: width 0.3s ease;
    border-radius: 1px;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu link */
.mobile-link {
    position: relative;
    padding-left: 0;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .nav-link::after {
        display: none;
    }
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Image hover effects */
img {
    max-width: 100%;
    height: auto;
}

/* Selection color */
::selection {
    background: #f9e4e4;
    color: #7f1d1d;
}

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

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Subtle pattern overlay for cream backgrounds */
.bg-cream::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(185, 28, 28, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}
