/* ============================================
   Coffee Rx — Custom Styles
   Clean minimalist · Burgundy + Blush
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #7B2D3B;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FDFBF9;
}
::-webkit-scrollbar-thumb {
    background: rgba(123, 45, 59, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 45, 59, 0.4);
}

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

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

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

/* --- Scroll Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
}

.reveal.fade-up {
    /* Hidden by default, revealed by JS */
    opacity: 0;
    transform: translateY(30px);
    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.fade-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal.fade-up,
    .reveal.fade-up.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Navbar --- */
#navbar {
    background: rgba(253, 251, 249, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(44, 36, 32, 0.06);
}

#navbar.scrolled {
    background: rgba(253, 251, 249, 0.95);
    box-shadow: 0 1px 20px rgba(44, 36, 32, 0.06);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

#mobileMenu.closed .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --- Menu Link Hover Lines --- */
.group:hover .w-6.h-px {
    width: 1.5rem;
}

/* --- Button Focus States --- */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(123, 45, 59, 0.5);
    outline-offset: 2px;
}

/* --- Image Loading --- */
img {
    background-color: rgba(44, 36, 32, 0.05);
}

/* --- Print Styles --- */
@media print {
    #navbar, .floating-card, #mobileMenu {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
