/* Machine-brands index: insights-style discovery page and shared brand cards. */

.mb-index,
.mb-index * {
  box-sizing: border-box;
}

.mb-index {
  color: #151920;
  background: #fff;
  font-family: "Manrope", sans-serif;
}

.mb-index-hero,
.mb-index__library {
  width: 80%;
  max-width: 1600px;
  margin-inline: auto;
}

.mb-index-hero {
  position: relative;
  display: flex;
  min-height: 270px;
  padding: clamp(38px, 5vw, 72px);
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
  background: linear-gradient(112deg, #161a21 0%, #1b2029 62%, #45151b 100%);
  color: #fff;
  box-shadow: 0 22px 58px rgba(14, 18, 24, 0.14);
}

.mb-index-hero::after {
  position: absolute;
  top: -125px;
  right: 18%;
  width: 190px;
  height: 510px;
  background: rgba(195, 15, 31, 0.17);
  content: "";
  transform: skewX(-25deg);
}

.mb-index-hero__content {
  position: relative;
  z-index: 1;
  max-width: 830px;
}

.mb-index-hero .cp-eyebrow {
  color: #ff747f;
}

.mb-index-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4.6vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.mb-index-hero__content > p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: #d8dce3;
  font-size: clamp(0.95rem, 1.35vw, 1.12rem);
  font-weight: 600;
  line-height: 1.65;
}

.mb-index-hero__count {
  position: relative;
  z-index: 1;
  display: grid;
  width: 160px;
  min-height: 132px;
  padding: 18px;
  flex: 0 0 160px;
  place-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 4px solid #e52838;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  text-align: center;
}

.mb-index-hero__count strong {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.mb-index-hero__count span {
  margin-top: 9px;
  color: #cfd3da;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.mb-index__library {
  padding-block: 68px 90px;
}

.mb-index__heading {
  display: flex;
  margin-bottom: 34px;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.mb-index__heading h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.mb-index__heading > p {
  max-width: 500px;
  margin: 0 0 4px;
  color: #5d6470;
  font-size: 0.94rem;
  line-height: 1.65;
}

.mb-brand-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.mb-brand-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dfe2e7;
  border-top: 3px solid #b9bec6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 11px 30px rgba(16, 20, 28, 0.065);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.mb-brand-card:hover {
  border-color: #c8ccd3;
  border-top-color: #c30f1f;
  box-shadow: 0 18px 42px rgba(16, 20, 28, 0.12);
  transform: translateY(-3px);
}

.mb-brand-card__visual {
  position: relative;
  display: flex;
  aspect-ratio: 1.65 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 62%, rgba(195, 15, 31, 0.08), transparent 36%),
    linear-gradient(145deg, #fff, #f1f3f5);
}

.mb-brand-card__visual::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48px;
  height: 48px;
  background: rgba(195, 15, 31, 0.1);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  content: "";
}

.mb-brand-card__visual img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px 16px 4px;
  object-fit: contain;
  object-position: center;
  transition: transform 220ms ease;
}

.mb-brand-card:hover .mb-brand-card__visual img {
  transform: scale(1.035);
}

.mb-brand-card__body {
  display: flex;
  padding: 22px;
  flex: 1 1 auto;
  flex-direction: column;
}

.mb-brand-card__eyebrow {
  margin: 0 0 7px;
  color: #c30f1f;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mb-brand-card h2 {
  margin: 0;
  font-size: clamp(1.35rem, 1.65vw, 1.75rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.mb-brand-card h2 a {
  color: #151920;
  text-decoration: none;
}

.mb-brand-card__body > p:not(.mb-brand-card__eyebrow) {
  margin: 13px 0 20px;
  color: #5d6470;
  font-size: 0.85rem;
  line-height: 1.58;
}

.mb-brand-card__actions {
  display: flex;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mb-brand-card__cta,
.mb-brand-card__catalog {
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
}

.mb-brand-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b50e1c;
}

.mb-brand-card__catalog {
  color: #626a75;
}

.mb-brand-card__cta:hover,
.mb-brand-card__catalog:hover {
  color: #151920;
}

@media (max-width: 1260px) {
  .mb-index-hero,
  .mb-index__library {
    width: 88%;
  }

  .mb-brand-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .mb-index-hero,
  .mb-index__library {
    width: min(100% - 32px, 1600px);
  }

  .mb-index-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .mb-index-hero__count {
    width: auto;
    min-height: 0;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 12px;
  }

  .mb-index-hero__count span {
    margin: 0;
    text-align: left;
  }

  .mb-index__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mb-index__heading > div,
  .mb-index__heading > p {
    width: 100%;
    min-width: 0;
  }

  .mb-index__heading h2 {
    overflow-wrap: break-word;
  }
}

@media (max-width: 600px) {
  .mb-index-hero,
  .mb-index__library {
    width: min(100% - 24px, 1600px);
  }

  .mb-index-hero {
    padding: 34px 24px;
  }

  .mb-index__library {
    padding-block: 50px 64px;
  }

  .mb-brand-grid {
    grid-template-columns: 1fr;
  }
}
