/* Custom styles for The Journey Coffee House */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f6f6f7;
}
::-webkit-scrollbar-thumb {
    background: #e07a5f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4654a;
}

/* Selection color */
::selection {
    background: #e07a5f;
    color: white;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .font-display {
    color: #1a1b1e !important;
}

#navbar.scrolled a:not(.bg-coral-500) {
    color: #4a4d55 !important;
}

/* Mobile menu link transitions */
.mobile-menu-link {
    position: relative;
}
.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e07a5f;
    transition: width 0.3s ease;
}
.mobile-menu-link:hover::after {
    width: 100%;
}

/* Hero image parallax feel */
#hero .absolute img {
    will-change: transform;
}

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(224, 122, 95, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Card hover glow */
.group:hover .bg-coral-100 {
    background: #ffd3c8 !important;
    transition: background 0.3s ease;
}

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

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

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Ensure all images have smooth loading */
img {
    loading: lazy;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
