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

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

body {
    overflow-x: hidden;
}

/* Navbar scroll state */
header.scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(83, 43, 65, 0.08);
}

header.scrolled .font-serif,
header.scrolled .nav-link,
header.scrolled #menu-toggle {
    color: #532b41 !important;
}

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

.mobile-menu.active body {
    overflow: hidden;
}

/* Stat cards */
.stat-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(83, 43, 65, 0.15) !important;
}

/* Service cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
}

/* Process cards */
.process-card {
    transition: transform 0.4s ease;
}

.process-card:hover {
    transform: translateY(-4px);
}

.process-card:hover .w-20 {
    border-color: #f59e0b;
    background: #fffbeb;
}

.process-card:hover .font-serif {
    color: #f59e0b;
}

/* Gallery */
.gallery-item {
    position: relative;
}

/* Scroll reveal - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

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

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

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

/* Selection */
::selection {
    background: #eadde6;
    color: #532b41;
}

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

/* Form select styling */
select {
    background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"%3E%3Cpath fill="%238f5272" d="M6 8L1 3h10z"/%3E%3C/svg%3E');
}

/* Smooth image loading */
img {
    image-rendering: auto;
}

/* Mobile menu overlay */
body.menu-open {
    overflow: hidden;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.stat-card:nth-child(1) {
    animation: float 4s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation: float 4s ease-in-out infinite 0.5s;
}

.stat-card:nth-child(3) {
    animation: float 4s ease-in-out infinite 1s;
}

@media (prefers-reduced-motion: reduce) {
    .stat-card {
        animation: none;
    }
}
