/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: #d4623a;
    color: #fff;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }
.reveal[data-reveal-delay="4"] { transition-delay: 0.4s; }
.reveal[data-reveal-delay="5"] { transition-delay: 0.5s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }

    .reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-headline {
        overflow: hidden;
    }

    .hero-headline span {
        display: inline-block;
        animation: slideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        opacity: 0;
        transform: translateY(100%);
    }

    .hero-headline span:nth-child(1) { animation-delay: 0.1s; }
    .hero-headline span:nth-child(2) { animation-delay: 0.25s; }
    .hero-headline span:nth-child(3) { animation-delay: 0.4s; }
    .hero-headline span:nth-child(4) { animation-delay: 0.55s; }

    .hero-tagline {
        animation: fadeIn 0.8s 0.3s both;
    }

    .hero-subtext {
        animation: fadeIn 0.8s 0.6s both;
    }
}

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

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

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Nav Links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #d4623a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeIn 0.4s ease forwards;
}

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

/* Mobile menu button */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 100%;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Service Cards */
.service-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Gallery Images */
@media (prefers-reduced-motion: no-preference) {
    .rounded-2xl.overflow-hidden img {
        transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Smooth Scroll Offset */
section[id] {
    scroll-margin-top: 80px;
}

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

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

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

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