/* Custom styles for Taylor Glass */

/* Smooth scroll behavior handled in HTML head */

/* Hero animations */
#hero-badge {
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

#hero-headline {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

#hero-subheadline {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

#hero-cta {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

#hero-stats {
    animation: fadeInUp 0.8s ease-out 1s both;
}

#hero-scroll {
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card staggered animations */
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* Gallery item animations */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* Testimonial card animations */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* About section animations */
#about .relative {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#about .relative.visible {
    opacity: 1;
    transform: translateX(0);
}

#about > div > div:last-child {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
}

#about > div > div:last-child.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Navbar scroll behavior */
#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(154, 35, 35, 0.08);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    #hero-badge,
    #hero-headline,
    #hero-subheadline,
    #hero-cta,
    #hero-stats,
    #hero-scroll {
        animation: none;
        opacity: 1;
    }
    
    .service-card,
    .gallery-item,
    .testimonial-card {
        opacity: 1;
        transform: none;
    }
    
    #about .relative,
    #about > div > div:last-child {
        opacity: 1;
        transform: none;
    }
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #9a2323;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b82e2e;
}
