/* Original homepage: shared reading scale, rhythm, and corner treatments. */
main#top {
  --home-space: clamp(52px, 6vw, 86px);
  --home-gutter: clamp(16px, 4vw, 56px);
  --home-title: clamp(30px, 3.65vw, 54px);
  --home-body: clamp(14px, 1.16vw, 16px);
  --home-detail: clamp(13px, 1vw, 15px);
  --home-radius: clamp(18px, 2vw, 28px);
  --home-radius-small: 14px;
}

html body main#top > :is(#system, #services, #solvy, #process, #programs, #why-techmen, #partnership-programs, #about, #contact) {
  padding-block: var(--home-space) !important;
  scroll-margin-top: 86px;
}

html body main#top > section[id]:not(#tmLayeredHome) > :is(.container, .system-refresh-inner) {
  width: min(1200px, calc(100% - 2 * var(--home-gutter))) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}

html body main#top > section[id] :is(.section-head, .center-section-head, .partnership-head, .client-mini-head-v17, .system-intro) {
  margin-block-end: clamp(24px, 3vw, 38px) !important;
}

html body main#top > section[id] h2 {
  font-size: var(--home-title) !important;
  line-height: 1.09 !important;
  margin-block: 9px 13px !important;
  overflow-wrap: break-word;
  text-wrap: balance;
}

html[lang^="ar"] body main#top > section[id] :is(h1, h2, h3, .section-kicker, .solvy-tag) {
  letter-spacing: normal !important;
  line-height: 1.36 !important;
}

html body main#top > section[id] :is(.section-head, .center-section-head, .partnership-head, .client-mini-head-v17, .contact-copy, .system-intro, .solvy-copy) p {
  font-size: var(--home-body) !important;
  line-height: 1.65 !important;
  text-wrap: pretty;
}

html body main#top > section[id] :is(.section-kicker, .system-kicker, .solvy-tag) {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html body main#top > section[id] :is(.service, .process, .program-card-v18, .partner-panel, .why-techmen-card, .comment-card-v17, .contact-card, .solvy-card, .solvy-compact-visual, .system-summary) {
  border-radius: var(--home-radius) !important;
}

html body main#top > section[id] :is(.contact-option, .partner-tier, .influencer-step-v1, .solvy-point-card-v10, .system-feature, .mobile-package-preview-v36, .mobile-package-view-v26) {
  border-radius: var(--home-radius-small) !important;
}

html body main#top > section[id] :is(.service, .process, .why-techmen-card, .partner-panel, .contact-option) h3 {
  font-size: clamp(16px, 1.6vw, 22px) !important;
  line-height: 1.24 !important;
  overflow-wrap: break-word;
}

html body main#top > section[id] :is(.service, .process, .why-techmen-card, .partner-panel, .comment-card-v17, .contact-option) p {
  font-size: var(--home-detail) !important;
  line-height: 1.6 !important;
  overflow-wrap: break-word;
}

/* Let the hero copy, buttons and metrics reflow with translated text. */
html:root[lang] body #tmLayeredHome .home-copy h1 {
  font-size: clamp(35px, 4.2vw, 68px) !important;
  line-height: 1.02 !important;
}

html:root[lang] body #tmLayeredHome .home-copy .home-description {
  max-width: 58ch !important;
  font-size: var(--home-body) !important;
  line-height: 1.6 !important;
  text-wrap: pretty;
}

html:root[lang] body #tmLayeredHome :is(.home-eyebrow, .home-tagline, .home-metrics span) {
  font-size: clamp(11px, .9vw, 13px) !important;
  line-height: 1.48 !important;
}

html:root[lang] body #tmLayeredHome .home-actions a {
  font-size: clamp(12px, 1.02vw, 15px) !important;
  line-height: 1.35 !important;
  min-height: 46px !important;
  white-space: normal !important;
}

@media (min-width: 701px) {
  html:root[lang] body #tmLayeredHome {
    row-gap: clamp(15px, 2.3vh, 27px) !important;
    padding-block: clamp(100px, 15vh, 152px) 36px !important;
  }
}

/* Give the original services heading and seven linked cards more room. */
html body main#top #services .section-kicker {
  color: #e6d7f2 !important;
  font-size: clamp(14px, 1.45vw, 19px) !important;
  font-weight: 750 !important;
}

html body main#top #services .home-services-v19 {
  gap: clamp(12px, 1.3vw, 19px) !important;
}

html body main#top #services .home-services-v19 .service {
  min-width: 0 !important;
  height: auto !important;
  min-height: clamp(185px, 16vw, 235px) !important;
  padding: clamp(17px, 2vw, 30px) !important;
}

html body main#top #services .service small {
  font-size: var(--home-detail) !important;
  line-height: 1.58 !important;
}

/* Preserve the Solvy diagram and its hover depth. Animate only the lights. */
html body main#top #solvy .solvy-card {
  gap: clamp(18px, 3vw, 38px) !important;
  padding: clamp(17px, 3vw, 40px) !important;
}

html body main#top #solvy .solvy-point-card-v10 {
  min-height: 0 !important;
  height: auto !important;
  padding: 14px !important;
}

html body main#top #solvy .solvy-point-card-v10 strong {
  padding-inline-end: 21px !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

html body main#top #solvy .solvy-point-card-v10 small {
  font-size: 13px !important;
  line-height: 1.52 !important;
}

#solvy .solvy-compact-visual {
  contain: layout paint;
}

#solvy .solvy-compact-glow.glow-a,
#solvy .solvy-compact-glow.glow-b {
  animation: home-solvy-ambient 8s ease-in-out infinite alternate;
}

#solvy .solvy-compact-glow.glow-b { animation-delay: -4s; }

@keyframes home-solvy-ambient {
  from { opacity: .62; }
  to { opacity: 1; }
}

#solvy .solvy-core-node small,
#solvy .solvy-core-node span,
#solvy .solvy-flow-node small,
#solvy .solvy-compact-bottom span {
  font-size: 10px;
  line-height: 1.3;
}

#solvy .solvy-flow-node span {
  font-size: 11px;
  line-height: 1.22;
}

#solvy .solvy-flow-node {
  width: min(36%, 144px);
  backdrop-filter: none;
  background: #23212d;
}

#solvy .solvy-compact-visual :is(.node-plan, .node-caption) { left: 5%; }
#solvy .solvy-compact-visual :is(.node-create, .node-publish) { right: 5%; }

/* Preserve the package order and contents, including the full mobile details. */
html body main#top #programs .program-grid-v18 { gap: clamp(14px, 1.5vw, 22px) !important; }
html body main#top #programs .program-card-v18 { min-width: 0 !important; }
html body main#top #programs .package-description,
html body main#top #programs .mobile-package-full-list li {
  font-size: var(--home-detail) !important;
  line-height: 1.58 !important;
}

html body main#top #programs :is(.package-level, .program-top small, .package-fit, .package-focus small, .package-focus b, .package-outcomes span, .program-cta, .mobile-package-detail-heading) {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

html body main#top #programs .program-top h3 {
  font-size: clamp(27px, 3vw, 40px) !important;
  line-height: 1.12 !important;
}

html body main#top #programs .program-cta {
  min-height: 46px !important;
  border-radius: var(--home-radius-small) !important;
  white-space: normal !important;
}

@media (max-width: 700px) {
  main#top {
    --home-space: clamp(39px, 10vw, 55px);
    --home-title: clamp(28px, 7.1vw, 39px);
    --home-gutter: 16px;
  }

  html:root[lang] body #tmLayeredHome {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding-block: 100px 30px !important;
  }

  html:root[lang] body #tmLayeredHome .home-copy h1 {
    font-size: clamp(31px, 9vw, 51px) !important;
  }

  html:root[lang] body #tmLayeredHome .home-visual {
    height: clamp(240px, 73vw, 330px) !important;
  }

  html body main#top #services .home-services-v19 { gap: 8px !important; }

  html body main#top #services .home-services-v19 .service {
    min-height: 170px !important;
    padding: 12px !important;
  }

  html body main#top #services .home-services-v19 .service:nth-child(7) {
    min-height: 145px !important;
  }

  html body main#top #services .home-services-v19 .service h3 {
    font-size: 14px !important;
    line-height: 1.22 !important;
  }

  html body main#top #services .home-services-v19 .service p {
    max-width: 100% !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }

  html body main#top #solvy .solvy-compact-visual {
    margin: 0 auto !important;
    height: 294px !important;
    min-height: 294px !important;
    transform: none !important;
  }

  #solvy .solvy-flow-node b { display: none; }

  html body main#top #programs .program-card-v18 > .mobile-package-summary-v26 {
    min-height: 0 !important;
    padding: 18px !important;
  }

  html body main#top #programs :is(.mobile-package-level-v26, .mobile-package-popular, .mobile-package-eyebrow-v26, .mobile-package-preview-title-v36) {
    font-size: 10px !important;
    line-height: 1.4 !important;
  }

  html body main#top #programs :is(.mobile-package-fit-v26, .mobile-package-preview-item-v36, .mobile-package-view-v26) {
    font-size: 13px !important;
    line-height: 1.42 !important;
  }

  html body main#top #programs .mobile-package-view-v26 { min-height: 46px !important; }
  html body main#top #programs .packages-head::after { font-size: 11px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html body main#top :is(.reveal, .solvy-compact-visual, .solvy-compact-glow, .mobile-package-details-v29) {
    animation: none !important;
    transition: none !important;
  }

  html body main#top .reveal { opacity: 1 !important; translate: none !important; }
  html body main#top .solvy-compact-visual { transform: none !important; }
}


/* Keep the original footer readable on the same scale as the page. */
html body .tm-unified-footer :is(.tm-footer-box p, .tm-footer-title, .tm-footer-links a, .tm-footer-social a) {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

html body .tm-unified-footer :is(.tm-footer-logo small, .tm-footer-social small, .tm-footer-bottom),
html body .tm-unified-footer .tm-footer-social a[href^="mailto:"] small {
  font-size: 11px !important;
  line-height: 1.45 !important;
}

html body .tm-unified-footer .tm-footer-box { border-radius: 20px !important; }

html body .tm-unified-footer .tm-footer-social a[href^="mailto:"] > span {
  font-size: 12px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

html body main#top #contact :is(.contact-option small, .contact-option strong, .btn-primary) {
  font-size: var(--home-detail) !important;
  line-height: 1.5 !important;
}

html body main#top #contact .contact-option strong {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#solvy .solvy-compact-bottom {
  width: max-content;
  max-width: 92%;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  white-space: normal;
}

@media (max-width: 700px) {
  html body main#top #solvy .solvy-card { gap: 13px !important; }
  html body main#top #solvy .solvy-copy > .solvy-lead { margin-block: 0 !important; }

  #solvy .solvy-core-node {
    top: 46%;
    width: min(45%, 132px);
    height: 87px;
    border-radius: 16px;
  }

  #solvy .solvy-compact-visual :is(.node-plan, .node-create) { top: 20px; }
  #solvy .solvy-compact-visual :is(.node-caption, .node-publish) { bottom: 50px; }
  #solvy .solvy-compact-bottom { bottom: 8px; padding-block: 5px; }

  html body .tm-unified-footer .tm-footer-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html body .tm-unified-footer :is(.tm-footer-links a, .tm-footer-social a) {
    min-height: 42px !important;
    padding-block: 8px !important;
  }
  html body .tm-unified-footer .tm-footer-bottom { flex-wrap: wrap; }
}
