*, *::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: rgba(158, 36, 56, 0.15);
    color: #6b1a2b;
}

/* Scroll reveal — progressive enhancement, respects reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

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

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

/* Navbar scroll state */
.nav-scrolled {
    box-shadow: 0 1px 20px rgba(107, 26, 43, 0.08);
}

/* Service card subtle hover lift */
#services .group:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

#services .group {
    transition: transform 0.3s ease;
}

/* Gallery image hover */
#gallery .aspect-square {
    overflow: hidden;
}

/* Contact form focus styles */
#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: rgba(244, 168, 184, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

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

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

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

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d94f68;
    outline-offset: 2px;
    border-radius: 4px;
}
