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

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

body {
    overflow-x: hidden;
}

/* Scroll Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    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-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Selection */
::selection {
    background: #7B3F8E;
    color: #fff;
}

::-moz-selection {
    background: #7B3F8E;
    color: #fff;
}

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

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

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

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

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

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

/* Mobile Menu Transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Navbar Transition */
#navbar.scrolled {
    background: rgba(37, 16, 41, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Gallery Image Hover */
.grid img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid img:hover {
    transform: scale(1.05);
}

/* Service Card Hover */
.bg-white.group:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Button Ripple Effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Print Styles */
@media print {
    nav, #mobile-menu-btn, .reveal-up {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
