*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

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

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

/* Service cards stagger */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 252, 248, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(139, 129, 120, 0.1);
}

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

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

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

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

/* Selection */
::selection {
    background: rgba(192, 108, 84, 0.2);
    color: #2D3436;
}

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

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

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

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal, .service-card {
        opacity: 1;
        transform: none;
    }
}
