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

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

body {
    overflow-x: hidden;
}

/* === Navigation === */
#nav {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#nav.scrolled {
    background-color: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(42, 26, 18, 0.08);
}

.nav-logo {
    transition: color 0.3s ease;
}

#nav.scrolled .nav-logo {
    color: #2a1a12;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #cc401f;
    transition: width 0.3s ease;
}

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

#nav.scrolled .nav-link {
    color: #4f3520;
}

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

#nav.scrolled .nav-link::after {
    background: #cc401f;
}

/* Mobile menu */
#menuBtn {
    position: relative;
}

.menu-line {
    transform-origin: center;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 1.5rem;
}

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

.mobile-link {
    transition: color 0.3s ease;
}

/* === Hero Stat Cards === */
.stat-card {
    animation: float 4s ease-in-out infinite;
}

.stat-card:nth-child(2) {
    animation-delay: -1s;
}

.stat-card:nth-child(3) {
    animation-delay: -2s;
}

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

/* === Service Cards === */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
}

/* === Gallery === */
.gallery-item {
    overflow: hidden;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(42, 26, 18, 0);
    transition: background 0.3s ease;
}

.gallery-item:hover::after {
    background: rgba(42, 26, 18, 0.15);
}

/* === Review Cards === */
.review-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.review-card:hover {
    transform: translateY(-4px);
}

/* === 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: reduce) {
    .stat-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        transition: none;
    }
    
    .gallery-item img,
    .service-card img {
        transition: none;
    }
}

/* === Selection === */
::selection {
    background: #cc401f;
    color: #fefcf8;
}
