/* ============================================
   Tunnel Hill Nutrition — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::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 */
::selection {
    background-color: #c4274b;
    color: #fefdf8;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(196, 39, 75, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c4274b;
    transition: width 0.3s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    position: relative;
}

/* ============================================
   Hero Blobs Animation
   ============================================ */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

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

@keyframes float-fast {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(25px, -25px); }
}

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

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

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

/* ============================================
   Product Cards
   ============================================ */
.product-card {
    box-shadow: 0 4px 20px rgba(196, 39, 75, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(196, 39, 75, 0.15);
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible by default)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal[data-delay="1"] { transition-delay: 0.1s; }
    .reveal[data-delay="2"] { transition-delay: 0.2s; }
    .reveal[data-delay="3"] { transition-delay: 0.3s; }
    .reveal[data-delay="4"] { transition-delay: 0.4s; }
    .reveal[data-delay="5"] { transition-delay: 0.5s; }
    .reveal[data-delay="6"] { transition-delay: 0.6s; }
}

/* ============================================
   Scroll-triggered reveals (JS adds .revealed)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }

    .js-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .js-reveal[data-delay="1"] { transition-delay: 0.1s; }
    .js-reveal[data-delay="2"] { transition-delay: 0.2s; }
    .js-reveal[data-delay="3"] { transition-delay: 0.3s; }
    .js-reveal[data-delay="4"] { transition-delay: 0.4s; }
    .js-reveal[data-delay="5"] { transition-delay: 0.5s; }
    .js-reveal[data-delay="6"] { transition-delay: 0.6s; }
}

/* ============================================
   Geometric accent shapes
   ============================================ */
.geo-square {
    position: absolute;
    width: 80px;
    height: 80px;
    background: #c4274b;
    opacity: 0.05;
    border-radius: 16px;
    transform: rotate(45deg);
}

.geo-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ff7d99;
    opacity: 0.06;
}

/* ============================================
   Smooth anchor offset for fixed nav
   ============================================ */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Focus styles for accessibility
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #c4274b;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================
   Custom scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #fefdf8;
}

::-webkit-scrollbar-thumb {
    background: #c4274b;
    border-radius: 5px;
}

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

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu,
    .hero-blob-1,
    .hero-blob-2,
    .hero-blob-3 {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}
