/* Custom styles for Barkode Bakery */

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

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

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(80, 7, 36, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #db2777;
    border-radius: 5px;
}

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

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

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

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

/* Selection color */
::selection {
    background: #fbbf24;
    color: #500724;
}

/* Back to top button animation */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#back-to-top:not(.visible) {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Form input transitions */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Mobile menu link hover */
.mobile-link {
    transition: color 0.2s ease;
}

/* Ensure hero text is readable */
#hero h1,
#hero p {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Card hover lift effect */
.group:hover {
    transform: translateY(-0.25rem);
}

/* Subtle pattern for section backgrounds */
.bg-pattern-dots {
    background-image: radial-gradient(circle, rgba(251, 191, 36, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}
