/* Home — flagship products directory (1/3 image + 2/3 content) */

body.page-home .home-product-directory {
  --impact-products-seam: clamp(40px, 6vh, 72px);
  position: relative;
  background: #ffffff;
  color: #0f172a;
  margin-top: calc(-1 * var(--impact-products-seam));
  padding: calc(var(--section-pad-y) + var(--impact-products-seam)) 0 var(--section-pad-y);
  border-top: none !important;
  border-bottom: none;
}

body.page-home.dark-theme .home-product-directory {
  background: #ffffff;
  color: #0f172a;
}

/* Fade only the seam (band + white unchanged outside this strip) */
body.page-home .home-product-directory::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--impact-products-seam);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    var(--section-band) 0%,
    #ffffff 100%
  );
}

/* Dark theme: soft handoff into #investors (no hard border) */
body.page-home.dark-theme .home-product-directory::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(56px, 9vh, 100px);
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 32%,
    var(--section-band, #f2f2f2) 100%
  );
}

body.page-home .home-product-directory .hpd-header {
  margin-bottom: 72px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

body.page-home .home-product-directory .hpd-header-left {
  max-width: 800px;
}

body.page-home .home-product-directory .hpd-title {
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #0f172a;
}

body.page-home .home-product-directory .hpd-desc {
  font-size: 16px;
  color: #4b5563;
  line-height: 1.6;
  max-width: 400px;
}

body.page-home .home-product-directory .hpd-list {
  border-top: 2px solid #0f172a;
}

body.page-home .home-product-directory .hpd-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
}

/* Landscape frame from CSS — source file dimensions are ignored */
body.page-home .home-product-directory .hpd-media {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-right: 1px solid #e2e8f0;
  background-color: #0f172a;
}

body.page-home .home-product-directory .hpd-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.85);
  display: block;
}

body.page-home .home-product-directory .hpd-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      125deg,
      rgba(6, 16, 32, 0.28) 0%,
      rgba(10, 28, 52, 0.1) 46%,
      rgba(10, 25, 47, 0) 100%
    ),
    linear-gradient(
      to top,
      rgba(8, 20, 38, 0.22) 0%,
      rgba(8, 20, 38, 0) 42%
    );
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.4s ease;
}

body.page-home .home-product-directory .hpd-item:hover .hpd-media::after {
  opacity: 0.45;
}

@media (min-width: 769px) {
  body.page-home .home-product-directory .hpd-item {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
  }

  body.page-home .home-product-directory .hpd-media {
    aspect-ratio: 16 / 9;
    height: auto;
    align-self: center;
    width: 100%;
    max-height: min(280px, 32vw);
  }
}

body.page-home .home-product-directory .hpd-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 40px;
}

body.page-home .home-product-directory .hpd-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-primary);
  margin-bottom: 12px;
}

body.page-home .home-product-directory .hpd-item-title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 12px;
  color: #0f172a;
  transition: color 0.2s ease;
}

body.page-home .home-product-directory .hpd-item:hover .hpd-item-title {
  color: var(--cyan-primary);
}

body.page-home .home-product-directory .hpd-item-desc {
  font-size: 15px;
  line-height: 1.55;
  color: #4b5563;
  margin-bottom: 16px;
  max-width: 680px;
}

body.page-home .home-product-directory .hpd-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #4b5563;
}

body.page-home .home-product-directory .hpd-specs strong {
  color: #0f172a;
  font-weight: 600;
  margin-right: 6px;
}

body.page-home .home-product-directory .hpd-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f172a;
  margin-top: auto;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

body.page-home .home-product-directory .hpd-item:hover .hpd-link {
  color: var(--cyan-primary);
}

body.page-home .home-product-directory .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

body.page-home .home-product-directory .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  body.page-home .home-product-directory .hpd-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  body.page-home .home-product-directory .hpd-desc {
    max-width: 100%;
  }

  body.page-home .home-product-directory .hpd-content {
    padding: 40px 32px;
  }
}

@media (max-width: 768px) {
  body.page-home .home-product-directory .hpd-item {
    grid-template-columns: 1fr;
    border-bottom: 2px solid #0f172a;
  }

  body.page-home .home-product-directory .hpd-media {
    aspect-ratio: 16 / 9;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  body.page-home .home-product-directory .hpd-content {
    padding: 32px 0;
  }

  body.page-home .home-product-directory .hpd-specs {
    flex-direction: column;
    gap: 12px;
  }
}
