/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #faf5ff;
}
::-webkit-scrollbar-thumb {
  background: #d8b4fe;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a855f7;
}

/* Selection */
::selection {
  background: #c084fc;
  color: #3b0764;
}

/* Header transition */
header {
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.08);
}

/* Service card stagger animation */
.service-card {
  opacity: 1;
  transform: translateY(0);
}

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

.gallery-item img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile menu transitions */
#mobileMenu {
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

#mobileMenu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobileMenu:not(.hidden) {
  max-height: 400px;
  opacity: 1;
}

/* Mobile link hover */
.mobile-link {
  transition: padding-left 0.2s ease, color 0.2s ease;
}
.mobile-link:hover {
  padding-left: 8px;
  color: #7c3aed;
}

/* Hamburger animation */
#menuBtn.active .mobile-menu-span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .mobile-menu-span:nth-child(2) {
  opacity: 0;
}
#menuBtn.active .mobile-menu-span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Smooth scroll offset for fixed header */
[id] {
  scroll-margin-top: 80px;
}

/* 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;
  }
  .gallery-item img {
    transition: none;
  }
}
