/* Custom styles for McCarthy Integrative Physical Therapy */

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

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(120, 80, 140, 0.08);
}

#navbar.scrolled .nav-logo {
    color: #472652;
}

#navbar.scrolled .mobile-link {
    color: #472652;
}

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

.menu-line {
    transition: all 0.3s ease;
}

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

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

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Custom selection color */
::selection {
    background: #d4b5e0;
    color: #261130;
}

/* Subtle input focus glow */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 4px rgba(156, 90, 179, 0.08);
}

/* Button hover lift */
button, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent layout shift on images */
img {
    image-rendering: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .fade-in,
    .stagger-children > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
