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

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

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

::selection {
    background: color-mix(in srgb, #7B2D3B 25%, transparent);
    color: #3a0f16;
}

/* ========== NAVBAR ========== */
.nav-link {
    position: relative;
}

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

/* ========== SERVICE CARDS ========== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2D3B, #c45d72);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 3px 3px 0 0;
}

.service-card:hover::before {
    opacity: 1;
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: none;
}

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

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ========== MOBILE MENU ========== */
.mobile-nav-link {
    display: block;
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ========== FORM ========== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, #7B2D3B 15%, transparent);
}

/* ========== ACCESSIBILITY ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: #7B2D3B;
    color: #fff;
    border-radius: 0.5rem;
    z-index: 9999;
}

/* ========== FOCUS VISIBLE ========== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c45d72;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 639px) {
    html {
        scroll-padding-top: 72px;
    }
}
