/* ============================================
   Michael Aguilar, M.D. — Custom Styles
   ============================================ */

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #c99784;
    color: #ffffff;
}

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

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(201, 151, 132, 0.2);
}

/* Mobile menu */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: fadeUp 0.4s ease forwards;
}

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

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

/* Hamburger */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg);
    top: 5px;
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 5px;
}

/* ============================================
   Hero Animations (above fold — no hidden state)
   ============================================ */
.hero-subtitle {
    animation: heroSlideIn 0.8s ease forwards;
}

.hero-title {
    animation: heroSlideIn 0.8s ease 0.15s forwards;
    opacity: 1;
}

.hero-desc {
    animation: heroSlideIn 0.8s ease 0.3s forwards;
    opacity: 1;
}

.hero-cta {
    animation: heroSlideIn 0.8s ease 0.45s forwards;
    opacity: 1;
}

.hero-stats {
    animation: heroSlideIn 0.8s ease 0.6s forwards;
    opacity: 1;
}

@keyframes heroSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal (below fold only)
   ============================================ */
@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);
    }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: #faf9f7;
}

.service-card svg {
    transition: transform 0.3s ease;
}

.service-card:hover svg {
    transform: scale(1.1);
}

/* ============================================
   Approach Cards
   ============================================ */
.approach-card {
    transition: border-color 0.5s ease, transform 0.3s ease;
}

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

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    border-bottom-color: #c99784 !important;
}

input::placeholder,
textarea::placeholder {
    color: #ddd8cf;
}

/* ============================================
   Utility
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        font-size: 2rem;
    }
    
    .font-serif.text-4xl {
        font-size: 2.25rem;
    }
    
    .font-serif.text-5xl {
        font-size: 2.75rem;
    }
}

/* ============================================
   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;
    }
}
