/* Custom styles beyond Tailwind */

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

/* Hero Animations */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-title-line {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(100%);
}

.hero-title-line:nth-child(1) { animation-delay: 0.2s; }
.hero-title-line:nth-child(2) { animation-delay: 0.35s; }
.hero-title-line:nth-child(3) { animation-delay: 0.5s; }

.hero-fade {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

.hero-fade:nth-child(1) { animation-delay: 0.6s; }
.hero-fade:nth-child(2) { animation-delay: 0.7s; }
.hero-fade:nth-child(3) { animation-delay: 0.8s; }

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

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

/* Scroll indicator line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal[data-delay="100"] { transition-delay: 0.1s; }
    .reveal[data-delay="200"] { transition-delay: 0.2s; }
    .reveal[data-delay="300"] { transition-delay: 0.3s; }
}

/* Service card hover */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Process card hover */
.process-card {
    padding: 2rem;
    border-left: 1px solid rgba(224, 122, 95, 0.2);
    transition: border-color 0.3s ease;
}

.process-card:hover {
    border-left-color: rgba(224, 122, 95, 0.6);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(246, 246, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-link {
    color: #353535;
}

.nav-scrolled .menu-line {
    background: #2c2c2c;
}

.nav-scrolled .font-serif {
    color: #1f1f1f !important;
}

.nav-scrolled .bg-charcoal-800 {
    background: #2c2c2c;
}

.nav-scrolled .bg-charcoal-800:hover {
    background: #e07a5f;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 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.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Gallery item hover */
.gallery-item {
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #e07a5f !important;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

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

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

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

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

/* Selection color */
::selection {
    background: rgba(224, 122, 95, 0.2);
    color: #1f1f1f;
}

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