/* Home #products — engineered blueprint product card (index only) */

body.page-home .home-products-blueprint {
  --hpb-chamfer: 80px;
  --hpb-line: color-mix(in srgb, var(--text-muted) 38%, var(--white));
  --hpb-card-pad-top: 80px;
  --hpb-card-pad-inline: 64px;
  --hpb-card-pad-bottom: 120px;
  --hpb-progress-drop: 20px;
  --hpb-card-edge-right: 0px;
  --hpb-card-inset-right: 10px;
  --hpb-wrap-pad-left: 0px;
  --hpb-wrap-pad-right: 0px;
  --hpb-bleed-left: calc(max(0px, (100vw - var(--container)) / 2));
  --hpb-auto-ms: 6000ms;
  --hpb-nav-h: 32px;
  --hpb-arrows-band: 168px;
  --hpb-gap: clamp(20px, 3vw, 40px);
  position: relative;
  isolation: isolate;
  background: linear-gradient(
    90deg,
    var(--white) 0%,
    var(--white) 60%,
    var(--navy-soft) 60%,
    var(--navy-soft) 100%
  );
  padding: var(--section-pad-y) 0;
  color: var(--text-main);
}

/* Paper on the right, continuing the industry text block’s diagonal. */
body.page-home .home-products-blueprint[style*="--hm-diag-x0"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--white);
  clip-path: polygon(
    var(--hm-diag-x0) 0,
    100% 0,
    100% 100%,
    var(--hm-diag-x1) 100%
  );
}

body.page-home .home-products-blueprint > .wrap {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  overflow: visible;
}

body.page-home .home-products-blueprint .hpb-header {
  margin-bottom: clamp(20px, 3vh, 40px);
}

body.page-home .home-products-blueprint .hpb-nav {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  z-index: 11;
  width: calc(100% + max(0px, 50vw - 50% - var(--hpb-card-edge-right)));
  margin-right: calc(50% - 50vw + var(--hpb-card-edge-right));
  margin-left: 0;
  min-height: var(--hpb-nav-h);
  padding-right: 0;
  box-sizing: border-box;
}

body.page-home .home-products-blueprint .hpb-nav__line {
  display: none;
}

body.page-home .home-products-blueprint .hpb-nav__arrows {
  display: flex;
  gap: 32px;
  padding: 0;
}

body.page-home .home-products-blueprint .hpb-arrow {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: transform 0.3s ease, color 0.3s ease;
}

body.page-home .home-products-blueprint .hpb-arrow:hover {
  color: var(--text-main);
}

body.page-home .home-products-blueprint .hpb-arrow--prev:hover {
  transform: translateX(-6px);
}

body.page-home .home-products-blueprint .hpb-arrow--next:hover {
  transform: translateX(6px);
}

body.page-home .home-products-blueprint .hpb-arrow svg {
  width: 56px;
  height: 24px;
  stroke-width: 1.5px;
}

body.page-home .home-products-blueprint .hpb-card-shell {
  position: relative;
  width: calc(
    100% + max(0px, 50vw - 50% - var(--hpb-card-edge-right)) - var(--hpb-card-inset-right)
  );
  margin-right: calc(50% - 50vw + var(--hpb-card-edge-right) + var(--hpb-card-inset-right));
  margin-top: calc(var(--hpb-nav-h) / -2);
  padding-bottom: calc(var(--hpb-progress-drop) + 12px);
  box-sizing: border-box;
}

/* Bottom rule: viewport left → card right edge */
body.page-home .home-products-blueprint .hpb-card-shell::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--hpb-bleed-left));
  width: calc(100% + var(--hpb-bleed-left));
  right: auto;
  bottom: calc(var(--hpb-progress-drop) + 12px);
  height: 1px;
  background: var(--hpb-line);
  pointer-events: none;
  z-index: 6;
}

/* Wide: card + nav share the same horizontal box as #sectors > .wrap (no viewport bleed) */
@media (min-width: 1025px) {
  body.page-home .home-products-blueprint {
    --hpb-card-inset-right: 0px;
  }

  body.page-home .home-products-blueprint .hpb-nav {
    width: calc(100% + var(--hpb-wrap-pad-left) + var(--hpb-wrap-pad-right));
    margin-left: calc(-1 * var(--hpb-wrap-pad-left));
    margin-right: calc(-1 * var(--hpb-wrap-pad-right));
  }

  body.page-home .home-products-blueprint .hpb-card-shell {
    width: calc(100% + var(--hpb-wrap-pad-left) + var(--hpb-wrap-pad-right));
    margin-left: calc(-1 * var(--hpb-wrap-pad-left));
    margin-right: calc(-1 * var(--hpb-wrap-pad-right));
  }

  body.page-home .home-products-blueprint .hpb-card-shell::before {
    left: 0;
    width: 100%;
  }

  /* Match #sectors .hm-showcase column widths (40 / 60 + gap on wrap width). */
  body.page-home .home-products-blueprint .hpb-slides {
    margin-inline: calc(-1 * var(--hpb-card-pad-inline));
    width: calc(100% + 2 * var(--hpb-card-pad-inline));
  }

  body.page-home .home-products-blueprint .hpb-slide {
    grid-template-columns:
      minmax(0, calc((100cqi - var(--hpb-gap)) * 0.4))
      minmax(0, calc((100cqi - var(--hpb-gap)) * 0.6));
    gap: var(--hpb-gap);
  }

  body.page-home .home-products-blueprint .hpb-slide__left {
    padding: 48px;
  }

  body.page-home .home-products-blueprint .hpb-slide__right {
    padding-left: 32px;
    padding-right: var(--hpb-card-pad-inline);
  }

  /* Navy band starts at .hpb-slide__left (synced in home-markets.js). */
  body.page-home .home-products-blueprint[style*="--hpb-navy-start"] {
    background: linear-gradient(
      90deg,
      var(--white) 0,
      var(--white) var(--hpb-navy-start),
      var(--navy-soft) var(--hpb-navy-start),
      var(--navy-soft) 100%
    );
  }

  body.page-home .home-products-blueprint .hpb-card {
    --hpb-col-split-fallback: calc((100cqi - var(--hpb-gap)) * 0.4 + var(--hpb-gap));
    background:
      linear-gradient(var(--hpb-line), var(--hpb-line)) right top / calc(100% - var(--hpb-arrows-band)) 1px no-repeat,
      linear-gradient(
        90deg,
        var(--white) 0,
        var(--white) var(--hpb-col-split, var(--hpb-col-split-fallback)),
        var(--navy-soft) var(--hpb-col-split, var(--hpb-col-split-fallback))
      );
  }

}

body.page-home .home-products-blueprint .hpb-card {
  position: relative;
  border-top: none;
  background:
    linear-gradient(var(--hpb-line), var(--hpb-line)) right top / calc(100% - var(--hpb-arrows-band)) 1px no-repeat,
    var(--white);
  padding: var(--hpb-card-pad-top) var(--hpb-card-pad-inline) var(--hpb-card-pad-bottom);
  box-shadow:
    14px 32px 52px color-mix(in srgb, var(--black-void) 6%, transparent),
    6px 14px 28px color-mix(in srgb, var(--black-void) 3%, transparent);
  clip-path: polygon(
    0 0,
    calc(100% - var(--hpb-chamfer)) 0,
    100% var(--hpb-chamfer),
    100% 100%,
    0 100%
  );
}

body.page-home .home-products-blueprint .hpb-card::before {
  content: "";
  position: absolute;
  top: calc(var(--hpb-chamfer) * 0.4875);
  right: -16px;
  left: auto;
  width: calc(var(--hpb-chamfer) * 1.425);
  height: 1px;
  background: var(--hpb-line);
  transform: rotate(45deg);
  z-index: 5;
  pointer-events: none;
}

body.page-home .home-products-blueprint .hpb-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: none;
  border-right: 1px solid var(--hpb-line);
  border-bottom: none;
  clip-path: polygon(0 0, calc(100% - var(--hpb-chamfer)) 0, 100% var(--hpb-chamfer), 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 5;
}

body.page-home .home-products-blueprint .hpb-slides {
  position: relative;
  z-index: 10;
  min-height: 280px;
}

body.page-home .home-products-blueprint .hpb-slide {
  display: none;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--hpb-gap);
  animation: hpb-fade 0.45s ease;
}

body.page-home .home-products-blueprint .hpb-slide.is-active {
  display: grid;
}

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

body.page-home .home-products-blueprint .hpb-slide__left {
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

body.page-home .home-products-blueprint .hpb-desc {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}

body.page-home .home-products-blueprint .hpb-slide__left .hpb-desc {
  color: var(--text-main);
}

body.page-home .home-products-blueprint .hpb-desc:last-child {
  margin-bottom: 0;
}

body.page-home .home-products-blueprint .hpb-slide__right {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  justify-content: center;
  position: relative;
  margin-top: 2px;
}

body.page-home .home-products-blueprint .hpb-slide__icon {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
  background: none;
  border: none;
  color: var(--cyan-primary);
  font-size: 28px;
  line-height: 1;
}

body.page-home .home-products-blueprint .hpb-slide__icon svg {
  display: block;
  width: 1em;
  height: 1em;
}

body.page-home .home-products-blueprint .hpb-globe {
  position: absolute;
  top: 50%;
  right: 6%;
  left: auto;
  transform: translateY(calc(-50% - 14px));
  width: 320px;
  height: 320px;
  max-width: 55%;
  object-fit: contain;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

body.page-home .home-products-blueprint .hpb-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 4.5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 40px;
  padding-block: 0.04em 0.14em;
  max-width: 100%;
  background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--blue-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

body.page-home .home-products-blueprint .hpb-slide__right .btn-primary.industrial-btn {
  background: var(--blue-navy);
  background-image: none;
  border: 1px solid var(--blue-navy);
  color: var(--white);
  box-shadow: none !important;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

body.page-home .home-products-blueprint .hpb-slide__right .btn-primary.industrial-btn:hover {
  background: var(--cyan-primary);
  border-color: var(--cyan-primary);
  color: var(--black-void);
  box-shadow: none !important;
  transform: translateY(-2px);
}

body.page-home .home-products-blueprint .hpb-slide__right .btn {
  text-decoration: none;
}

body.page-home .home-products-blueprint .hpb-slide__right .btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body.page-home .home-products-blueprint .hpb-progress {
  position: absolute;
  bottom: 0;
  right: var(--hpb-card-pad-inline);
  left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(280px, 42%);
  min-width: 200px;
  z-index: 20;
}

body.page-home .home-products-blueprint .hpb-dash {
  flex: 1 1 0;
  min-width: 0;
  min-height: 20px;
  padding: 8px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
}

body.page-home .home-products-blueprint .hpb-dash__track {
  display: block;
  position: relative;
  width: 100%;
  height: 3px;
  background: var(--hpb-line);
  overflow: hidden;
}

body.page-home .home-products-blueprint .hpb-dash__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan-primary);
  transform-origin: left center;
}

body.page-home .home-products-blueprint .hpb-dash.is-complete .hpb-dash__fill {
  width: 100%;
}

body.page-home .home-products-blueprint .hpb-dash.is-active .hpb-dash__fill {
  animation: hpb-dash-fill var(--hpb-auto-ms) linear forwards;
}

body.page-home .home-products-blueprint .hpb-dash:hover .hpb-dash__track {
  background: color-mix(in srgb, var(--text-muted) 35%, var(--white));
}

body.page-home .home-products-blueprint .hpb-dash:focus-visible {
  outline: 2px solid var(--cyan-primary);
  outline-offset: 4px;
}

@keyframes hpb-dash-fill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-home .home-products-blueprint .hpb-dash.is-active .hpb-dash__fill {
    animation: none;
    width: 100%;
  }
}

@media (max-width: 1024px) {
  body.page-home .home-products-blueprint .hpb-slide.is-active {
    grid-template-columns: 1fr;
    gap: 64px;
  }

  body.page-home .home-products-blueprint .hpb-slide__left {
    order: 2;
    padding-left: 0;
    padding-bottom: 40px;
  }

  body.page-home .home-products-blueprint .hpb-slide__right {
    order: 1;
    align-items: flex-start;
    text-align: left;
  }

  body.page-home .home-products-blueprint .hpb-globe {
    right: 0;
    left: auto;
    transform: translateY(calc(-50% - 10px));
    width: 240px;
    height: 240px;
  }
}

@media (max-width: 640px) {
  body.page-home .home-products-blueprint {
    --hpb-chamfer: 0px;
  }

  body.page-home .home-products-blueprint .hpb-nav {
    width: calc(100% + max(0px, 50vw - 50% - var(--hpb-card-edge-right)));
    margin-right: calc(50% - 50vw + var(--hpb-card-edge-right));
    padding-right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  body.page-home .home-products-blueprint .hpb-card-shell {
    margin-top: 0;
  }

  body.page-home .home-products-blueprint .hpb-nav__line {
    display: none;
  }

  body.page-home .home-products-blueprint .hpb-nav__arrows {
    padding-left: 0;
  }

  body.page-home .home-products-blueprint {
    --hpb-card-pad-top: 40px;
    --hpb-card-pad-inline: var(--section-pad-x);
    --hpb-card-pad-bottom: 72px;
    --hpb-progress-drop: 14px;
  }

  body.page-home .home-products-blueprint .hpb-card {
    padding: var(--hpb-card-pad-top) var(--hpb-card-pad-inline) var(--hpb-card-pad-bottom);
    clip-path: none;
    border-top: none;
    background: var(--white);
    box-shadow:
      10px 22px 40px color-mix(in srgb, var(--black-void) 5%, transparent);
  }

  body.page-home .home-products-blueprint .hpb-card::before {
    display: none;
  }

  body.page-home .home-products-blueprint .hpb-card::after {
    clip-path: none;
  }

  body.page-home .home-products-blueprint .hpb-title {
    font-size: 40px;
  }

  body.page-home .home-products-blueprint .hpb-progress {
    right: var(--hpb-card-pad-inline);
  }
}
