/* Custom styles for Converse Coffee Cafe */

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

/* Base styles */
body {
    font-family: 'Nunito', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 252, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(156, 26, 59, 0.08);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #9c1a3b, #be2044);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

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

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

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    
    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: none;
    }
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

/* Image hover effects */
img {
    transition: transform 0.5s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #be2044, #9c1a3b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a01a38, #7d1430);
}

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

/* Selection color */
::selection {
    background-color: #fce7eb;
    color: #6e1530;
}

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

button:active, a:active {
    transform: scale(0.98);
}

/* Mobile menu link hover */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #be2044;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 16px;
}

/* Image aspect ratios */
.rounded-2xl, .rounded-3xl {
    will-change: transform;
}

/* Form input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fefcf6 inset !important;
    -webkit-text-fill-color: #5a4230 !important;
}

/* Subtle pattern overlay for dark sections */
section.bg-burgundy-950::before,
section[class*="bg-burgundy-"].relative::after {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
    background-size: 24px 24px;
}
