/* ========================================
   Lifestyle Nutrition Miami — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #0d9488;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #475569;
}

#navbar.scrolled .nav-link:hover {
    color: #0d9488;
}

/* Mobile Menu */
#mobile-menu {
    box-shadow: none;
}

#mobile-menu.open {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.mobile-link {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

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

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

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Stagger children */
.reveal-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.reveal-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal-grid .reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal-grid .reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal-grid .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   Hero Section
   ======================================== */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.5) 0%, rgba(2, 6, 23, 0.3) 50%, rgba(2, 6, 23, 0.7) 100%);
    z-index: 1;
}

#hero > .absolute {
    z-index: 2;
}

#hero > .relative {
    z-index: 3;
}

/* ========================================
   Buttons & Interactive Elements
   ======================================== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ========================================
   Product Cards
   ======================================== */
.group:hover .aspect-\[4\/3\] img {
    transform: scale(1.05);
}

/* ========================================
   Testimonial Section
   ======================================== */
blockquote {
    position: relative;
}

/* ========================================
   Back to Top
   ======================================== */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ========================================
   Form Styles
   ======================================== */
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .font-serif.text-4xl {
        font-size: 2rem;
    }

    .font-serif.text-5xl {
        font-size: 2.25rem;
    }
}

@media (max-width: 640px) {
    .max-w-7xl {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    #navbar, #back-to-top, .reveal {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
