/* ========================================
   Family Practice Physician — Custom Styles
   Plum + Amber | Clean Minimalist
   ======================================== */

/* Base */
*, *::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: rgba(74, 35, 90, 0.15);
    color: #4A235A;
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(74, 35, 90, 0.06);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #4A235A;
}

#navbar.scrolled .nav-logo-text {
    color: #4A235A;
}

.nav-link {
    position: relative;
}

/* ========================================
   Floating Cards (Hero)
   ======================================== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -1.5s;
}

.card-3 {
    animation-delay: -3s;
}

.card-4 {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

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

/* ========================================
   Mobile Menu
   ======================================== */
#mobileMenu {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

#mobileMenu.active {
    opacity: 1;
    pointer-events: all;
}

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

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

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

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion: ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   Input focus styles
   ======================================== */
input:focus, textarea:focus {
    outline: none;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}
