/* ========================================
   W. Palmetto Nutrition — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 164, 78, 0.2);
    color: #0a1628;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #c8a44e;
    border-radius: 3px;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #0a1628;
}

#navbar.scrolled .nav-logo-sub {
    color: #94a3b8;
}

#navbar.scrolled .nav-link {
    color: #152d56;
}

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

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 100%;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    animation: heroReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

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

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 0.8; transform: scaleY(1); }
}

/* ========================================
   Scroll Reveal (Below Fold)
   ======================================== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), 
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Start state handled in JS for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========================================
   Thin line decorations
   ======================================== */
.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 164, 78, 0.3), transparent);
}

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

input::placeholder, textarea::placeholder {
    color: #cbd5e1;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 640px) {
    .hero-anim {
        transform: translateY(16px);
    }
    
    @keyframes heroReveal {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
