/* ========================================
   Hillsdale Tool – Custom Styles
   ======================================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
  background: #7B2D3B;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #5c1f2b;
}

/* Header scroll state */
#site-header.scrolled {
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* Service card hover lift */
.service-card {
  transform: translateY(0);
}
.service-card:hover {
  transform: translateY(-4px);
}

/* Mobile menu transitions */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}
#mobile-menu.hidden {
  animation: none;
}

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

/* Scroll-reveal base state (visible by default — progressive enhancement) */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Scroll-reveal hidden state (applied via JS only) */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
  }
  .scroll-reveal.revealed.animate {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nav link underline animation */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #7B2D3B;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after {
  width: 60%;
}

/* Mobile nav link */
.mobile-nav-link {
  display: block;
}

/* Hero text animation (CSS only, no JS dependency for visibility) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content > * {
  animation: fadeInUp 0.8s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .service-card:hover {
    transform: none;
  }
  .hero-content > * {
    animation: none;
  }
}
