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

.animate-fade-up {
    animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f0;
}
::-webkit-scrollbar-thumb {
    background: #d44848;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #932424;
}

/* === Navbar Transition === */
#navbar.scrolled {
    background: rgba(254, 253, 251, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
}

#navbar.scrolled .font-serif {
    color: #1a1a1a;
}

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

#mobileMenu.open .mobile-link {
    animation: fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

/* === Menu Button Active State === */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 5rem;
}

/* === Service Cards === */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #d44848, #f4bcac);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 2px 2px 0 0;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* === Process Steps === */
.process-step {
    position: relative;
}

/* === Selection === */
::selection {
    background: #d44848;
    color: #fefdfb;
}

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

/* === Image Loading === */
img {
    image-rendering: -webkit-optimize-contrast;
}

/* === Print Styles === */
@media print {
    #navbar, #mobileMenu, .animate-fade-up {
        display: none;
    }
}
