/* Custom styles for Tanner Chiropractic */

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

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-fade {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal-fade.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Ensure all content is visible by default for no-JS */
.reveal-fade,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(20, 48, 44, 0.08);
}

.navbar-scrolled .font-serif {
    color: #1a3f39 !important;
}

.navbar-scrolled a:not(.bg-forest-800):not(.bg-cream-500) {
    color: #2b6458 !important;
}

/* Card hover effects */
.group:hover .group-hover\:rotate-0 {
    transform: rotate(0deg);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8abfad;
}

/* Selection color */
::selection {
    background: #d97706;
    color: #fefdf8;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle hover lift for cards */
.group {
    transition: transform 0.3s ease;
}

.group:hover {
    transform: translateY(-2px);
}

/* Image lazy load fallback */
img {
    transition: opacity 0.3s ease;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d97706;
    outline-offset: 2px;
    border-radius: 4px;
}

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