/*
  ETECHTICS SOFTWARE SOLUTIONS — Services pages
  -------------------------------------------------
  Shared styles for the Services hub (/services/) and all 5 category
  pages. Deliberately self-contained (does not import home.css) so a
  Services page never loads homepage-only weight (hero graphic,
  cluster-grid, etc.) it doesn't use.

  Depends on css/tokens.css, css/base.css.
*/

/* ---------------------------------------------------------------
   Page hero (every Services page uses this same intro band)
   ------------------------------------------------------------
   Reworked for the Phase 11 design-consistency pass: the reference
   site's interior-page hero is a light, decorative band (soft
   radial color washes + thin geometric accent shapes) rather than a
   flat single-tone box. Recreated here with CSS gradients/shapes
   only — no new image assets — so it cascades to every page that
   already uses .service-hero (Services hub + 5 categories,
   Industries, Collaborative Models, About, Contact, Blog, and all 4
   protected pages) with zero markup changes.
--------------------------------------------------------------- */
.service-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 150, 0, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 92% 75%, rgba(31, 123, 217, 0.10) 0%, transparent 40%),
    var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-6);
}
.service-hero::before,
.service-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 2px solid rgba(0, 50, 102, 0.10);
}
.service-hero::before {
  top: 18%;
  right: 8%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.service-hero::after {
  bottom: 14%;
  right: 20%;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 150, 0, 0.30);
  transform: rotate(20deg);
}
.service-hero__eyebrow {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-blue-600);
  margin: 0 0 var(--space-2);
}
.service-hero h1 {
  position: relative;
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-tight);
  max-width: 26ch;
  margin-bottom: var(--space-2);
}
.service-hero__lede {
  position: relative;
  font-size: var(--font-size-md);
  color: var(--color-body-text);
  max-width: 60ch;
  margin-bottom: var(--space-3);
}
.service-hero__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------------------------------------------------------------
   Shared inline text-link style (used inside card copy)
--------------------------------------------------------------- */
.text-link {
  font-weight: var(--font-weight-semibold);
  color: var(--color-blue-600);
}

/* ---------------------------------------------------------------
   Section rhythm shared by every capability/service block
--------------------------------------------------------------- */
.service-block {
  padding-block: var(--space-6);
  scroll-margin-top: calc(var(--navbar-height) + var(--space-2));
}
.service-block:nth-of-type(even) {
  background: var(--color-surface-alt);
}
.service-block__head {
  max-width: 70ch;
  margin: 0 0 var(--space-4);
}
.service-block__head h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-1);
}
.service-block__head p {
  color: var(--color-muted);
  font-size: var(--font-size-md);
  margin: 0;
}

/* ---------------------------------------------------------------
   Item cards within a block (individual capability/service)
--------------------------------------------------------------- */
.service-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}
.service-item-card {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--accent-2);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.service-item-card::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 84px;
  height: 84px;
  background-image: radial-gradient(circle, rgba(16, 24, 40, 0.09) 1.3px, transparent 1.3px);
  background-size: 11px 11px;
  pointer-events: none;
}
.service-item-card:hover,
.service-item-card:focus-within {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.service-items .service-item-card:nth-of-type(5n+1) { border-top-color: var(--accent-1); }
.service-items .service-item-card:nth-of-type(5n+2) { border-top-color: var(--accent-2); }
.service-items .service-item-card:nth-of-type(5n+3) { border-top-color: var(--accent-3); }
.service-items .service-item-card:nth-of-type(5n+4) { border-top-color: var(--accent-4); }
.service-items .service-item-card:nth-of-type(5n+5) { border-top-color: var(--accent-5); }
.service-item-card h3 {
  position: relative;
  font-size: var(--font-size-md);
  margin-bottom: var(--space-1);
}
.service-item-card p {
  position: relative;
  color: var(--color-body-text);
  font-size: var(--font-size-sm);
  margin: 0;
}
.service-item-card .outcome {
  position: relative;
  display: block;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
  font-size: var(--font-size-xs);
  color: var(--color-muted);
}

/* A block on the surface-alt background needs white cards to keep
   the same card-on-surface contrast as the rest of the page. */
.service-block:nth-of-type(even) .service-item-card {
  background: var(--color-surface);
}

/* ---------------------------------------------------------------
   Hub-page category overview cards (a step up from the homepage's
   plainer service-card — includes a short capability list)
--------------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}
.category-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--accent-1);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.category-card::before {
  content: "";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 96px;
  height: 96px;
  background-image: radial-gradient(circle, rgba(16, 24, 40, 0.09) 1.3px, transparent 1.3px);
  background-size: 12px 12px;
  pointer-events: none;
}
.category-card:hover,
.category-card:focus-within {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-grid .category-card:nth-of-type(5n+1) { border-top-color: var(--accent-1); }
.category-grid .category-card:nth-of-type(5n+2) { border-top-color: var(--accent-2); }
.category-grid .category-card:nth-of-type(5n+3) { border-top-color: var(--accent-3); }
.category-grid .category-card:nth-of-type(5n+4) { border-top-color: var(--accent-4); }
.category-grid .category-card:nth-of-type(5n+5) { border-top-color: var(--accent-5); }
.category-card h2 {
  font-size: var(--font-size-lg);
  margin: 0;
}
.category-card h2 a {
  color: var(--color-navy);
}
.category-card > p {
  color: var(--color-body-text);
  font-size: var(--font-size-sm);
  margin: 0;
}
.category-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.category-card__list li {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  padding-left: 1rem;
  position: relative;
}
.category-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-orange);
}
.category-card__link {
  margin-top: auto;
  font-weight: var(--font-weight-semibold);
  color: var(--color-blue-600);
  font-size: var(--font-size-sm);
}

/* ---------------------------------------------------------------
   Related-services cross-linking block
--------------------------------------------------------------- */
.service-crosslinks {
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.service-crosslinks h2 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-3);
}
.crosslink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.crosslink-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), border-color var(--transition-fast), transform var(--transition-base);
}
.crosslink-card:hover,
.crosslink-card:focus-visible {
  border-color: var(--color-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.crosslink-card__label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}
.crosslink-card__title {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--color-navy);
  font-size: var(--font-size-md);
}

/* ---------------------------------------------------------------
   CTA band — a self-contained copy so Services pages never need to
   load home.css just for this one component (see file header).
--------------------------------------------------------------- */
.cta-band {
  background: var(--gradient-navy);
  color: #ffffff;
  text-align: center;
  padding-block: var(--space-6);
}
.cta-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.cta-band__heading {
  color: #ffffff;
  font-size: var(--font-size-xl);
  margin: 0;
}
.cta-band__sub {
  color: var(--color-footer-text-muted);
  margin: 0 0 var(--space-1);
}
.cta-band__btn {
  margin-top: var(--space-1);
}

/* ---------------------------------------------------------------
   Responsive
--------------------------------------------------------------- */
@media (max-width: 599px) {
  .service-hero h1 {
    max-width: none;
  }
}
