/* ─── CUSTOM PROPERTIES ─── */
:root {
    --terra-50: #FBF5F0;
    --terra-100: #F5E6D8;
    --terra-200: #EBCCB0;
    --terra-300: #DFA882;
    --terra-400: #D4875A;
    --terra-500: #C46A3A;
    --terra-600: #B5651D;
    --terra-700: #8C4D18;
    --terra-800: #663914;
    --terra-900: #44250E;
    --sand-50: #FDFBF7;
    --sand-100: #FAF5EC;
    --sand-200: #F3E8D1;
    --sand-300: #EAD5AB;
    --sand-400: #DFBF82;
    --sand-500: #D4A960;
    --sand-600: #BF904A;
    --sand-700: #9E723D;
    --sand-800: #7A5533;
    --sand-900: #553A25;
}

/* ─── BASE ─── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: var(--terra-600);
    color: white;
}

/* ─── NAV ─── */
#nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(253, 251, 247, 0.85);
    border-bottom: 1px solid rgba(181, 101, 29, 0.08);
}

#nav.scrolled {
    background: rgba(253, 251, 247, 0.95);
    box-shadow: 0 4px 30px rgba(68, 37, 14, 0.06);
}

.nav-link {
    position: relative;
    color: var(--terra-900);
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--terra-600);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ─── MOBILE MENU ─── */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

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

/* ─── HERO ─── */
.clip-diagonal {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 40% 100%);
}

.clip-diagonal-reverse {
    clip-path: polygon(0 0, 60% 0, 100% 100%, 0 100%);
}

/* ─── SERVICE CARDS ─── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--terra-600) 0%, var(--terra-700) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card > * {
    position: relative;
    z-index: 1;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(68, 37, 14, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

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

/* ─── SCROLL ANIMATIONS ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

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

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    .reveal-hidden {
        opacity: 1;
        transform: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ─── FORM ─── */
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='%23B5651D' stroke-width='2.5' 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;
}

/* ─── UTILITY ─── */
@media (max-width: 767px) {
    .clip-diagonal,
    .clip-diagonal-reverse {
        clip-path: none;
    }
}
