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

body {
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF8F4;
}
::-webkit-scrollbar-thumb {
  background: #7B2D3B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a11d3b;
}

/* Selection */
::selection {
  background: #7B2D3B;
  color: white;
}

/* Navbar Transition States */
.nav-scrolled {
  background: rgba(253, 248, 244, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-scrolled .font-serif,
.nav-scrolled span[class*="text-burgundy-800"] {
  color: #7B2D3B !important;
}

.nav-scrolled .menu-line {
  background: #7B2D3B !important;
}

/* Mobile Menu */
.mobile-menu-open {
  transform: translateX(0) !important;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

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

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

/* Menu Button Animation */
.menu-active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-active .menu-line:nth-child(2) {
  opacity: 0;
}
.menu-active .menu-line:nth-child(3) {
  width: 24px;
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Service Cards */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #7B2D3B, #FFB8A8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* Testimonial Cards */
.testimonial-card {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(123, 45, 59, 0.2);
}

/* Form Inputs */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(123, 45, 59, 0.1);
}

/* Smooth image loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Scroll Reveal Animations (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

  .reveal.revealed {
    opacity: 1;
    transform: none;
  }

  .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; }
}

/* Hero parallax on scroll */
.hero-bg-accent {
  will-change: transform;
}

/* Gallery hover overlay */
.aspect-square, .aspect-\[4\/3\], .aspect-\[3\/4\] {
  position: relative;
}

/* Button focus ring */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.1;
  }
}
