/* Custom styles for Jitterbug Coffee & Donuts */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #091524;
}
::-webkit-scrollbar-thumb {
    background: #1e4068;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2e5a8e;
}

/* Selection color */
::selection {
    background: rgba(229, 168, 0, 0.3);
    color: #f5c514;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(9, 21, 36, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 168, 0, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu line animations */
#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.5rem;
}

/* Geometric shapes animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

.geometric-shape {
    animation: float 8s ease-in-out infinite;
}

.geometric-shape:nth-child(2n) {
    animation: float-slow 10s ease-in-out infinite;
    animation-delay: -3s;
}

/* Pulse animation for the dot */
@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.animate-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Card hover effects */
.group:hover .group-hover\:rotate-12 {
    transform: rotate(12deg);
}

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

/* Mobile menu link styles */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f5c514;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Ensure images don't cause layout shift */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce motion for accessibility */
@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;
    }
}

/* Print styles */
@media print {
    #navbar, .geometric-shape, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .geometric-shape {
        display: none;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .font-heading {
        font-size: 1.5rem;
    }
}
