/* Base & Typography */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #B5654E;
    color: #fefdfb;
}

/* Scroll Reveal Animations */
.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-active {
    opacity: 1;
    transform: translateY(0);
}

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

/* Service Card Hover */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Navbar */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(252, 250, 248, 0.97);
    box-shadow: 0 1px 20px rgba(90, 63, 48, 0.08);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #6d4c38;
}

/* Mobile Menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #B5654E;
    transition: width 0.3s ease;
}

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

/* Hamburger */
.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #6d4c38;
    transition: all 0.3s ease;
}

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

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

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

/* Smooth anchor offset */
section[id] {
    scroll-margin-top: 80px;
}

/* Image lazy loading quality */
img {
    loading: lazy;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #B5654E;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #B5654E;
}
