/* ==========================================
   Micah Wilson, MD — Custom Styles
   ========================================== */

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

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

/* Custom selection color */
::selection {
    background-color: #821e34;
    color: #fefdfb;
}

/* ==========================================
   Hero Animations
   ========================================== */
.hero-animate {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-animate:nth-child(1) { animation-delay: 0.1s; }
.hero-animate:nth-child(2) { animation-delay: 0.25s; }
.hero-animate:nth-child(3) { animation-delay: 0.4s; }
.hero-animate:nth-child(4) { animation-delay: 0.55s; }
.hero-animate:nth-child(5) { animation-delay: 0.7s; }

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

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

/* Always visible for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .hero-animate {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

/* ==========================================
   Navbar Transition
   ========================================== */
#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(130, 30, 52, 0.08);
}

#navbar.scrolled #nav-logo-text {
    color: #821e34;
}

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

#mobile-menu.open .mobile-nav-link {
    animation: navLinkFade 0.4s ease forwards;
    opacity: 0;
}

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

@keyframes navLinkFade {
    to { opacity: 1; }
}

/* Menu button active state */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 6px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ==========================================
   Input Focus Styles
   ========================================== */
input:focus,
textarea:focus {
    border-color: #a0223b !important;
    box-shadow: 0 0 0 3px rgba(160, 34, 59, 0.08) !important;
}

/* ==========================================
   Subtle image zoom on hover
   ========================================== */
.group img {
    transition: transform 0.6s ease;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    #navbar, #menu-toggle, #contact-form, #form-success {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
