/* ===== Custom Styles for Mo Jo Coffee Co. ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

#navbar.scrolled {
    background-color: rgba(255, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(140, 37, 37, 0.08);
}

/* ===== Floating Cards ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger delays for grid items */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.35s; }

/* ===== Mobile Menu ===== */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8c2525, #ff4d58);
    transition: width 0.3s ease;
}

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

/* ===== Button Hover Effects ===== */
a {
    transition: all 0.3s ease;
}

/* ===== Image Hover ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

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

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

::-webkit-scrollbar-thumb {
    background: #eaa0a0;
    border-radius: 4px;
}

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

/* ===== Selection ===== */
::selection {
    background: #f9e4e4;
    color: #3a0e0e;
}

/* ===== Focus Styles ===== */
:focus-visible {
    outline: 2px solid #c44d4d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Input Focus ===== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(196, 77, 77, 0.15);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
    
    #hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }
    
    #hero img {
        height: 350px !important;
    }
}

@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .font-serif + p {
        font-size: clamp(1rem, 4vw, 1.125rem);
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar,
    .floating-card,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
