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

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

body {
    overflow-x: hidden;
}

/* ===== Hero Clip ===== */
.clip-hero-right {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* ===== Navbar ===== */
.navbar-text {
    transition: color 0.4s ease;
}

.navbar-accent {
    transition: color 0.4s ease;
}

.navbar-logo {
    transition: fill 0.4s ease, stroke 0.4s ease;
}

/* Light navbar on light hero */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar.scrolled .navbar-text {
    color: #2a0c11;
}

#navbar.scrolled .navbar-accent {
    color: #96540c;
}

/* ===== Mobile Menu ===== */
.menu-line {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    background-color: #7B2D3B;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-line.top {
    top: 10px;
}

.menu-line.middle {
    top: 17px;
}

.menu-line.bottom {
    top: 24px;
}

#menu-btn.active .menu-line.top {
    top: 17px;
    transform: translateX(-50%) rotate(45deg);
}

#menu-btn.active .menu-line.middle {
    opacity: 0;
}

#menu-btn.active .menu-line.bottom {
    top: 17px;
    transform: translateX(-50%) rotate(-45deg);
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* ===== Nav Links ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d4871a;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2D3B, #d4871a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

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

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

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

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

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Form ===== */
select option:first-child {
    color: #d4b8c4;
}

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

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

::-webkit-scrollbar-thumb {
    background: #be92bf;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* ===== Selection ===== */
::selection {
    background: #d6bed9;
    color: #2a0c11;
}

/* ===== Responsive ===== */
@media (max-width: 767px) {
    .clip-hero-right {
        clip-path: polygon(0% 0, 100% 0, 100% 100%, 0% 100%);
        opacity: 0.3;
    }
    
    .gallery-item {
        min-height: 200px;
    }
    
    .gallery-item.col-span-2 {
        min-height: 280px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .clip-hero-right {
        clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    }
}
