/* Custom styles for Richardson Chiropractic website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F9F7F2;
}

::-webkit-scrollbar-thumb {
    background: #97c5a3;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #66a375;
}

/* Selection color */
::selection {
    background: #c5dfcc;
    color: #16301f;
}

/* Fade-in animation for scroll-reveal elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for hero badge */
@keyframes softPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-pulse {
    animation: softPulse 2s ease-in-out infinite;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Scroll reveal base state (visible by default for progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Reveal state applied via JS for enhanced users */
@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #66a375;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Image loading placeholder */
img {
    background-color: #e3efe6;
}

/* Print styles */
@media print {
    nav, #contact, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
