/* ============================================
   Nutricion Total — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* ============================================
   Hero Animations
   ============================================ */
@keyframes heroZoom {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

.animate-hero-zoom {
    animation: heroZoom 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

/* Hero content entrance — runs once on load, no JS needed */
.hero-subtitle {
    animation: fadeUp 0.8s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-title {
    animation: fadeUp 0.8s 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-description {
    animation: fadeUp 0.8s 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.hero-cta {
    animation: fadeUp 0.8s 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

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

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: rgba(255, 255, 255, 0.95);
}

#navbar.scrolled .nav-logo-text {
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   Gated behind prefers-reduced-motion so it
   only activates when JS is available.
   ============================================ */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal-left {
        opacity: 0;
        transform: translateX(-32px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal-right {
        opacity: 0;
        transform: translateX(32px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

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

#mobile-menu.open .mobile-menu-link {
    animation: fadeUp 0.4s both;
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { animation-delay: 0.15s; }

/* ============================================
   Mobile Menu Button
   ============================================ */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ============================================
   Utility & Misc
   ============================================ */
::selection {
    background-color: rgba(255, 107, 90, 0.2);
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 2px;
}

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

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

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

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