/* ========================================
   St. Joe Nutrition — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #6B3A5D;
    color: #fff;
}

/* Navigation */
.nav-fixed {
    transition: box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    box-shadow: 0 1px 20px rgba(107, 58, 93, 0.06);
}

.nav-link {
    position: relative;
}

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

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

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

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #D4A017;
    transition: width 0.3s ease;
}

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

/* Hero Animations */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-image {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

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

/* Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Product Cards */
.card-product {
    position: relative;
    overflow: hidden;
}

.card-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: #D4A017;
    transition: height 0.4s ease;
}

.card-product:hover::before {
    height: 100%;
}

/* About Section */
.about-content {
    opacity: 0;
    transform: translateY(30px);
}

.about-content.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.7s ease;
}

.about-image {
    opacity: 0;
    transform: translateY(20px);
}

.about-image.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.7s ease 0.15s;
}

/* Form Inputs */
.form-input {
    border: none;
    border-bottom: 1px solid #e8d5e0;
    padding: 12px 0;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #2f1a2a;
    background: transparent;
    transition: border-color 0.3s ease;
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: #c08aad;
}

.form-input:focus {
    border-bottom-color: #D4A017;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.7s ease;
}

.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-content,
    .hero-image {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .hero-image img {
        height: 400px;
    }
}

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