/* home-rich.css 鈥?dense B2B homepage helpers; extends service-pages.css visual system */

.home-matrix-block {
  margin-top: 24px;
}

.home-matrix-block + .home-matrix-block {
  margin-top: 32px;
}

.home-matrix-label {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 14px;
}

.home-matrix {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.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: 600;
  font-size: 0.92rem;
  line-height: 1.3;
  border: 1px solid var(--border-readable);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.home-matrix a:hover {
  border-color: rgba(184, 115, 51, 0.4);
  background: #fafafa;
  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-matrix-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border-readable, #525252);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  max-width: none;
}

.home-matrix-note-list {
  margin: 0 0 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.home-matrix-note-cap {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.55;
}

.home-matrix-note-cap span {
  display: block;
  padding: 8px 10px;
  border-left: 3px solid #b87333;
  background: rgba(0, 0, 0, 0.18);
}

@media (max-width: 700px) {
  .home-matrix-note-cap {
    grid-template-columns: 1fr;
  }
}


.home-cap-table .service-table {
  min-width: 640px;
}

.home-cap-table .service-table td a {
  font-weight: 600;
}

/* Homepage Industries: give the card column more width than the intro column */
.home-rich .service-section.dark > .service-wrap.service-grid {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
}
/* Industries sit in a half-width service-grid column 鈥?2 cols (not 4) so
   card copy stays inside the grey-green background without overlapping. */
.home-industry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 16px;
  margin-top: 24px;
  align-items: stretch;
}

.home-industry-grid a {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  min-height: 128px;
  height: 100%;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  padding: 18px 16px;
  border: 1px solid var(--border-readable);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.15s ease;
}

.home-industry-grid a:hover {
  border-color: rgba(184, 115, 51, 0.35);
}

.home-industry-grid h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.home-industry-grid p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.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: #ffffff;
  height: 100%;
  transition: border-color 0.15s ease;
}

.home-resource-grid a:hover {
  border-color: rgba(184, 115, 51, 0.35);
}

.home-resource-kicker {
  display: block;
  color: #8a5520;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  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 {
  counter-reset: home-step;
}

.home-process-grid .service-step {
  counter-increment: none;
}

.home-process-grid .service-step::before {
  counter-increment: home-step;
  content: counter(home-step, decimal-leading-zero);
}

.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(184, 115, 51, 0.35);
}

.home-factory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.home-factory-large {
  grid-column: auto !important;
  grid-row: auto !important;
}

.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: #fafafa;
  color: var(--text-soft);
  line-height: 1.7;
}

.home-contact-line a {
  font-weight: 600;
}

.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(2, 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: auto !important;
  grid-row: auto !important;
}
}

@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 !important;
  grid-row: auto !important;
}
}

/* ========== Homepage hero balance (body.home-rich) ==========
   Short copy + image-led split so CTAs fit above the fold. */

.home-rich .service-hero.home-hero {
  padding: 20px 0 24px;
}

.home-rich .service-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 36px;
  align-items: start;
}

.home-rich .home-hero-copy .service-kicker {
  margin-bottom: 10px;
  color: #8a5520;
  font-size: 0.8125rem;
  font-weight: 500;
}

.home-rich .service-hero.home-hero h1 {
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2.05rem);
  line-height: 1.18;
  margin-bottom: 12px;
  max-width: 18em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.home-rich .service-hero.home-hero .service-lead {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 34em;
  color: #3f3f46;
}

.home-rich .service-hero.home-hero .service-actions {
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.home-rich .service-hero.home-hero .service-primary,
.home-rich .service-hero.home-hero .service-secondary {
  padding: 12px 18px;
}

.home-rich .home-hero-text-link {
  display: inline-flex;
  align-items: center;
  color: #8a5520;
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 1px solid transparent;
}

.home-rich .home-hero-text-link:hover {
  color: #6b4018;
  border-bottom-color: rgba(184, 115, 51, 0.55);
}

.home-rich .service-tags {
  display: none;
}

.home-rich .service-visual.home-hero-visual {
  position: relative;
  align-self: start;
  display: block;
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: none;
}

.home-rich .service-visual.home-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.home-rich .service-visual.home-hero-visual figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 12px;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #3f3f46;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid #e5e7eb;
}

.home-rich .service-visual figcaption {
  flex: 0 0 auto;
  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: 32px;
  align-items: stretch;
}

.home-rich .home-who-grid .service-inline-image {
  align-self: start;
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 0;
  background: #ffffff;
  border-color: #e2e8f0;
  overflow: hidden;
}

.home-rich .home-who-grid .service-inline-image img {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  max-height: 320px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.home-rich .home-who-grid .service-inline-image figcaption {
  background: #ffffff;
  color: #334155;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.home-rich .home-who-address {
  margin: 18px 0 0;
  max-width: none;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.65;
}

.home-rich .home-who-address a {
  font-weight: 600;
}


@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 {
    height: auto;
    max-height: none;
  }

  .home-rich .service-visual.home-hero-visual img {
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 10;
    flex: 0 0 auto;
  }
  .home-rich .home-who-grid .service-inline-image img {
    min-height: 0;
    max-height: 320px;
    aspect-ratio: 16 / 10;
    flex: 0 0 auto;
  }
  .home-rich .service-hero.home-hero {
    padding: 28px 0 24px;
  }
  .home-rich .service-hero.home-hero h1 {
    font-size: 1.65rem;
    max-width: none;
  }

  .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.home-hero-visual img {
    min-height: 0;
    max-height: none;
  }
}

/* Keep industry card titles readable on grey-green card bg under light.css */
.home-rich .home-industry-grid h3 {
  color: #171717 !important;
}
.home-rich .home-industry-grid p {
  color: #dbe7df !important;
}

/* ========== QC section: side-by-side media cards (balance left copy) ========== */
.home-rich .home-qc-grid {
  align-items: stretch;
  gap: 28px;
}

.home-rich .home-qc-grid > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home-rich .home-qc-media,
.home-rich .home-qc-grid > div:last-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  align-self: stretch;
}

.home-rich .home-qc-grid > div:last-child > .service-inline-image {
  margin-top: 0 !important;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-rich .home-qc-grid > div:last-child > .service-inline-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 200px;
  object-fit: cover;
  object-position: center;
}

.home-rich .home-qc-grid > div:last-child > .service-inline-image figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
  flex: 1 1 auto;
}

.home-rich .home-qc-grid > div:last-child > p {
  grid-column: 1 / -1;
  margin-top: 4px !important;
}

@media (max-width: 980px) {
  .home-rich .home-qc-grid > div:last-child {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .home-rich .home-qc-grid > div:last-child {
    grid-template-columns: 1fr;
  }

  .home-rich .home-qc-grid > div:last-child > .service-inline-image img {
    max-height: 240px;
  }
}

/* ========== Industries: cap left decorative graphic so cards aren't dwarfed ========== */
.home-rich .home-industries > .service-wrap.service-grid {
  align-items: start;
}

.home-rich .home-industries > .service-wrap.service-grid > div:first-child .service-inline-image {
  margin-top: 16px !important;
}

.home-rich .home-industries > .service-wrap.service-grid > div:first-child .service-inline-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  object-fit: cover;
  object-position: center;
}

.home-rich .home-industries > .service-wrap.service-grid > div:first-child .service-inline-image figcaption {
  padding: 10px 12px;
  font-size: 0.85rem;
}

/* ========== Bright hero image 鈥?no dark left vignette/overlay ========== */
.home-rich .service-visual {
  position: relative;
  background: #f8fafc;
}

.home-rich .service-visual::before,
.home-rich .service-visual::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
}

.home-rich .service-visual img {
  filter: none !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  object-position: center center;
}

/* Prevent section dark grid wash from reading as a left vignette on the photo */
.home-rich .service-hero {
  background: #ffffff !important;
  background-image: none !important;
}

/* Who photo card: kill residual dark surface under/around caption */
.home-rich .home-who .service-inline-image,
.home-rich.home-rich .home-who-grid > .service-inline-image {
  background: #ffffff !important;
  border-color: #525252 !important;
}
.home-rich .home-who .service-inline-image figcaption,
.home-rich .home-who-grid .service-inline-image figcaption {
  background: #ffffff !important;
  color: #334155 !important;
}


/* Credibility: certificates gallery — A4 portrait, full cert visible */
#certificates .cred-cert-grid,
section#certificates .cred-cert-grid,
.cred-cert-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  margin-top: 22px !important;
  align-items: start !important;
  width: 100% !important;
}
#certificates .cred-cert-card,
section#certificates .cred-cert-card,
.cred-cert-card {
  margin: 0 !important;
  padding: 10px !important;
  border: 1px solid #d6d3d1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  width: auto !important;
  height: auto !important;
}
#certificates .cred-cert-card > a,
section#certificates .cred-cert-card > a,
.cred-cert-card > a {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 210 / 297 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  border-radius: 4px !important;
  background: #f5f5f4 !important;
  flex: 0 0 auto !important;
}
#certificates .cred-cert-card img,
section#certificates .cred-cert-card img,
.cred-cert-card img,
#certificates .cred-cert-card > a > img,
.cred-cert-card > a > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center top !important;
  display: block !important;
  margin: 0 !important;
}
#certificates .cred-cert-card figcaption,
.cred-cert-card figcaption {
  margin-top: 10px !important;
  text-align: center !important;
  color: #1f2937 !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
}
.cred-cert-note {
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--text-soft, #4b5563);
}
.cred-subhead {
  margin: 28px 0 0;
  font-size: 1.15rem;
  font-weight: 600;
}
.bg-darker .cred-subhead { color: #fff; }
.container .cred-subhead { color: #111827; }
.about-factory-grid { margin-top: 8px; }
@media (max-width: 980px) {
  #certificates .cred-cert-grid,
  .cred-cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px) {
  #certificates .cred-cert-grid,
  .cred-cert-grid {
    grid-template-columns: 1fr !important;
  }
}

/* uniform-override mirrored in credibility.css */
#factory-photos .home-factory-large { grid-column: auto !important; grid-row: auto !important; }


/* hero-fold-20261109-landscape */
.home-rich .service-hero.home-hero {
  padding: 20px 0 24px !important;
}
.home-rich .service-hero.home-hero .service-hero-grid,
.home-rich .service-hero-grid {
  align-items: start !important;
}
.home-rich .service-visual.home-hero-visual {
  align-self: start !important;
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 300px !important;
  overflow: hidden !important;
  height: auto !important;
}
.home-rich .service-visual.home-hero-visual img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center 28% !important;
}
