/* Base & utilities */
html {
  scroll-behavior: smooth;
}

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

::selection {
  background-color: #c084fc;
  color: #ffffff;
}

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(254, 252, 248, 0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(91, 33, 182, 0.08);
}

.nav-scrolled .nav-link {
  color: #5b21b6 !important;
}

.nav-scrolled .font-serif {
  color: #2e1065 !important;
}

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a855f7, #fbbf24);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

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

/* Gallery hover */
.gallery-item {
  position: relative;
  cursor: pointer;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(76, 29, 149, 0.3), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Scroll reveal (progressive enhancement) */
@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: 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; }
}

/* Mobile menu */
#mobileMenu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

/* Focus visible */
*:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

/* Smooth image loading */
img {
  loading: lazy;
  decoding: async;
}
