/* ==========================================================
   DBG V31 – balanced headings / cleaner line breaks
   Loaded last. Layout, MIA and 3D model stay unchanged.
   ========================================================== */

/* Better automatic line composition without hyphenation. */
.hero-v6 h1,
.page-hero-v6 h1,
.section h2,
.section-head h2,
.intro-v6 h2,
.build21-copy h2,
.project-start-copy h2,
.form-intro h2,
.office-copy h2,
.team-join-cta h2,
.compare-concept-copy h3,
.service-card-v6 h3,
.portal-card-v6 h3,
.home-project-card h3 {
  text-wrap: balance;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

/* Default homepage headline: keep the two thoughts visually together. */
.hero-title-balanced .hero-title-phrase{display:inline}
.hero-title-balanced .hero-title-phrase + .hero-title-phrase:before{content:' '}

/* Tablet: ignore editorial desktop <br>s and let the viewport choose cleaner breaks. */
@media (min-width:768px) and (max-width:1180px){
  .hero-v6 h1,
  .page-hero-v6 h1,
  .section h2,
  .section-head h2,
  .intro-v6 h2,
  .build21-copy h2,
  .project-start-copy h2,
  .form-intro h2,
  .office-copy h2,
  .team-join-cta h2{max-width:100%!important}

  .section h2 br,
  .section-head h2 br,
  .intro-v6 h2 br,
  .project-start-copy h2 br,
  .form-intro h2 br,
  .office-copy h2 br,
  .team-join-cta h2 br,
  .page-hero-v6 h1 br{display:none!important}

  .hero-title-balanced{font-size:clamp(58px,8.2vw,84px)!important;line-height:.94!important}
  .hero-title-balanced .hero-title-phrase{display:block;white-space:nowrap}
  .hero-title-balanced .hero-title-phrase + .hero-title-phrase:before{content:none}
}

/* Phones: fewer awkward 3–4 line fragments, slightly calmer type scale. */
@media (max-width:767px){
  .section h2 br,
  .section-head h2 br,
  .intro-v6 h2 br,
  .project-start-copy h2 br,
  .form-intro h2 br,
  .office-copy h2 br,
  .team-join-cta h2 br,
  .page-hero-v6 h1 br,
  .compare-concept-copy h3 br{display:none!important}

  .hero-title-balanced{
    font-size:clamp(34px,9.8vw,43px)!important;
    line-height:.98!important;
    letter-spacing:-.045em!important;
    max-width:100%!important;
  }
  .hero-title-balanced .hero-title-phrase{display:block;white-space:nowrap}
  .hero-title-balanced .hero-title-phrase + .hero-title-phrase:before{content:none}

  .section-head h2,.section h2{
    font-size:clamp(36px,10.2vw,46px)!important;
    line-height:1!important;
    letter-spacing:-.042em!important;
  }
  .page-hero-v6 h1,.page-hero-v6 .page-hero-copy h1{
    font-size:clamp(38px,10.5vw,48px)!important;
    line-height:.99!important;
    letter-spacing:-.045em!important;
  }
  .compare-concept-copy h3{font-size:clamp(28px,8.2vw,34px)!important;line-height:1.05!important}
  .project-start-copy h2,.form-intro h2,.office-copy h2,.team-join-cta h2{line-height:1!important}
}

/* Very narrow phones: guarantee the homepage title phrase fits in one line. */
@media (max-width:390px){
  .hero-title-balanced{font-size:clamp(31px,8.9vw,35px)!important;letter-spacing:-.04em!important}
  .section-head h2,.section h2{font-size:clamp(34px,9.8vw,42px)!important}
  .page-hero-v6 h1,.page-hero-v6 .page-hero-copy h1{font-size:clamp(35px,9.7vw,44px)!important}
}
