/* === Base Reset & Global === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #E8D5BC;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #12100E;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

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

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

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.5), transparent);
}

/* === Fade-in Animations (progressive enhancement) === */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-hidden {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Only apply animation for users who prefer motion */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .fade-in-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Navbar Transition === */
.nav-scrolled {
    background: rgba(18, 16, 14, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.nav-scrolled #navbar {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* === Mobile Menu Transitions === */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    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; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* === Menu Button Animation === */
.menu-line {
    display: block;
    width: 24px;
    height: 1px;
    background-color: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

/* === Form Focus States === */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(201, 168, 76, 0.5) !important;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.1);
}

/* === Button Hover Effects === */
button:hover,
a:hover {
    cursor: pointer;
}

/* === Image Loading === */
img {
    display: block;
    max-width: 100%;
}

/* === Responsive Typography === */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* === Print Styles === */
@media print {
    nav, #contactForm, .service-card {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
