/* ===================================
   Nutrition Hutt — Custom Styles
   =================================== */

/* Base */
html {
    scroll-behavior: smooth;
}

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

/* Selection */
::selection {
    background: #f5c8b8;
    color: #6d2c1b;
}

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

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(214, 97, 58, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d6613a;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ===================================
   Hero
   =================================== */
.hero-blob {
    will-change: transform;
}

.blob-1 {
    animation: float-slow 8s ease-in-out infinite;
}

.blob-2 {
    animation: float-medium 6s ease-in-out infinite;
}

.blob-3 {
    animation: float-slow 10s ease-in-out infinite reverse;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 15px) scale(0.95); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, 20px) scale(1.08); }
}

/* Hero entrance animations */
.hero-badge {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.hero-headline {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

.hero-trust {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1s;
}

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

/* ===================================
   Section Labels & Titles
   =================================== */
.section-label {
    letter-spacing: 0.12em;
}

.section-title {
    letter-spacing: -0.02em;
}

.section-subtitle {
    line-height: 1.75;
}

/* ===================================
   Product Cards
   =================================== */
.product-card {
    cursor: default;
}

.product-card img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================
   Community Cards
   =================================== */
.community-card {
    border: 1px solid rgba(214, 97, 58, 0.08);
}

/* ===================================
   Info Cards
   =================================== */
.info-card {
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ===================================
   Scroll Reveal Animations
   (progressive enhancement — content visible without JS)
   =================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        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.revealed {
        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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* ===================================
   Back to Top
   =================================== */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(214, 97, 58, 0.35);
}

/* ===================================
   Mobile Menu
   =================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===================================
   Responsive
   =================================== */
@media (max-width: 640px) {
    .hero-headline {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-floating-card {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1rem;
        max-width: 100%;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem;
    }
}
</style>
