/* ============================================
   T-town Nutrition — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(249, 115, 22, 0.3);
    color: #f9fafb;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1f2530;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#navbar.scrolled {
    background-color: rgba(15, 19, 25, 0.95);
    box-shadow: 0 1px 0 rgba(55, 65, 81, 0.5);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
}

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.3s ease forwards;
}

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

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

/* Hamburger Animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Button & Link Focus States
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Form Elements
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23787b85' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    appearance: none;
    -webkit-appearance: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.15;
    }
}
