/* ============================================
   Cafe Dien Anh — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.08), 0 4px 24px rgba(5, 150, 105, 0.06);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #064e3b;
}

#navbar.scrolled .nav-link::after {
    background: linear-gradient(90deg, #059669, #10b981);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-link {
    position: relative;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu-link:hover {
    color: #059669;
    padding-left: 8px;
}

/* ============================================
   Hero
   ============================================ */
.floating-orb {
    animation: float-orb 8s ease-in-out infinite;
}

.orb-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.orb-3 {
    animation-delay: -5s;
    animation-duration: 6s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Floating stat cards */
.floating-card {
    animation: float-card 6s ease-in-out infinite;
    will-change: transform;
}

.card-coffee {
    animation-delay: 0s;
}

.card-pastry {
    animation-delay: -1.5s;
    animation-duration: 7s;
}

.card-atmosphere {
    animation-delay: -3s;
    animation-duration: 5.5s;
}

.card-location {
    animation-delay: -4.5s;
    animation-duration: 6.5s;
}

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

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

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state for reduced motion or no-JS: always visible */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal[data-reveal] {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .scroll-reveal[data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #059669, #10b981);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #047857, #059669);
}

/* ============================================
   Selection
   ============================================ */
::selection {
    background: rgba(16, 185, 129, 0.2);
    color: #064e3b;
}

/* ============================================
   Form focus states
   ============================================ */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar, #mobile-menu, .floating-orb, .floating-card {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
