/* ===== Custom Styles for MAD COFFEE ===== */

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

body {
    background-color: #050A18;
}

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

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

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

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

.float-medium {
    animation: float-medium 4.5s ease-in-out infinite;
}

.float-fast {
    animation: float-fast 3.5s ease-in-out infinite;
}

/* Stagger floating cards */
.float-medium { animation-delay: -1.5s; }
.float-fast { animation-delay: -0.75s; }

/* ===== Scroll Reveal ===== */
.reveal-up {
    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-left {
    opacity: 1;
    transform: translateX(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-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hidden initial states — applied by JS for progressive enhancement */
.js-reveal-up {
    opacity: 0;
    transform: translateY(32px);
}

.js-reveal-left {
    opacity: 0;
    transform: translateX(-32px);
}

.js-reveal-right {
    opacity: 0;
    transform: translateX(32px);
}

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(5, 10, 24, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

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

/* ===== Gold gradient underline animation ===== */
@keyframes underline-grow {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===== Selection color ===== */
::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #fff;
}

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

/* ===== Responsive tweaks ===== */
@media (max-width: 768px) {
    .float-slow,
    .float-medium,
    .float-fast {
        animation: none;
    }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .float-slow,
    .float-medium,
    .float-fast {
        animation: none;
    }
    
    .js-reveal-up,
    .js-reveal-left,
    .js-reveal-right {
        opacity: 1;
        transform: none;
    }
}
