/* Custom styles for Cafe Grind — complementary to Tailwind */

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Base font settings */
body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Serif font class */
.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0c1533;
}
::-webkit-scrollbar-thumb {
    background: #1c316e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #25408a;
}

/* Selection color */
::selection {
    background: rgba(92, 184, 125, 0.3);
    color: #f0f3f9;
}

/* Grain texture overlay */
.grain-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* Reveal animations — progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.from-bottom {
    transform: translateY(40px);
}
.reveal.from-left {
    transform: translateX(-40px);
}
.reveal.from-right {
    transform: translateX(40px);
}
.reveal.faded {
    opacity: 0;
}

/* Only apply hidden state when user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal.faded {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal.from-left.faded {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal.from-right.faded {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(6, 11, 30, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Menu item hover */
.menu-item:hover .menu-item-price {
    color: #5cb87d;
}
.menu-item:hover .menu-item-desc {
    color: rgba(213, 219, 238, 0.9);
}

/* Primary button */
.btn-primary {
    background: #5cb87d;
    color: #0c1533;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.btn-primary:hover {
    background: #8fd3a8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(92, 184, 125, 0.25);
}

/* Outline button */
.btn-outline {
    border: 1.5px solid rgba(92, 184, 125, 0.5);
    color: #8fd3a8;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.btn-outline:hover {
    background: rgba(92, 184, 125, 0.12);
    border-color: #5cb87d;
    color: #bfe8cf;
}

/* Card hover effect */
.card-hover {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Mobile menu */
.mobile-menu-open {
    transform: translateX(0) !important;
}

/* Hamburger animation */
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #f0f3f9;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* Divider line */
.divider-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #5cb87d, transparent);
}

/* Image hover zoom */
img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

/* Print styles */
@media print {
    .reveal.faded {
        opacity: 1 !important;
        transform: none !important;
    }
    nav, .animate-bounce {
        display: none;
    }
}
