/* ===== Base & Typography ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: #7B2D3B;
  color: #fefdfb;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

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

#navbar.scrolled {
  background-color: rgba(254, 253, 251, 0.97);
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
  backdrop-filter: blur(10px);
}

#navbar.scrolled .font-serif,
#navbar.scrolled a:not(.bg-burgundy-800) {
  color: #37332f;
}

/* ===== Mobile Menu ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

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

.menu-line {
  display: block;
}

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

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

.menu-toggle.active .menu-line:nth-child(3) {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ===== Button & Link Focus ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

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

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

/* ===== Service Card Hover ===== */
.group:hover .group-hover\:bg-burgundy-800 {
  background-color: #7B2D3B;
}

/* ===== Smooth Image Loading ===== */
img {
  loading: lazy;
}
