/* Mangix typography polish — balanced Chinese wrapping and compact responsive copy. */

:where(
  .hero-copy h1,
  .section-heading h2,
  .method-intro h2,
  .starcards-copy h2,
  .experience-heading h2,
  .about-manifesto h2,
  .collaboration-copy h2,
  .ecosystem-ui-heading h3,
  .product-card h3,
  .contact-form-heading h3
) {
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: normal;
}

:where(
  .hero-lead,
  .product-tagline,
  .product-description,
  .section-heading > p,
  .method-intro > p,
  .starcards-copy > p,
  .experience-intro > p,
  .demo-caption p,
  .about-manifesto > p,
  .capability-card p,
  .collaboration-copy > p,
  .collaboration-promise small,
  .collaboration-process small,
  .footer-brand p
) {
  text-wrap: pretty;
  word-break: normal;
  overflow-wrap: break-word;
}

@supports (word-break: auto-phrase) {
  :where(
    .hero-copy h1,
    .section-heading h2,
    .method-intro h2,
    .starcards-copy h2,
    .experience-heading h2,
    .about-manifesto h2,
    .collaboration-copy h2,
    .product-tagline,
    .product-description,
    .capability-card p,
    .collaboration-process small
  ) {
    word-break: auto-phrase;
  }
}

:where(
  .button,
  .text-link,
  .section-kicker,
  .product-type,
  .feature-pills li,
  .hero-proof li,
  .prototype-status,
  .demo-tab strong,
  .demo-tab-no,
  .contact-submit,
  .footer-nav h3,
  .footer-nav a
) {
  white-space: nowrap;
}

.product-copy,
.custom-copy,
.section-heading > div,
.method-intro,
.starcards-copy,
.experience-heading > div,
.about-manifesto,
.collaboration-copy,
.capability-card,
.process-heading,
.collaboration-process li > div {
  min-width: 0;
}

.product-card h3,
.product-tagline,
.product-description {
  max-width: 34em;
}

.capability-card p {
  max-width: 25em;
}

.section-heading-side p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.9;
  text-wrap: pretty;
}

.product-center-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  color: #5548cb;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.product-center-link span {
  transition: transform 0.25s var(--ease);
}

.product-center-link:hover span {
  transform: translateX(4px);
}
@media (max-width: 1120px) {
  .section-heading {
    gap: 30px;
  }

  .section-heading > p {
    max-width: 42em;
  }

  .product-card:not(.product-card-featured):not(.custom-product) .product-tagline,
  .product-card:not(.product-card-featured):not(.custom-product) .product-description {
    max-width: none;
  }

  .collaboration-process li {
    padding-right: 20px;
  }
}

@media (max-width: 900px) {
  :where(
    .hero-copy h1,
    .experience-heading h2,
    .method-intro h2,
    .starcards-copy h2,
    .about-manifesto h2,
    .collaboration-copy h2
  ) br {
    display: none;
  }

  .hero-copy h1 {
    max-width: 13ch;
  }

  .experience-heading h2,
  .method-intro h2,
  .starcards-copy h2,
  .about-manifesto h2,
  .collaboration-copy h2 {
    max-width: 15ch;
  }

  .section-heading {
    align-items: start;
  }

  .demo-tab {
    min-height: 70px;
  }

  .demo-tab small {
    white-space: normal;
    text-wrap: pretty;
  }

  .capability-card p,
  .collaboration-process small {
    font-size: 11px;
  }
}

@media (max-width: 680px) {
  .hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(39px, 11.8vw, 54px);
    line-height: 1.13;
    letter-spacing: -0.045em;
  }

  .experience-heading h2,
  .method-intro h2,
  .starcards-copy h2,
  .about-manifesto h2,
  .collaboration-copy h2,
  .section-heading h2 {
    max-width: 14ch;
    font-size: clamp(34px, 9.8vw, 48px);
    line-height: 1.16;
    letter-spacing: -0.045em;
  }

  .product-tagline {
    font-size: clamp(18px, 5.4vw, 24px);
    line-height: 1.42;
  }

  .product-description,
  .hero-lead,
  .section-heading > p,
  .experience-intro > p,
  .about-manifesto > p:not(.section-kicker),
  .collaboration-copy > p:not(.section-kicker) {
    font-size: 14px;
    line-height: 1.82;
  }

  .feature-pills {
    gap: 7px;
  }

  .feature-pills li {
    padding-inline: 10px;
    font-size: 10px;
  }

  .collaboration-audiences span {
    white-space: nowrap;
  }

  .collaboration-process li > div {
    padding-right: 8px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1,
  .experience-heading h2,
  .method-intro h2,
  .starcards-copy h2,
  .about-manifesto h2,
  .collaboration-copy h2,
  .section-heading h2 {
    max-width: none;
  }

  .hero-actions,
  .form-submit-row {
    align-items: stretch;
  }

  .hero-actions .button,
  .contact-submit {
    width: 100%;
    justify-content: center;
  }

  .collaboration-audiences {
    display: grid;
    grid-template-columns: 1fr;
  }

  .collaboration-audiences span {
    text-align: center;
  }
}
