/* WJH Consulting: component styles (plain CSS, used alongside the Tailwind CDN) */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

:focus-visible {
  outline: 3px solid #8DB255;
  outline-offset: 3px;
  border-radius: 6px;
}

#main:focus, section[tabindex="-1"]:focus { outline: none; }

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background: #14232B;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

/* Navigation */
.nav-link {
  display: inline-flex;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #14232B;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: #F4F7F3; color: #1F5A4A; }

.mobile-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  color: #14232B;
}
.mobile-link:hover { background: #F4F7F3; }

/* Section headings */
.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1F5A4A;
}
.section-title {
  margin-top: 0.75rem;
  font-family: "Source Serif 4", Georgia, Cambria, serif;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #14232B;
}
@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; }
}

/* Service cards */
.service-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 35, 43, 0.05);
  border: 1px solid rgba(31, 90, 74, 0.1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.service-card:hover {
  box-shadow: 0 12px 30px -12px rgba(20, 35, 43, 0.2);
  transform: translateY(-2px);
}
@media (min-width: 640px) {
  .service-card { padding: 2rem; }
}
.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.875rem;
  background: #F4F7F3;
  color: #1F5A4A;
  box-shadow: inset 0 0 0 1px rgba(141, 178, 85, 0.45);
}
.service-icon svg { width: 1.75rem; height: 1.75rem; }
.service-title {
  margin-top: 1.25rem;
  font-family: "Source Serif 4", Georgia, Cambria, serif;
  font-size: 1.3125rem;
  line-height: 1.3;
  font-weight: 600;
  color: #14232B;
}
.service-text {
  margin-top: 0.75rem;
  line-height: 1.65;
  color: #52626A;
}
.service-list {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(31, 90, 74, 0.1);
  display: grid;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: #14232B;
}
.service-list li {
  position: relative;
  padding-left: 1.5rem;
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #8DB255;
}

/* Approach */
.approach-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #1F5A4A;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Footer */
.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer-link:hover { color: #fff; text-decoration-color: #8DB255; }

/* Legal modals */
.legal-modal {
  width: min(100% - 2rem, 46rem);
  max-height: 85vh;
  padding: 0;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  color: #14232B;
  box-shadow: 0 30px 60px -20px rgba(20, 35, 43, 0.45);
}
.legal-modal::backdrop {
  background: rgba(20, 35, 43, 0.6);
}
.legal-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}
.legal-modal-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(31, 90, 74, 0.12);
  background: #fff;
}
.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 0;
  background: #F4F7F3;
  color: #14232B;
  cursor: pointer;
}
.modal-close:hover { background: #e5ece3; }
.legal-body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.65;
  font-size: 0.9375rem;
}
.legal-body h3 {
  margin-top: 1.5rem;
  font-family: "Source Serif 4", Georgia, Cambria, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1F5A4A;
}
.legal-body p { margin-top: 0.5rem; color: #33434A; }
.legal-body a { color: #1F5A4A; text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: #174539; }

body.modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .service-card:hover { transform: none; }
}
