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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ── Reveal Animations ── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-up:nth-child(1) { transition-delay: 0.05s; }
.reveal-up:nth-child(2) { transition-delay: 0.15s; }
.reveal-up:nth-child(3) { transition-delay: 0.25s; }
.reveal-up:nth-child(4) { transition-delay: 0.35s; }
.reveal-up:nth-child(5) { transition-delay: 0.45s; }
.reveal-up:nth-child(6) { transition-delay: 0.55s; }

/* ── Navbar ── */
#navbar {
    background: rgba(253, 248, 246, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(123, 45, 59, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* ── Mobile Menu ── */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link:hover {
    transform: scale(1.05);
}

/* ── Service Cards ── */
.service-card {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.5s ease;
}

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

/* ── Custom Selection ── */
::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #3f171f;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* ── Smooth image loading ── */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ── Form Animations ── */
#contactForm .form-field {
    animation: fadeInUp 0.4s ease forwards;
}

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

#formSuccess {
    animation: fadeInUp 0.4s ease forwards;
}

/* ── 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;
    }
    .reveal-up {
        opacity: 1;
        transform: none;
    }
}
