/* =============================================
   Blue Heron Medical Group — Custom Styles
   ============================================= */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcf8;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

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

#navbar.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* =============================================
   Hero Content Animation
   ============================================= */
.hero-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
}

/* =============================================
   Scroll Reveal (progressive enhancement)
   ============================================= */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Fallback: always visible if JS disabled or reduced motion */
.reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* =============================================
   Mobile Menu
   ============================================= */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu.open {
    pointer-events: auto;
}

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

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

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

/* =============================================
   Form Focus States
   ============================================= */
input:focus,
textarea:focus {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
}

/* =============================================
   Button Hover Micro-interactions
   ============================================= */
button[type="submit"],
a[href="tel:+14109573005"] {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

button[type="submit"]:active,
a[href="tel:+14109573005"]:active {
    transform: scale(0.98);
}

/* =============================================
   Image Loading
   ============================================= */
img {
    opacity: 1;
    transition: opacity 0.5s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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