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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(107, 58, 116, 0.15);
    color: #38203c;
}

/* ── Navbar scroll state ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-blur-md;
    box-shadow: 0 1px 0 rgba(107, 58, 116, 0.08);
}

#navbar.scrolled .text-plum-800 {
    color: #38203c !important;
}

#navbar.scrolled .text-plum-700 {
    color: #442649 !important;
}

#navbar.scrolled a[href="#contact"] {
    background: #6B3A74 !important;
}

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

#mobile-menu.closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

.mobile-link {
    display: block;
    font-size: 1.5rem;
    transition: color 0.3s;
}

/* ── Service cards ── */
.service-card {
    transition: background 0.4s ease;
}

.service-card:hover {
    background: #faf5ff;
}

.service-card:hover .w-12 {
    background: #fff3c4 !important;
}

.service-card:hover svg path,
.service-card:hover svg circle,
.service-card:hover svg rect {
    stroke: #c48000 !important;
}

/* ── Scroll reveal (below fold only, progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .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; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    * {
        transition: none !important;
    }
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8b4d98;
}
