/* ── Custom styles for JP & Sons Trading ── */

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

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #1B5E20;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Navigation ── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #1B5E20;
  border-radius: 1px;
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 60%;
}

/* ── Service Cards ── */
.service-card {
  transform: translateY(0);
}

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

/* ── Process Steps ── */
.process-step {
  position: relative;
}

/* ── Testimonial Cards ── */
.testimonial-card {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

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

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

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

/* ── Header shadow on scroll ── */
#site-header.scrolled {
  box-shadow: 0 1px 12px rgba(27, 94, 32, 0.08);
}

/* ── Mobile menu animation ── */
#mobile-menu {
  animation: slideDown 0.2s ease;
}

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

/* ── Form focus states ── */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.12);
}

/* ── Selection color ── */
::selection {
  background: #1B5E20;
  color: #F5F7F0;
}
