/* ==========================================================================
   JIST — HOME HERO
   Dark ink ground, faint blueprint grid, 7/5 copy-to-media split, proof chip
   overlapping the image, and the drawing-sheet title block closing the panel.
   ========================================================================== */

.jist-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--line-strong);
  padding-block: clamp(3.5rem, 2.2rem + 5vw, 6rem) clamp(3rem, 2rem + 4vw, 4.5rem);
  padding-inline: var(--wp--custom--gutter);
}

/* Core adds gutter padding to alignfull children via a :where() rule; this
   plain class beats it, and the rail below supplies the real container. */
.jist-hero__inner {
  position: relative;
  z-index: 1;
  inline-size: 100%;
  max-inline-size: var(--wp--custom--container-width);
  margin-inline: auto;
  padding-inline: 0;
}

/* Faint blueprint grid, masked back toward the top-left corner. */
.jist-hero__blueprint {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--wp--custom--alpha-white-soft) var(--wp--custom--hairline), transparent var(--wp--custom--hairline)),
    linear-gradient(90deg, var(--wp--custom--alpha-white-soft) var(--wp--custom--hairline), transparent var(--wp--custom--hairline));
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 22% 12%, #000 0%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 22% 12%, #000 0%, transparent 78%);
}

.jist-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--wp--custom--grid-gap);
  align-items: center;
}

.jist-hero__copy {
  display: grid;
  gap: var(--wp--preset--spacing--50);
  justify-items: start;
}

.jist-hero__title {
  margin: 0;
  color: var(--wp--preset--color--base);
  max-inline-size: 15ch;
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--display);
  font-weight: 700;
  line-height: var(--wp--custom--leading-tight);
  letter-spacing: var(--wp--custom--tracking-display);
  text-wrap: balance;
}

.jist-hero__title em {
  font-style: normal;
  color: var(--wp--preset--color--accent-lit);
}

.jist-hero__lead {
  margin: 0;
  font-size: var(--wp--preset--font-size--lead);
  color: var(--wp--preset--color--line-strong);
  max-inline-size: 52ch;
  line-height: var(--wp--custom--leading-relaxed);
  text-wrap: pretty;
}

.jist-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wp--preset--spacing--40);
  margin-block-start: var(--wp--preset--spacing--20);
}

.jist-hero__assurance {
  display: inline-flex;
  align-items: center;
  gap: var(--wp--preset--spacing--30);
  margin: 0;
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  letter-spacing: 0.04em;
  color: var(--wp--preset--color--faint);
  line-height: var(--wp--custom--leading-normal);
}

.jist-hero__assurance .jist-icon {
  inline-size: 16px;
  block-size: 16px;
  color: var(--wp--preset--color--accent-lit);
}

/* --------------------------------------------------------------------------
   Media — portrait frame carrying an overlapping proof chip
   -------------------------------------------------------------------------- */
.jist-hero__media {
  position: relative;
}

.jist-hero__media .jist-media-frame {
  border: var(--wp--custom--hairline) solid var(--wp--custom--alpha-white-light);
  box-shadow: var(--wp--custom--shadow-xl);
}

.jist-hero__chip {
  position: absolute;
  inset-block-end: -22px;
  inset-inline-start: -22px;
  display: grid;
  gap: var(--wp--preset--spacing--10);
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  background-color: var(--wp--preset--color--base);
  border-radius: var(--wp--custom--radius-md);
  box-shadow: var(--wp--custom--shadow-xl);
  min-inline-size: 172px;
}

.jist-hero__chip-value {
  font-family: var(--wp--preset--font-family--heading);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: var(--wp--custom--tracking-display);
  color: var(--wp--preset--color--contrast);
  line-height: 1;
}

.jist-hero__chip-label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  letter-spacing: var(--wp--custom--tracking-label);
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   Title block strip — the field strip that closes every engineering sheet
   -------------------------------------------------------------------------- */
.jist-hero__specs {
  margin-block-start: clamp(3rem, 2rem + 4vw, 4.5rem);
}

.jist-title-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: var(--wp--custom--hairline) solid var(--wp--custom--alpha-white-light);
  background-color: var(--wp--custom--alpha-white-soft);
  border-radius: var(--wp--custom--radius-sm);
  overflow: hidden;
}

.jist-title-block__field {
  display: grid;
  gap: var(--wp--preset--spacing--20);
  align-content: start;
  padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
  border-inline-start: var(--wp--custom--hairline) solid var(--wp--custom--alpha-white-light);
}

.jist-title-block__field:first-child {
  border-inline-start: 0;
}

.jist-title-block__key {
  margin: 0;
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.6875rem;
  letter-spacing: var(--wp--custom--tracking-label);
  text-transform: uppercase;
  color: var(--wp--preset--color--faint);
  line-height: 1;
}

/* Keep the four values on one baseline when a field has no key. */
.jist-title-block__key:empty {
  min-block-size: 0.6875rem;
}

.jist-title-block__value {
  margin: 0;
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--sm);
  font-weight: 600;
  color: var(--wp--preset--color--base);
  line-height: 1.3;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .jist-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--wp--preset--spacing--90);
  }

  .jist-hero__media {
    max-inline-size: 460px;
  }

  .jist-hero__chip {
    inset-inline-start: auto;
    inset-inline-end: -16px;
  }
}

@media (max-width: 900px) {
  .jist-title-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jist-title-block__field:nth-child(odd) {
    border-inline-start: 0;
  }

  .jist-title-block__field:nth-child(n + 3) {
    border-block-start: var(--wp--custom--hairline) solid var(--wp--custom--alpha-white-light);
  }
}

@media (max-width: 560px) {
  .jist-hero__media {
    max-inline-size: none;
  }

  .jist-hero__chip {
    position: static;
    inline-size: fit-content;
    margin-block-start: var(--wp--preset--spacing--40);
    box-shadow: var(--wp--custom--shadow-md);
  }

  .jist-hero__actions .jist-btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 460px) {
  .jist-title-block {
    grid-template-columns: minmax(0, 1fr);
  }

  .jist-title-block__field {
    border-inline-start: 0;
  }

  .jist-title-block__field + .jist-title-block__field {
    border-block-start: var(--wp--custom--hairline) solid var(--wp--custom--alpha-white-light);
  }
}