/* Custom styles for Ye Wool Bakery */

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

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Navbar styles */
.nav-logo-text {
    transition: color 0.5s ease;
}

.nav-link {
    position: relative;
}

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

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

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

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.08) 0%, transparent 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.mobile-nav-link:hover::before {
    width: calc(100% - 8px);
    margin-left: 4px;
}

/* Fade-in animations for scroll reveal */
.fade-in-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Custom selection color */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #0f172a;
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll-indicator {
        animation: none;
    }
    
    .group-hover\:scale-105,
    img {
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* Scroll reveal elements - progressive enhancement via JS */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure above-the-fold content is always visible */
#hero,
#hero *,
#about,
#about * {
    opacity: 1 !important;
    visibility: visible !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
