/* Custom styles for Trostle's Dairy & Poultry Farm */

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

/* Scroll reveal base states — content is always visible by default */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only animate when JS adds the visible class (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

/* Navigation scroll state */
#site-header.scrolled {
    background: rgba(42, 20, 48, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Nav links underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D4A017;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

/* Button hover lift */
a[href^="tel:"],
button[type="submit"] {
    will-change: transform;
}

/* Subtle pattern overlay for sections */
section::before {
    content: '';
    pointer-events: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #703060;
}

/* Selection color */
::selection {
    background: #D4A017;
    color: #2a1430;
}

/* Image loading placeholder */
img {
    background-color: #ece0ee;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 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;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    #site-header,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}
