/* Custom styles for Coll Bros Law */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F3;
}
::-webkit-scrollbar-thumb {
    background: #D4D1C8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B0ACA0;
}

/* Hero fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.fade-in-up.delay-100 {
    animation-delay: 0.1s;
}
.fade-in-up.delay-200 {
    animation-delay: 0.2s;
}
.fade-in-up.delay-300 {
    animation-delay: 0.3s;
}
.fade-in-up.delay-500 {
    animation-delay: 0.5s;
}

/* Scroll reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Navbar transition */
.nav-scrolled {
    background: rgba(253, 248, 243, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-logo-text {
    color: #2A2720 !important;
}

.nav-scrolled #navbar a:not(.inline-flex) {
    color: #6B665A !important;
}

.nav-scrolled #navbar a:not(.inline-flex):hover {
    color: #C4775B !important;
}

/* Hero overlay subtle animation */
@keyframes subtleShift {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

header .absolute img {
    animation: subtleShift 20s ease-in-out infinite;
}

/* Service card hover image effect */
.group:hover .w-14 {
    transform: scale(1.05);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C4775B;
    outline-offset: 2px;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Selection color */
::selection {
    background: #F5CEBA;
    color: #4A2A1F;
}

/* Reduce motion for accessibility */
@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;
    }
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
    header .absolute img {
        animation: none;
    }
}
