/* Custom styles for Tylertown Donuts & Kolaches */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Marquee animation */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Hero shapes animation */
.hero-shape-1 {
    animation: float1 8s ease-in-out infinite;
}

.hero-shape-2 {
    animation: float2 10s ease-in-out infinite;
}

.hero-shape-3 {
    animation: float3 6s ease-in-out infinite;
}

.hero-shape-4 {
    animation: float4 7s ease-in-out infinite;
}

.hero-shape-5 {
    animation: float5 9s ease-in-out infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 20px) scale(1.05); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(15px, -15px) scale(1.03); }
}

@keyframes float3 {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(50deg) translate(10px, -10px); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, 10px); }
}

@keyframes float5 {
    0%, 100% { transform: rotate(12deg) translate(0, 0); }
    50% { transform: rotate(20deg) translate(8px, -8px); }
}

/* Navbar styles */
#navbar.scrolled {
    background: rgba(253, 246, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(140, 37, 37, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 1;
}

#mobile-menu .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu .mobile-link:nth-child(2) { animation-delay: 0.2s; }
#mobile-menu .mobile-link:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu line animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.4rem;
}

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-shape-1,
    .hero-shape-2,
    .hero-shape-3,
    .hero-shape-4,
    .hero-shape-5 {
        animation: none;
    }
    
    .marquee-track {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8c2525;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #f9e5e5 0%, #ffe0d4 100%);
}
