/* Reva's Rip & Sew — Custom Styles */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf8f6;
}
::-webkit-scrollbar-thumb {
  background: #b91d43;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #971537;
}

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

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

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

/* Navbar scroll state */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(62, 10, 22, 0.08);
}

.nav-scrolled .navbar-link {
  color: #7e1331 !important;
}

.nav-scrolled .navbar-link:hover {
  color: #b91d43 !important;
}

.nav-scrolled .nav-logo {
  color: #7e1331 !important;
}

/* Gallery hover */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

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

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Testimonial cards */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #b91d43, #e1987c);
  border-radius: 1rem 1rem 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimonial-card:hover::before {
  opacity: 1;
}

/* Button ripple effect */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::after {
  width: 300px;
  height: 300px;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(185, 29, 67, 0.15);
}

/* Fade in animation for scroll reveals */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in,
  .stagger-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .gallery-item img {
    transition: none;
  }
  .service-card::after {
    transition: none;
  }
}
