/* ===== Custom Styles for Thrive Nutrition - Herbalife ===== */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #3d5122;
}

/* Selection color */
::selection {
    background: #4a6429;
    color: #fefdf8;
}

/* ===== Typography refinements ===== */
.font-serif {
    font-feature-settings: "ss01", "ss02", "ss03";
    font-kerning: normal;
}

/* ===== Navigation transitions ===== */
.nav-link {
    position: relative;
}

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

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

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

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

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

/* ===== Image hover effects ===== */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Button hover effects ===== */
button, a {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Card hover effects ===== */
.group:hover {
    transform: translateY(-4px);
}

/* ===== Focus styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px #4a6429;
}

/* ===== Subtle patterns ===== */
.bg-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(74, 100, 41, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

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

/* ===== Print styles ===== */
@media print {
    nav,
    button,
    form {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* ===== Tablet adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}

/* ===== Large screen optimizations ===== */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* ===== Loading state for images ===== */
img {
    background: linear-gradient(135deg, #e3e9d8 0%, #f2f5ee 100%);
}

/* ===== Subtle texture overlay ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
