/* ========================================
   Legacy Nutrition — Custom Styles
   ======================================== */

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

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF6B6B;
}

/* Selection Color */
::selection {
    background: rgba(255, 107, 107, 0.3);
    color: #fff;
}

/* Hero Animations */
.hero-anim {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 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; }

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Animation */
.reveal {
    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.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar Scroll State */
.nav-scrolled {
    background: rgba(15, 15, 15, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 107, 107, 0.1);
}

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

.mobile-link {
    transition: opacity 0.3s ease;
}

/* Button Ripple Effect */
button, .group-hover\:scale-105 {
    will-change: transform;
}

/* Image Loading Placeholder */
img {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

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

/* Coral Glow Effect */
.shadow-coral {
    box-shadow: 0 0 60px rgba(255, 107, 107, 0.15);
}

/* Gradient Text */
.text-gradient-coral {
    background: linear-gradient(135deg, #FF6B6B 0%, #E85555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle Pattern Overlay */
.pattern-grid {
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Mobile Menu Line Animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

#menuToggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* Form Select Arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* Product Card Image Container */
.group .overflow-hidden {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth Section Transitions */
section {
    position: relative;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-anim {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .text-neutral-400 {
        color: #a0a0a0;
    }
}

/* Print Styles */
@media print {
    nav, #contactForm, button {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .bg-charcoal-900, .bg-charcoal-800 {
        background: white !important;
    }

    .text-white, .text-neutral-100 {
        color: black !important;
    }
}
