/* Restore the display headings on the homepage and keep its locale layout steady. */
html[lang] body[data-tm-page="home"] main#top {
  --home-title: clamp(30px, 3.65vw, 49px);
  --home-section-space: clamp(26px, 3.65vw, 52px);
  --home-heading-gap: clamp(18px, 2.1vw, 30px);
}

html[lang] body[data-tm-page="home"] main#top > section[id]:not(#tmLayeredHome) {
  padding-block: var(--home-section-start, var(--home-section-space)) var(--home-section-end, var(--home-section-space)) !important;
}

html[lang] body[data-tm-page="home"] main#top > section#services {
  --home-section-end: clamp(16px, 2vw, 28px);
}

html[lang] body[data-tm-page="home"] main#top > section#solvy {
  --home-section-start: clamp(12px, 1.7vw, 24px);
  --home-section-end: clamp(14px, 1.8vw, 26px);
}

html[lang] body[data-tm-page="home"] main#top > #solvy > .container {
  --solvy-gutter: clamp(12px, 2.2vw, 30px);
  width: min(1320px, calc(100% - 2 * var(--solvy-gutter))) !important;
}

html[lang] body[data-tm-page="home"] main#top > section#programs {
  --home-section-start: clamp(20px, 2.5vw, 36px);
}

/* Compact client details above each testimonial. */
html body main#top #about .comment-grid-v17 {
  gap: clamp(10px, 1.15vw, 16px) !important;
}

html body main#top #about .comment-card-v17 {
  min-height: 0 !important;
  padding: clamp(14px, 1.55vw, 22px) !important;
}

#about .comment-client {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-block-end: 8px;
  border-block-end: 1px solid #eee6f1;
  overflow-wrap: anywhere;
}

#about .comment-avatar {
  inline-size: 27px;
  aspect-ratio: 1;
  border: 1px solid #e7d8ed;
  border-radius: 8px;
  background:
    center / 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237343a4' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3.4'/%3E%3Cpath d='M5 20v-1.5a4 4 0 0 1 4-4h6a4 4 0 0 1 4 4V20'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #f1e7ff, #fff0e6);
}

#about .comment-client-name {
  display: block;
  color: #261b35;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

#about .comment-client-location {
  display: block;
  margin-block-start: 2px;
  color: #695776;
  font-size: 9px;
  font-weight: 620;
  line-height: 1.45;
}

html body main#top #about .comment-card-v17 p {
  margin: 10px 0 0 !important;
  color: #645b6b !important;
  font-size: clamp(12px, 1vw, 14px) !important;
  line-height: 1.55 !important;
}

@media (max-width: 520px) {
  html body main#top #about .comment-grid-v17 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

html[lang] body[data-tm-page="home"] main#top > section[id] :is(h1, h2),
html[lang] body[data-tm-page="home"] main#top > section[id] :is(h1, h2) :is(span, em) {
  text-transform: uppercase !important;
}

html[lang] body[data-tm-page="home"] main#top > section[id] :is(.section-head, .center-section-head, .partnership-head, .client-mini-head-v17, .system-intro) {
  margin-block-end: var(--home-heading-gap) !important;
}

html[lang] body[data-tm-page="home"] main#top :is(#system .system-intro, #contact .contact-copy) h2 {
  font-size: var(--home-title) !important;
  line-height: 1.16 !important;
}

html[lang="ar"] body[data-tm-page="home"] main#top > section[id] h2 {
  line-height: 1.3 !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome {
  padding-inline: 6.4% !important;
  height: auto !important;
  max-height: none !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-copy h1 {
  width: 100% !important;
  max-width: 100% !important;
  font-size: clamp(34px, 4.55vw, 70px) !important;
  line-height: 1.15 !important;
  letter-spacing: -.04em !important;
  overflow: visible !important;
}

/* Keep all three translations in the same grid cell. Hidden text contributes
   its size without covering the active text or entering the accessibility tree. */
html[lang] body[data-tm-page="home"] main#top #tmLayeredHome :is(.home-copy-slot, .home-description, .home-copy h1) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  min-inline-size: 0;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome [data-home-lang] {
  display: block !important;
  grid-area: 1 / 1;
  visibility: hidden;
  letter-spacing: normal !important;
  font-family: "Montserrat", Arial, sans-serif !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome [data-home-lang="ar"] {
  font-family: "Cairo", Arial, sans-serif !important;
  letter-spacing: normal !important;
}

html[lang="en"] body[data-tm-page="home"] main#top #tmLayeredHome [data-home-lang="en"],
html[lang="fr"] body[data-tm-page="home"] main#top #tmLayeredHome [data-home-lang="fr"],
html[lang="ar"] body[data-tm-page="home"] main#top #tmLayeredHome [data-home-lang="ar"] {
  visibility: visible;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-copy h1 [data-home-lang] {
  text-align: start;
  overflow-wrap: anywhere;
  letter-spacing: -.04em !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-copy h1 [data-home-lang="ar"] {
  line-height: 1.23 !important;
  letter-spacing: normal !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-copy h1 [data-home-lang] em {
  display: inline-block !important;
  line-height: inherit !important;
  padding-block: 0 .09em !important;
  font-family: inherit !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-description {
  width: 100% !important;
  max-width: 100% !important;
  line-height: 1.65 !important;
  text-align: start !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome :is(.home-eyebrow, .home-tagline) {
  width: 100% !important;
  text-align: start !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-eyebrow {
  margin-block: 0 14px !important;
  letter-spacing: .09em !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-metrics span {
  line-height: 1.48 !important;
  letter-spacing: 0 !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, max-content)) !important;
  max-width: 100% !important;
}

html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-actions > a {
  width: 100% !important;
  height: 100% !important;
  justify-content: center !important;
  text-align: center !important;
}

@media (min-width: 701px) {
  html[lang] body[data-tm-page="home"] main#top #tmLayeredHome {
    min-height: 100svh !important;
    grid-template-columns: minmax(0, 46.5vw) minmax(0, 1fr) !important;
  }
}

@media (max-width: 700px) {
  html[lang] body[data-tm-page="home"] main#top {
    --home-title: clamp(27px, 7.25vw, 37px);
    --home-section-space: clamp(23px, 6.7vw, 36px);
    --home-heading-gap: 18px;
  }

  html[lang] body[data-tm-page="home"] main#top #tmLayeredHome {
    padding-inline: clamp(14px, 3.6vw, 24px) !important;
  }

  html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-copy h1 {
    font-size: clamp(31px, 9.2vw, 48px) !important;
  }

  html[lang] body[data-tm-page="home"] main#top #tmLayeredHome .home-actions > a {
    padding-inline: 10px !important;
  }
}
