/* Custom styles for Swinehart Law website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFF8F7;
}
::-webkit-scrollbar-thumb {
    background: #f9c5ce;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f49aad;
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

.animate-float {
    animation: float 4s ease-in-out infinite;
}

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

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 252, 253, 0.92);
    backdrop-blur-xl;
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

nav.scrolled .font-serif {
    color: #7B2D3B;
}

/* Mobile menu transitions */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#mobileMenu.open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobileMenu.open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.4rem;
}

/* Mobile link hover */
.mobile-link {
    transition: all 0.3s ease;
}

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

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

/* Stagger children */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }
.fade-in-delay-6 { transition-delay: 0.6s; }

/* Service card hover glow */
.group:hover .w-14 {
    box-shadow: 0 0 20px rgba(123, 45, 59, 0.3);
}

/* Subtle pattern overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(123, 45, 59, 0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* Ensure content sits above the pattern */
nav, section, footer {
    position: relative;
    z-index: 1;
}

/* Form focus ring animation */
input:focus, textarea:focus {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}

/* Mobile menu open state */
#mobileMenu.open {
    animation: slideDown 0.3s ease forwards;
}

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