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

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #fdf4f6;
}
::-webkit-scrollbar-thumb {
    background: #d4a0b5;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a1153e;
}

/* Selection */
::selection {
    background: #fce7eb;
    color: #3d0718;
}

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

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Menu lines animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(113, 23, 54, 0.08);
}

#navbar.scrolled .font-serif {
    color: #711736;
}

/* Scroll reveal base — visible by default, animated via JS progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card hover line animation */
.group:hover > .mt-6 {
    width: 100%;
}

/* Floating cards animation */
@keyframes float1 {
    0%, 100% { transform: rotate(2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-8px); }
}
@keyframes float2 {
    0%, 100% { transform: rotate(-1deg) translateY(0); }
    50% { transform: rotate(-1deg) translateY(-6px); }
}
@keyframes float3 {
    0%, 100% { transform: rotate(1deg) translateY(0); }
    50% { transform: rotate(1deg) translateY(-10px); }
}
@keyframes float4 {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-5px); }
}

.floating-card-1 { animation: float1 6s ease-in-out infinite; }
.floating-card-2 { animation: float2 5s ease-in-out infinite; }
.floating-card-3 { animation: float3 7s ease-in-out infinite; }
.floating-card-4 { animation: float4 5.5s ease-in-out infinite; }

/* Focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
}

button:focus-visible, a:focus-visible {
    outline: 2px solid #ffd654;
    outline-offset: 2px;
    border-radius: 9999px;
}
