/* Custom styles for Islands Cafe and Creamery */

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

/* Hide scrollbar for mobile menu animation */
body.menu-open {
    overflow: hidden;
}

/* Navbar transition states */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

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

#mobileMenu.open .mobile-link {
    animation: slideUp 0.4s ease forwards;
}

#mobileMenu .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

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

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

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

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

/* Floating card animations */
@media (prefers-reduced-motion: no-preference) {
    .float-slow {
        animation: floatSlow 6s ease-in-out infinite;
    }

    .float-medium {
        animation: floatMedium 4s ease-in-out infinite;
    }

    .float-fast {
        animation: floatFast 3s ease-in-out infinite;
    }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes floatMedium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes floatFast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
}

/* Image hover zoom for gallery */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Custom selection color */
::selection {
    background: #c47252;
    color: #fdfcfa;
}

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

/* Form input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #faf6f0 inset !important;
    -webkit-text-fill-color: #1f2937 !important;
}

/* Subtle pattern for dark sections */
.dark-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}
