/* ========================================
   FOLEY NUTRITION — Custom Styles
   ======================================== */

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(79, 209, 197, 0.3);
    color: #ffffff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060f20;
}
::-webkit-scrollbar-thumb {
    background: rgba(79, 209, 197, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 209, 197, 0.5);
}

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

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

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

.nav-link:hover {
    color: #4FD1C5;
}

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

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Default visible state for reduced motion / no-JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* JS-enhanced: animate from below */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered delays */
.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.3s; }
.js-enabled .reveal:nth-child(5) { transition-delay: 0.4s; }
.js-enabled .reveal:nth-child(6) { transition-delay: 0.5s; }

/* --- 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 {
        opacity: 1;
        transform: none;
    }
}

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

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* --- Image aspect ratios --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- Focus visible --- */
:focus-visible {
    outline: 2px solid #4FD1C5;
    outline-offset: 2px;
}

/* --- Hero decorative animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.js-enabled .absolute.top-48.right-24 {
    animation: float 6s ease-in-out infinite;
}

.js-enabled .absolute.bottom-24.left-0 {
    animation: float 8s ease-in-out infinite reverse;
}

/* --- Cursor glow effect on product cards --- */
.group {
    position: relative;
}

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

/* --- Print styles --- */
@media print {
    header,
    footer,
    #contact-form,
    .reveal {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
