.home-hero {
  position: relative;
  background: var(--page-surface);
}

.home-hero__image img,
.home-services__visual img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.home-hero__building {
  position: relative;
}

.home-hero__building-copy {
  position: absolute;
  inset-block: 0;
  inset-inline: 65.5% 3.676%;
  container-type: inline-size;
  display: grid;
  align-content: center;
  gap: clamp(12px, 1.4vw, 20px);
  text-align: start;
}

.home-hero__building-copy h1,
.home-services__title,
.home-products__title,
.home-previews__title {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(18px, 2.1vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  text-wrap: balance;
}

.home-hero__building-copy h1 {
  font-size: min(30px, 6.8cqw);
}

.home-hero__building-copy p,
.home-text-panel__copy p {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: var(--home-text-size);
  font-weight: 500;
  line-height: 1.42;
  text-wrap: pretty;
}

.home-hero__building-copy p {
  line-height: clamp(18px, 1.8vw, 1.42em);
}

.home-text-panel {
  --panel-block-inset: clamp(20px, 2vw, 28px);
  --panel-side-inset: 7.352%;
  display: grid;
  min-block-size: var(--home-dark-section-height);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  background: var(--home-graphite);
  color: #fff;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  line-height: 1.2;
}

.home-industry-panel {
  --tagline-length: 35;
  margin-block-start: var(--home-title-gap);
}

.home-text-panel__title {
  /* Both panel headlines have 32 characters in IBM Plex Mono, each 0.6em wide. */
  --title-width: 96cqw;
  --title-size: calc(var(--title-width) / (32 * .6));
  container-type: inline-size;
  margin-block: var(--panel-block-inset);
  margin-inline: var(--panel-side-inset) clamp(20px, 3vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}

.home-text-panel__headline {
  display: block;
  font-size: var(--title-size);
}

.home-text-panel__tagline {
  display: block;
  margin-block-start: 12px;
  color: #d4d4d4;
  font-size: calc(var(--title-size) * .84);
  line-height: 1.3;
  letter-spacing: calc(var(--title-width) / var(--tagline-length, 31) - .6em);
}

.home-text-panel__right {
  display: grid;
  align-self: stretch;
  align-items: center;
  padding-block: var(--panel-block-inset);
  padding-inline-end: var(--panel-side-inset);
}

.home-text-panel__copy {
  padding-inline-start: clamp(20px, 3vw, 44px);
  border-inline-start: 1px solid var(--home-accent);
}

.home-text-panel__copy h3 {
  margin: 0 0 12px;
  font-size: var(--home-heading-size);
  font-weight: 500;
  text-transform: uppercase;
}

.home-text-panel__copy p {
  color: #ebebeb;
}

.home-text-panel__copy p + p {
  margin-block-start: 8px;
}

@media (width < 1360px) {
  .home-hero {
    width: 100%;
    min-width: 0;
  }

  .home-hero__building-copy {
    inset-inline: 64% clamp(12px, 2.5vw, 28px);
    text-align: end;
  }

  .home-hero__building-copy h1 {
    font-size: min(40px, 13.6cqw);
    line-height: 1.12;
    white-space: nowrap;
  }

  .home-hero__building-copy h1 span {
    display: block;
  }

  .home-hero__building-copy p,
  .home-text-panel__right {
    display: none;
  }

  .home-text-panel {
    min-block-size: 0;
    grid-template-columns: minmax(0, 1fr);
    padding-block: clamp(12px, 1.5vw, 22px);
    padding-inline: clamp(10px, 3vw, 24px);
    text-align: center;
  }

  .home-text-panel__title {
    --title-width: 98cqw;
    margin: 0;
  }

  .home-text-panel__tagline {
    margin-block-start: clamp(4px, 1vw, 12px);
  }
}

.home-services {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(430px, 3fr);
  row-gap: var(--home-title-gap);
  column-gap: clamp(18px, 3vw, 44px);
  padding-block-start: var(--home-title-gap);
  background: #fff;
}

.home-services__title {
  grid-column: 1 / -1;
}

.home-services__visual {
  position: relative;
  grid-column: 1;
  grid-row: 2;
}

.home-services__visual img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  visibility: hidden;
}

.home-services__visual [data-service-image="belt"] {
  visibility: visible;
}

.home-services:has([data-service-preview]:hover) [data-service-image="belt"] {
  visibility: hidden;
}

.home-services:has([data-service-preview="cylinder"]:hover) [data-service-image="cylinder"],
.home-services:has([data-service-preview="rvd"]:hover) [data-service-image="rvd"],
.home-services:has([data-service-preview="machining"]:hover) [data-service-image="machining"] {
  visibility: visible;
}

.home-services__cards {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: clamp(8px, 1.15vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-services__cards > li {
  display: grid;
}

.home-services__card {
  min-block-size: clamp(104px, 10vw, 144px);
  text-decoration: none;
}

@media (width < 1360px) {
  .home-services {
    display: block;
    padding-block-start: clamp(18px, 3vw, 36px);
    padding-inline: clamp(12px, 2.5vw, 28px);
  }

  .home-services__title {
    margin-block-end: clamp(12px, 2vw, 28px);
    font-size: clamp(18px, 4.5vw, 30px);
  }

  .home-services__visual,
  .home-services__card p {
    display: none;
  }

  .home-services__cards {
    gap: clamp(8px, 2vw, 16px);
  }

  .home-services__card {
    min-block-size: 72px;
    padding: clamp(10px, 2.5vw, 20px);
    overflow-wrap: anywhere;
  }

  .home-services__card h3 {
    font-size: clamp(14px, 3.6vw, 18px);
    line-height: 1.25;
    text-wrap: balance;
  }
}

.home-products,
.home-previews {
  padding-block: var(--home-title-gap) clamp(28px, 4vw, 56px);
  background: #fff;
}

.home-products:has(+ :is(.home-previews, .home-industry-panel)),
.home-previews:has(+ .home-industry-panel) {
  padding-block-end: 0;
}

.home-products__title,
.home-previews__title {
  margin-block-end: var(--home-title-gap);
}

.home-catalog-link {
  color: inherit;
  text-decoration: none;
}

.home-catalog-link:hover {
  color: var(--home-accent);
}

.home-products__list,
.home-previews__list {
  display: grid;
  gap: clamp(8px, 1.15vw, 16px);
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.home-product,
.home-preview {
  display: flex;
  height: 100%;
  flex-direction: column;
  border: 1px solid #dedede;
  background: var(--home-card-surface);
  color: inherit;
  text-decoration: none;
}

.home-product {
  border-color: var(--home-graphite);
  background: var(--home-graphite);
  color: #fff;
  -webkit-tap-highlight-color: transparent;
}

.home-product:is(:active, [data-touch-pressed]) {
  border-color: #dedede;
  background: var(--home-card-surface);
  color: var(--home-graphite);
}

@media (width >= 1360px) and (hover: hover) {
  .home-product:hover {
    border-color: #dedede;
    background: var(--home-card-surface);
    color: var(--home-graphite);
  }
}

.home-preview:is(:hover, :focus-visible) {
  border-color: var(--home-graphite);
  background: var(--home-graphite);
  color: #fff;
}

.home-catalog-link:focus-visible,
.home-services__card:focus-visible,
.home-product:focus-visible,
.home-preview:focus-visible {
  outline: 2px solid var(--home-graphite);
  outline-offset: 3px;
}

.home-product__media,
.home-preview__media {
  position: relative;
  display: block;
  flex: none;
  background: #fff;
}

.home-product__media {
  aspect-ratio: 5 / 4;
}

.home-preview__media {
  aspect-ratio: 3 / 4;
  background: var(--home-card-surface);
}

.home-product__media img,
.home-preview__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.home-product__media img {
  padding: clamp(8px, 1.25vw, 18px);
  object-fit: contain;
}

.home-preview__media img {
  object-fit: cover;
}

.home-preview__caption {
  flex: 1;
  justify-content: flex-start;
  padding: clamp(12px, 1.35vw, 20px);
  background: transparent;
  color: inherit;
  overflow-wrap: anywhere;
}

.home-product__details {
  display: grid;
  flex: 1;
  align-content: space-between;
  gap: 14px;
  padding: clamp(10px, 1.25vw, 18px);
  font-size: var(--home-text-size);
  font-weight: 500;
  line-height: 1.3;
}

.home-product__name {
  overflow-wrap: anywhere;
}

.home-product__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
}

.home-product__footer strong {
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (width < 1360px) {
  .home-products,
  .home-previews {
    padding-block-start: clamp(18px, 3vw, 36px);
    padding-inline: clamp(12px, 2.5vw, 28px);
  }

  .home-products__title,
  .home-previews__title {
    margin-block-end: clamp(12px, 2vw, 28px);
    font-size: clamp(18px, 4.5vw, 30px);
  }

  .home-products__list,
  .home-previews__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 16px);
  }

  .home-products__list > :nth-child(n + 5),
  .home-previews__list > :nth-child(n + 3) {
    display: none;
  }

  .home-product__media {
    aspect-ratio: 4 / 3;
    max-block-size: 200px;
  }

  .home-product__media img {
    padding: clamp(8px, 2vw, 14px);
  }

  .home-product__details {
    gap: 8px;
    padding: clamp(9px, 2.5vw, 16px);
    font-size: clamp(13px, 3.25vw, 16px);
  }

  .home-preview__media {
    aspect-ratio: 1;
    max-block-size: 320px;
  }

  .home-preview__caption {
    padding: clamp(9px, 2.5vw, 16px);
  }

  .home-preview__caption h3 {
    font-size: clamp(14px, 3.5vw, 18px);
    line-height: 1.25;
  }
}
