/* ==========================================
   Gandy Nutrition — Custom Styles
   ========================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #D1FAE5;
    color: #047857;
}

/* ==========================================
   Header / Navigation
   ========================================== */
#header {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(4, 120, 87, 0.08);
}

#header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* ==========================================
   Mobile Menu
   ========================================== */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.translate-x-full .mobile-link {
    opacity: 0;
    transform: translateY(20px);
}

/* ==========================================
   Floating Cards Animation
   ========================================== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ==========================================
   Reveal Animations (progressive enhancement)
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays */
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

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

/* ==========================================
   Image lazy loading placeholder
   ========================================== */
img {
    background-color: #F5F3EE;
}

/* ==========================================
   Subtle hover transitions on cards
   ========================================== */
.group {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group:hover {
    transform: translateY(-4px);
}

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

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

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

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

/* ==========================================
   Print styles
   ========================================== */
@media print {
    #header,
    #mobile-menu,
    .floating-card {
        display: none;
    }
    
    body {
        background: white;
        color: #1C1917;
    }
}
