/* Custom styles for Henagar Al Nutrition */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 249, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(26, 39, 68, 0.06);
}

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

/* Mobile link hover */
.mobile-link:hover {
    color: #d4a843;
}

/* Nav links */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #d4a843;
    border-radius: 1px;
    transition: width 0.25s ease;
    margin-top: 2px;
}

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

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

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

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.25);
    color: #1a2744;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9f0;
}
::-webkit-scrollbar-thumb {
    background: rgba(26, 39, 68, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 39, 68, 0.3);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-float { animation: none; }
    .fade-in, .fade-in-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .group:hover img { transform: none; }
}
