/* ============================================
   The Healthy Hub — Custom Styles
   Premium Dark Luxury · Emerald + Gold
   ============================================ */

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #FDFBF7;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050A07;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #065F46, #D97706);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #34D399, #FBBF24);
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(5, 10, 7, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(251, 191, 36, 0.1), 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #FBBF24, #34D399);
    transition: width 0.3s ease, left 0.3s ease;
}

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

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closing {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    position: relative;
}

/* --- Menu Toggle Animation --- */
#menu-toggle.active .menu-line:nth-child(1) {
    top: 15px;
    transform: rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#menu-toggle.active .menu-line:nth-child(3) {
    top: 15px;
    width: 6;
    transform: rotate(-45deg);
}

/* --- Reveal Animations --- */
.reveal-on-scroll {
    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-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state is visible (no opacity:0) for progressive enhancement */

/* --- Gold Accent Elements --- */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #FBBF24, transparent);
}

/* --- Card Hover Effects --- */
.reveal-on-scroll:hover .aspect-\[4\/3\] img {
    transform: scale(1.1);
}

/* --- Button Focus States --- */
a:focus-visible, button:focus-visible {
    outline: 2px solid #FBBF24;
    outline-offset: 4px;
    border-radius: 4px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .aspect-\[4\/3\] img,
    .relative.rounded-2xl.overflow-hidden img {
        transition: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* --- Print Styles --- */
@media print {
    #navbar, #mobile-menu, .reveal-on-scroll {
        display: none;
    }
    
    body {
        background: white;
        color: #1a1a1a;
    }
}
