/* ========== BASE & RESET ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #B8583A;
  color: #fff;
}

/* ========== HEADER ========== */
#header {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#header.scrolled {
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(44, 36, 32, 0.08);
}

.nav-link {
  position: relative;
}

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

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

/* ========== HAMBURGER ========== */
#menuBtn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

#menuBtn.active .hamburger-line:nth-child(3) {
  width: 5px;
  transform: rotate(-45deg) translate(7px, -6px);
}

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

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

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

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

/* ========== SERVICE CARDS ========== */
.service-card {
  will-change: transform;
}

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

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

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

/* ========== FORM ========== */
input:focus,
select:focus,
textarea:focus {
  border-color: #B8583A !important;
  outline: none;
  box-shadow: 0 0 0 4px rgba(184, 88, 58, 0.1);
}

/* ========== COUNTER ANIMATION ========== */
.counter {
  display: inline-block;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
  .font-serif {
    word-spacing: -0.02em;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
