/* ========================================
   CRAVE NUTRITION — Custom Styles
   Premium Dark Luxury Theme
   Midnight Blue + Mint + Gold
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #F0D68A;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #040B18;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #D4A843, #A8822A);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #F0D68A, #D4A843);
}

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

#navbar.scrolled {
    background: rgba(4, 11, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 67, 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, #D4A843, #3DD6A0);
    transition: width 0.3s ease, left 0.3s ease;
}

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

.nav-link:hover {
    color: #E8C55A !important;
}

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

#mobileMenu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Hamburger --- */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
    margin-left: 14px;
}

/* --- Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-up.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        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.revealed {
        opacity: 1;
        transform: translateX(0);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        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.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Form Styles --- */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* --- Button Hover Effects --- */
a[href^="tel"], a[href^="mailto"] {
    text-decoration: none;
}

/* --- Image Loading --- */
img {
    display: block;
    max-width: 100%;
}

/* --- Focus Visible --- */
*:focus-visible {
    outline: 2px solid #D4A843;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Gold Divider --- */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 67, 0.4), transparent);
}

/* --- Card Hover Glow --- */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* --- Responsive Tweaks --- */
@media (max-width: 640px) {
    .font-display {
        line-height: 1.1;
    }
}

@media (min-width: 1024px) {
    /* Subtle parallax on hero image */
    #hero {
        perspective: 1000px;
    }
}
