/* Custom styles for Digital Spark */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF8F3;
}
::-webkit-scrollbar-thumb {
  background: #d4d0c8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

/* Hero animations */
.hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-images {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease 0.2s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section reveal animations */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

/* Neighborhood card */
.neighborhood-card {
  position: relative;
}

.neighborhood-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.neighborhood-card:hover::after {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Navbar scroll effect */
nav.scrolled {
  background: rgba(253, 248, 243, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

nav.scrolled .menu-line {
  background: #44403c;
}

/* Mobile menu */
.mobile-menu-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* Hamburger animation */
.menu-line {
  transition: all 0.3s ease;
}

#mobileMenuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#mobileMenuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#mobileMenuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 20px;
}

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

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  color: #f9e0d4;
  line-height: 1;
  pointer-events: none;
}

/* Floating card animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.absolute.-bottom-6.-left-6 {
  animation: float 4s ease-in-out infinite;
}

/* Selection color */
::selection {
  background: #f3c4b0;
  color: #7a4232;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c67b5b;
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-images {
    margin-top: 2rem;
  }
  
  .absolute.-bottom-6.-left-6 {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 1rem;
    display: inline-block;
  }
  
  .absolute.-top-4.-right-4 {
    display: none;
  }
}

/* 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;
  }
  
  .section-reveal {
    opacity: 1;
    transform: none;
  }
}
