/* ============================================
   WARRIOR NUTRITION — Custom Styles
   Classic & Elegant | Navy + Warm Gold
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-navy-950: #0a0f17;
    --color-navy-900: #101823;
    --color-navy-800: #1c2c46;
    --color-navy-700: #284069;
    --color-navy-600: #34548c;
    --color-navy-500: #4168af;
    --color-navy-200: #b3c2df;
    --color-navy-100: #d9e0ef;
    --color-navy-50: #f0f3f9;
    --color-gold-500: #d4a017;
    --color-gold-400: #edbb33;
    --color-gold-600: #b07f0e;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--color-navy-900);
    background-color: #ffffff;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-navy-950);
}
::-webkit-scrollbar-thumb {
    background: var(--color-gold-500);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-400);
}

/* --- Selection --- */
::selection {
    background: var(--color-gold-500);
    color: var(--color-navy-950);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold-500);
    transition: width 0.3s ease;
}

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

/* --- Product Card Hover --- */
.product-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
    transform: translateY(-6px);
}

/* --- Scroll Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only apply hidden state when JS is enabled AND user prefers motion */
.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(32px);
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.hidden-reveal {
    opacity: 0;
    transform: translateX(-32px);
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.hidden-reveal {
    opacity: 0;
    transform: translateX(32px);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal.hidden-reveal,
    .reveal-left.hidden-reveal,
    .reveal-right.hidden-reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Mobile menu transitions --- */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Back to top --- */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:not(.visible) {
    transform: translateY(8px);
}

/* --- Form focus states --- */
input:focus,
textarea:focus {
    outline: none;
}

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

/* --- Image aspect ratios --- */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

.aspect-\[3\/4\] {
    aspect-ratio: 3 / 4;
}

/* --- Smooth image loading --- */
img {
    background-color: var(--color-navy-100);
}

/* --- Print styles --- */
@media print {
    nav, #back-to-top, #mobile-menu {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
