/* ========================================
   Dr. Hall — Family Medicine
   Custom styles & animations
   ======================================== */

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

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

/* Custom selection color */
::selection {
    background: rgba(184, 92, 56, 0.15);
    color: #5a2d1f;
}

/* ========================================
   Floating card animations
   ======================================== */
.card-float {
    animation: float 4s ease-in-out infinite;
}

.card-float-delayed {
    animation: float 4s ease-in-out infinite;
    animation-delay: 2s;
}

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

/* ========================================
   Service card hover effects
   ======================================== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

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

/* ========================================
   Scroll reveal animations
   Progressive enhancement: JS adds .revealed
   ======================================== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger delays for grid items */
.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ========================================
   Navbar scroll state
   ======================================== */
.nav-scrolled {
    background: rgba(253, 252, 250, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* ========================================
   Mobile menu transitions
   ======================================== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* ========================================
   Reduced motion preference
   ======================================== */
@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;
    }
    
    .card-float,
    .card-float-delayed {
        animation: none;
    }
}

/* ========================================
   Focus visible for accessibility
   ======================================== */
:focus-visible {
    outline: 2px solid #B85C38;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Input autofill styling
   ======================================== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
}
