/* ── Base & Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background-color: rgba(123, 45, 59, 0.15);
    color: #5c1a25;
}

/* ── Scroll-reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        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.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; }
}

/* ── Navbar scroll state ── */
#navbar.scrolled {
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

/* ── Mobile menu animation ── */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#menuLine1.open {
    transform: translateY(5px) rotate(45deg);
}

#menuLine2.open {
    opacity: 0;
}

#menuLine3.open {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* ── Service card hover ── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7B2D3B, #a11737);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    width: 100%;
}

/* ── Feature item hover ── */
.feature-item {
    transition: background-color 0.3s ease;
}

.feature-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ── Input autofill override ── */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f5b9c1;
    border-radius: 3px;
}

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

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

/* ── Select arrow ── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5b9c1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
