/* Base styles and custom animations */

html {
    scroll-behavior: smooth;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fafaf8;
}
::-webkit-scrollbar-thumb {
    background: #d4d0c8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a296;
}

/* Selection color */
::selection {
    background: #fad4be;
    color: #732a18;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Hero image animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero > .max-w-7xl > div > div:first-child > * {
    animation: fadeInUp 0.8s ease-out forwards;
}

#hero > .max-w-7xl > div > div:first-child > :nth-child(2) {
    animation-delay: 0.1s;
    opacity: 0;
}

#hero > .max-w-7xl > div > div:first-child > :nth-child(3) {
    animation-delay: 0.2s;
    opacity: 0;
}

#hero > .max-w-7xl > div > div:first-child > :nth-child(4) {
    animation-delay: 0.3s;
    opacity: 0;
}

#hero > .max-w-7xl > div > div:first-child > :nth-child(5) {
    animation-delay: 0.4s;
    opacity: 0;
}

#hero > .max-w-7xl > div > div:last-child {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

/* Floating card animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

#hero .absolute.-bottom-6.-left-6 {
    animation: float 4s ease-in-out infinite;
}

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

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08);
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for service cards */
.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; }

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Testimonial card hover */
#testimonials .bg-white {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#testimonials .bg-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.08);
}

/* CTA decorative circles pulse */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

#contact ~ section .absolute.rounded-full {
    animation: pulse-slow 6s ease-in-out infinite;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Utility for thin lines */
.divider-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, #eae8e2, transparent);
}
