/* ===== Custom Styles for Brian Barlow CLU Website ===== */

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

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

/* Selection color */
::selection {
    background-color: rgba(110, 231, 183, 0.3);
    color: #064E3B;
}

/* ===== Hero Animations ===== */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1s ease-out 0.2s forwards;
}

.hero-image {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1s ease-out 0.5s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scroll Reveal Animations ===== */
.about-image,
.about-text,
.service-card,
.why-text,
.why-image,
.contact-info,
.contact-form-wrapper {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.about-image.revealed,
.about-text.revealed,
.service-card.revealed,
.why-text.revealed,
.why-image.revealed,
.contact-info.revealed,
.contact-form-wrapper.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered service card delays */
.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

/* ===== Navbar Transition ===== */
.nav-scrolled {
    background-color: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08);
}

.nav-scrolled #navbar {
    padding-top: 0;
    padding-bottom: 0;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-content,
    .hero-image {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .about-image,
    .about-text,
    .service-card,
    .why-text,
    .why-image,
    .contact-info,
    .contact-form-wrapper {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .mobile-link {
        opacity: 1;
        transform: none;
        transition: color 0.3s ease;
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #10B981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6EE7B7;
}
