/* Base & Animations */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll Indicator Animation */
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.2); }
}

.scroll-indicator {
    animation: scroll-pulse 2s ease-in-out infinite;
    transform-origin: top;
}

/* Service Card Hover Glow */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(232, 115, 74, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

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

/* Custom Selection */
::selection {
    background: rgba(232, 115, 74, 0.3);
    color: #FAF8F6;
}

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #E8734A;
    outline-offset: 2px;
}

/* Mobile Menu Transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Gallery Item Transitions */
.gallery-item .absolute {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Navbar Scroll State */
.nav-scrolled {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(74, 74, 74, 0.5) !important;
}

/* Image Loading Placeholder */
img {
    background: linear-gradient(135deg, #2D2D2D 0%, #3D3D3D 100%);
}

/* Remove default select arrow and add custom */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23E8734A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle gradient border on contact section */
#contact .bg-charcoal-900 {
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
}

/* 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;
    }
}
