/* Custom styles for David M Coolidge Construction */

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

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating card animations */
@media (prefers-reduced-motion: no-preference) {
    .floating-card-1 {
        animation: float1 4s ease-in-out infinite;
    }
    .floating-card-2 {
        animation: float2 5s ease-in-out infinite;
    }
    .floating-card-3 {
        animation: float3 4.5s ease-in-out infinite;
    }
}

@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-10px) translateX(5px); }
}

/* Navbar styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(107, 36, 120, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F59E0B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #F59E0B !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

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

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

::-webkit-scrollbar-thumb {
    background: #7B2D8B;
    border-radius: 5px;
}

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

/* Selection color */
::selection {
    background: #F59E0B;
    color: #2d0d33;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* Project card hover overlay transition */
.group relative .absolute {
    transition: opacity 0.3s ease;
}

/* Button hover glow effects */
a[href="#contact"].bg-amber-400:hover {
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4) !important;
}

/* Testimonial card hover lift */
.scroll-reveal.bg-white\/5:hover {
    transform: translateY(-4px);
}

.scroll-reveal.bg-white\/5 {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Geometric shape animations */
@media (prefers-reduced-motion: no-preference) {
    .absolute.top-20.right-10 {
        animation: spin-slow 20s linear infinite;
    }
}

@keyframes spin-slow {
    from { transform: rotate(12deg); }
    to { transform: rotate(372deg); }
}
