/* ============================================
   Strattons Handyman Service — Custom Styles
   ============================================ */

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

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

::selection {
  background-color: #ffb347;
  color: #3a0f28;
}

/* --- Floating animations for hero stat cards --- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes float-delayed {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float-delayed 5s ease-in-out infinite;
  animation-delay: 1.5s;
}

/* --- Scroll reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.visible {
    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; }
}

/* --- Nav scroll state --- */
.nav-scrolled {
  box-shadow: 0 4px 30px rgba(58, 15, 40, 0.3);
}

/* --- Service card hover glow --- */
.service-card:hover {
  border-color: rgba(212, 97, 168, 0.3);
  box-shadow: 0 20px 40px rgba(58, 15, 40, 0.08);
}

/* --- Project card image container --- */
.project-card img {
  will-change: transform;
}

/* --- Testimonial card --- */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

/* --- Button ripple effect --- */
button, a {
  -webkit-tap-highlight-color: transparent;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: #b83d85;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #972d6a;
}

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

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

/* --- 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;
  }
}
