/* ============================================
   Optimal Health Coaching — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #a8e6cf;
    color: #0a1628;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .section-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);
    }
    
    .section-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .hero-tag {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    
    h1 {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s forwards;
        opacity: 0;
        transform: translateY(30px);
    }
    
    h1 + p {
        animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
        opacity: 0;
        transform: translateY(30px);
    }
    
    .hero-tag {
        opacity: 0;
    }
}

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

/* Scroll line animation */
@keyframes scrollLine {
    0% { top: -16px; }
    100% { top: 100%; }
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-midnight-900 {
    color: #0a1628;
}

#navbar.scrolled .text-midnight-700 {
    color: #1a3a5c;
}

#navbar.scrolled #line1,
#navbar.scrolled #line2,
#navbar.scrolled #line3 {
    background: #0a1628;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

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

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

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

/* Hamburger animation */
#menuBtn.active #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active #line2 {
    opacity: 0;
}

#menuBtn.active #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #fff;
    color: #0a1628;
}

/* ============================================
   Utility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .section-reveal {
        opacity: 1;
        transform: none;
    }
}
