/* Custom styles for Mastel Farm */

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Custom selection color */
::selection {
    background: #0d9488;
    color: white;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s 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: 0s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.fade-in-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }
.fade-in-stagger.visible > *:nth-child(8) { transition-delay: 0.56s; }

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

/* Image hover zoom container */
img {
    display: block;
}

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

/* Remove default focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fade-in,
    .fade-in-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    img,
    .group:hover img {
        transform: none;
        transition: none;
    }
    
    a, button {
        transition: none;
    }
}
