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

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

body {
  margin: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  background-color: rgba(123, 30, 46, 0.2);
  color: inherit;
}

/* ========== NAVBAR SCROLL EFFECTS ========== */
#navbar {
  background: transparent;
  transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
  background: rgba(58, 10, 17, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .font-accent {
  color: #fefcfb;
}

/* ========== SERVICE CARDS ========== */
.service-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

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

/* ========== GALLERY ========== */
.gallery-item {
  cursor: pointer;
  transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover {
  box-shadow: 0 20px 60px rgba(123, 30, 46, 0.2);
  transform: translateY(-4px);
}

/* ========== TESTIMONIAL CARDS ========== */
.testimonial-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(123, 30, 46, 0.12);
}

/* ========== MOBILE LINKS ========== */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ========== MENU ANIMATION ========== */
#menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

/* ========== BACK TO TOP ========== */
#back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

#back-to-top:not(.visible) {
  transform: translateY(1rem);
}

/* ========== FORM FOCUS STATES ========== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(123, 30, 46, 0.15);
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

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

/* ========== FOCUS VISIBLE ========== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #c7273c;
  outline-offset: 2px;
  border-radius: 4px;
}
