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

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

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0d0d0d;
}
::-webkit-scrollbar-thumb {
    background: #2e2e2e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #d4a84b;
}

/* Selection */
::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #f5f5f5;
}

/* Navbar transitions */
nav.scrolled {
    background: rgba(13, 13, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

nav.scrolled .nav-link:hover {
    color: #e8c47a;
}

/* Hero parallax feel */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #141414, transparent);
    pointer-events: none;
}

/* Service card hover lift */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Testimonial card subtle glow */
.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

/* Gold shimmer on buttons */
button[type="submit"],
a[href="#contact"].bg-gold-500 {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before,
a[href="#contact"].bg-gold-500::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

button[type="submit"]:hover::before,
a[href="#contact"].bg-gold-500:hover::before {
    left: 100%;
}

/* Mobile menu animation */
#mobileMenu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal base state — visible by default for progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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.revealed {
    opacity: 0;
    transform: translateY(30px);
}

/* Only apply animation when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal.revealed {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.animated {
        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' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #e8c47a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.5rem;
        line-height: 1.15;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    #about .aspect-\[4\/5\] {
        aspect-ratio: 3/4;
    }
}

/* Print styles */
@media print {
    nav, #mobileMenuBtn, button, form {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
