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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 149, 46, 0.3);
    color: #f1f5f9;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0f1e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4a853, #b8860b);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #e0b863, #c9952e);
}

/* Preloader */
#preloader {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Header */
#site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

#mobile-menu.active .mobile-nav-link {
    animation: slideIn 0.4s ease forwards;
    opacity: 0;
}

#mobile-menu.active .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.active .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Menu lines animation */
#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Floating cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -2s; }
.card-3 { animation-delay: -4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a853, transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 30, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 8rem;
    font-family: 'Playfair Display', serif;
    color: rgba(212, 168, 83, 0.06);
    line-height: 1;
    pointer-events: none;
}

/* Reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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