/* home-rich.css — dense B2B homepage helpers; extends service-pages.css visual system */

.home-matrix-block {
  margin-top: 28px;
}

.home-matrix-block + .home-matrix-block {
  margin-top: 36px;
}

.home-matrix-label {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}

.home-matrix {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.home-matrix a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 8px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  border: 1px solid var(--border-readable);
  border-radius: 8px;
  background: rgba(18, 64, 31, 0.55);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.home-matrix a:hover {
  border-color: rgba(0, 255, 65, 0.5);
  background: rgba(18, 64, 31, 0.85);
  color: #fff;
}

.home-matrix.home-matrix-specialty {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-matrix.home-matrix-specialty a {
  justify-content: flex-start;
  text-align: left;
  padding: 14px 16px;
  min-height: 64px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.home-matrix.home-matrix-specialty a span {
  display: block;
  color: var(--text-soft);
  font-weight: 500;
  font-size: 0.82rem;
}

.home-cap-table .service-table {
  min-width: 640px;
}

.home-cap-table .service-table td a {
  font-weight: 700;
}

.home-industry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.home-industry-grid a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 20px 18px;
  border: 1px solid var(--border-readable);
  border-radius: 8px;
  background: rgba(18, 64, 31, 0.45);
  transition: border-color 0.15s ease;
}

.home-industry-grid a:hover {
  border-color: rgba(0, 255, 65, 0.45);
}

.home-industry-grid h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.05rem;
}

.home-industry-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.home-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.home-resource-grid a {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 22px 20px;
  border: 1px solid var(--border-readable);
  border-radius: 8px;
  background: rgba(18, 64, 31, 0.45);
  height: 100%;
  transition: border-color 0.15s ease;
}

.home-resource-grid a:hover {
  border-color: rgba(0, 255, 65, 0.45);
}

.home-resource-kicker {
  display: block;
  color: var(--pcb-glow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.home-resource-grid h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.35;
}

.home-resource-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.home-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.home-process-grid .service-step {
  counter-increment: home-step;
}

.home-process-grid {
  counter-reset: home-step;
}

.home-path-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-path-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0;
  overflow: hidden;
}

.home-path-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.home-path-card h3,
.home-path-card p {
  padding-left: 24px;
  padding-right: 24px;
}

.home-path-card h3 {
  margin-top: 18px;
  color: #fff;
}

.home-path-card p {
  padding-bottom: 22px;
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.home-path-card:hover {
  border-color: rgba(0, 255, 65, 0.45);
}

.home-factory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.home-factory-large {
  grid-column: span 2;
  grid-row: span 2;
}

.home-factory-large img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

.home-factory-grid .service-inline-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.home-checklist-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.home-contact-line {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border-readable);
  border-radius: 8px;
  background: rgba(18, 64, 31, 0.4);
  color: var(--text-soft);
  line-height: 1.7;
}

.home-contact-line a {
  font-weight: 700;
}

.home-compare-table .service-table {
  min-width: 520px;
}

.home-section-lead {
  max-width: 860px;
}

@media (max-width: 1100px) {
  .home-matrix {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .home-matrix.home-matrix-specialty {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-industry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .home-matrix,
  .home-matrix.home-matrix-specialty {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-industry-grid,
  .home-resource-grid,
  .home-process-grid,
  .home-path-grid,
  .home-factory-grid,
  .home-checklist-split {
    grid-template-columns: 1fr 1fr;
  }
  .home-factory-large {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .home-matrix,
  .home-matrix.home-matrix-specialty,
  .home-industry-grid,
  .home-resource-grid,
  .home-process-grid,
  .home-path-grid,
  .home-factory-grid,
  .home-checklist-split {
    grid-template-columns: 1fr;
  }
  .home-factory-large {
    grid-column: auto;
  }
}

/* ========== Homepage hero + intro balance (scoped via body.home-rich) ==========
   Service pages keep shared .service-hero h1 at 3.45rem; homepage long H1 needs
   smaller type + image-weighted grid so copy and photo share visual weight. */

.home-rich .service-hero {
  padding: 80px 0 64px;
}

.home-rich .service-hero-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
}

.home-rich .service-kicker {
  margin-bottom: 12px;
}

.home-rich .service-hero h1 {
  font-size: 2.2rem;
  line-height: 1.18;
  margin-bottom: 14px;
  max-width: 18em;
}

.home-rich .service-lead {
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.home-rich .service-actions {
  gap: 10px;
  align-items: center;
}

.home-rich .service-primary,
.home-rich .service-secondary {
  padding: 12px 18px;
}

.home-rich .home-hero-text-link {
  display: inline-flex;
  align-items: center;
  color: #8ee2ff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 1px solid transparent;
}

.home-rich .home-hero-text-link:hover {
  color: #fff;
  border-bottom-color: rgba(142, 226, 255, 0.55);
}

.home-rich .service-tags {
  margin-top: 14px;
  gap: 8px;
}

.home-rich .service-tags span {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.home-rich .service-visual {
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.home-rich .service-visual img {
  aspect-ratio: 4 / 3;
  min-height: 360px;
  width: 100%;
  object-fit: cover;
  flex: 1 1 auto;
}

.home-rich .service-visual figcaption {
  padding: 12px 14px;
  font-size: 0.88rem;
}

/* Who XFPCB Is — equal columns, taller image frame */
.home-rich .home-who-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.home-rich .home-who-grid .service-inline-image img {
  aspect-ratio: 5 / 4;
  min-height: 300px;
  width: 100%;
  object-fit: cover;
}

@media (max-width: 980px) {
  .home-rich .service-hero-grid,
  .home-rich .home-who-grid {
    grid-template-columns: 1fr;
  }

  .home-rich .service-hero h1 {
    font-size: 1.7rem;
    max-width: none;
  }

  .home-rich .service-visual img,
  .home-rich .home-who-grid .service-inline-image img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .home-rich .home-hero-text-link {
    padding: 10px 0;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .home-rich .service-hero h1 {
    font-size: 2.05rem;
  }

  .home-rich .service-visual img {
    min-height: 320px;
  }
}