/* Base & Typography */
@layer base {
    html {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    body {
        letter-spacing: 0.01em;
    }
    
    ::selection {
        background-color: rgba(158, 68, 94, 0.15);
        color: #5c2635;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #d9a8be;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9e445e;
}

/* Floating Card Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
    animation-duration: 4.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
    animation-duration: 3.8s;
}

/* Service Card Hover Effect */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* Gallery Item Hover */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(92, 38, 53, 0);
    transition: background 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(92, 38, 53, 0.1);
}

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

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

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

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(250, 245, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(158, 68, 94, 0.1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
}

/* Scroll reveal (progressive enhancement - JS adds class) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(24px);
}

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

/* Select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%239e445e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}
