/*
 * ESPO 2.5.1.61 — Global multilingual typography system
 * A restrained editorial scale for English, Turkish, Persian and Arabic.
 * Loaded after theme.css and rtl.css so it remains the final typography layer.
 */

:root {
  --espo-type-body-size: 1rem;
  --espo-type-body-leading: 1.78;
  --espo-type-h1-size: clamp(2.15rem, 3.2vw, 3.15rem);
  --espo-type-h2-size: clamp(1.72rem, 2.35vw, 2.38rem);
  --espo-type-h3-size: clamp(1.08rem, 1.35vw, 1.32rem);
  --espo-type-h1-leading: 1.09;
  --espo-type-h2-leading: 1.16;
  --espo-type-h3-leading: 1.34;
  --espo-type-display-weight: 610;
  --espo-type-heading-weight: 620;
  --espo-type-heading-tracking: -.032em;
  --espo-type-card-title: clamp(1.02rem, 1.15vw, 1.22rem);
  --espo-type-hero-brand: clamp(1.25rem, 1.65vw, 1.68rem);
  --espo-type-hero-slogan: clamp(1.9rem, 2.85vw, 2.68rem);
  --espo-type-page-hero: clamp(2.1rem, 3.05vw, 3rem);
}

html:lang(tr) {
  --espo-type-h1-size: clamp(2.05rem, 3vw, 2.92rem);
  --espo-type-h2-size: clamp(1.64rem, 2.2vw, 2.24rem);
  --espo-type-h3-size: clamp(1.05rem, 1.28vw, 1.27rem);
  --espo-type-h1-leading: 1.12;
  --espo-type-h2-leading: 1.2;
  --espo-type-heading-tracking: -.026em;
  --espo-type-card-title: clamp(1rem, 1.1vw, 1.18rem);
  --espo-type-hero-brand: clamp(1.22rem, 1.55vw, 1.58rem);
  --espo-type-hero-slogan: clamp(1.82rem, 2.65vw, 2.48rem);
  --espo-type-page-hero: clamp(2rem, 2.85vw, 2.8rem);
}

html:lang(fa) {
  --espo-type-body-leading: 2;
  --espo-type-h1-size: clamp(1.78rem, 2.55vw, 2.58rem);
  --espo-type-h2-size: clamp(1.5rem, 2vw, 2.14rem);
  --espo-type-h3-size: clamp(1.02rem, 1.18vw, 1.24rem);
  --espo-type-h1-leading: 1.48;
  --espo-type-h2-leading: 1.53;
  --espo-type-h3-leading: 1.68;
  --espo-type-display-weight: 590;
  --espo-type-heading-weight: 600;
  --espo-type-heading-tracking: 0;
  --espo-type-card-title: clamp(1rem, 1.1vw, 1.2rem);
  --espo-type-page-hero: clamp(1.78rem, 2.5vw, 2.52rem);
}

html:lang(ar) {
  --espo-type-body-leading: 1.9;
  --espo-type-h1-size: clamp(1.84rem, 2.62vw, 2.66rem);
  --espo-type-h2-size: clamp(1.55rem, 2.08vw, 2.2rem);
  --espo-type-h3-size: clamp(1.04rem, 1.2vw, 1.27rem);
  --espo-type-h1-leading: 1.43;
  --espo-type-h2-leading: 1.48;
  --espo-type-h3-leading: 1.62;
  --espo-type-display-weight: 590;
  --espo-type-heading-weight: 600;
  --espo-type-heading-tracking: 0;
  --espo-type-card-title: clamp(1.02rem, 1.12vw, 1.22rem);
  --espo-type-page-hero: clamp(1.84rem, 2.58vw, 2.6rem);
}

/* Rendering and base reading rhythm. */
body.espo-site {
  font-size: var(--espo-type-body-size);
  line-height: var(--espo-type-body-leading);
  font-synthesis: none;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.espo-site main :is(h1, h2, h3, h4) {
  margin-block-start: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

body.espo-site main h1:not(.espo-premium-hero__title) {
  max-width: 24ch;
  font-size: var(--espo-type-h1-size) !important;
  font-weight: var(--espo-type-display-weight) !important;
  line-height: var(--espo-type-h1-leading) !important;
  letter-spacing: var(--espo-type-heading-tracking) !important;
}

body.espo-site main h2 {
  max-width: 28ch;
  font-size: var(--espo-type-h2-size) !important;
  font-weight: var(--espo-type-heading-weight) !important;
  line-height: var(--espo-type-h2-leading) !important;
  letter-spacing: var(--espo-type-heading-tracking) !important;
}

body.espo-site main h3 {
  font-size: var(--espo-type-h3-size) !important;
  font-weight: var(--espo-type-heading-weight) !important;
  line-height: var(--espo-type-h3-leading) !important;
  letter-spacing: calc(var(--espo-type-heading-tracking) * .45) !important;
}

body.espo-site main h4 {
  font-size: 1rem !important;
  font-weight: 650 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

html:lang(fa) body.espo-site main :is(h1, h2, h3, h4),
html:lang(ar) body.espo-site main :is(h1, h2, h3, h4) {
  letter-spacing: 0 !important;
  word-spacing: normal;
  word-break: normal;
  overflow-wrap: normal;
}

html:lang(tr) body.espo-site main :is(h1, h2, h3) {
  hyphens: auto;
  overflow-wrap: break-word;
}

/* Page and project hero titles use a separate, calmer display scale. */
body.espo-site main :is(.espo-page-hero-inner h1, .espo-project-hero-copy h1) {
  max-width: 22ch;
  font-size: var(--espo-type-page-hero) !important;
  font-weight: var(--espo-type-display-weight) !important;
  line-height: var(--espo-type-h1-leading) !important;
}

/* Home hero: company name is supportive; the proposition remains primary. */
html:lang(en) body:is(.home, .espo-home-context) .espo-premium-hero__brand,
html:lang(tr) body:is(.home, .espo-home-context) .espo-premium-hero__brand {
  max-width: 24ch;
  font-size: var(--espo-type-hero-brand) !important;
  font-weight: 560 !important;
  line-height: 1.3 !important;
  letter-spacing: -.018em !important;
}

html:lang(en) body:is(.home, .espo-home-context) .espo-premium-hero__slogan,
html:lang(tr) body:is(.home, .espo-home-context) .espo-premium-hero__slogan {
  max-width: 17ch;
  margin-top: .38rem;
  font-size: var(--espo-type-hero-slogan) !important;
  font-weight: 620 !important;
  line-height: 1.13 !important;
  letter-spacing: -.035em !important;
}

html:lang(tr) body:is(.home, .espo-home-context) .espo-premium-hero__slogan {
  max-width: 19ch;
  line-height: 1.18 !important;
  letter-spacing: -.025em !important;
}

/* Keep the already approved connected-script hero proportions. */
html:lang(fa) body:is(.home, .espo-home-context) .espo-premium-hero__brand {
  font-size: clamp(1.35rem, 1.75vw, 1.86rem) !important;
  font-weight: 570 !important;
  line-height: 1.52 !important;
  letter-spacing: 0 !important;
}
html:lang(ar) body:is(.home, .espo-home-context) .espo-premium-hero__brand {
  font-size: clamp(1.4rem, 1.82vw, 1.94rem) !important;
  font-weight: 570 !important;
  line-height: 1.48 !important;
  letter-spacing: 0 !important;
}
html:lang(fa) body:is(.home, .espo-home-context) .espo-premium-hero__slogan {
  max-width: 19ch;
  font-size: clamp(1.7rem, 2.28vw, 2.38rem) !important;
  font-weight: 620 !important;
  line-height: 1.46 !important;
  letter-spacing: 0 !important;
}
html:lang(ar) body:is(.home, .espo-home-context) .espo-premium-hero__slogan {
  max-width: 20ch;
  font-size: clamp(1.76rem, 2.36vw, 2.46rem) !important;
  font-weight: 620 !important;
  line-height: 1.42 !important;
  letter-spacing: 0 !important;
}

/* All major homepage titles now share the same editorial hierarchy. */
body:is(.home, .espo-home-context) :is(
  .espo-cohesive-about h2,
  .espo-cohesive-services h2,
  .espo-cohesive-work h2,
  .espo-sectors-title,
  .espo-why-title,
  .espo-home-trust h2,
  .espo-home-insights h2,
  .espo-ohec-title,
  .espo-final-cta h2
) {
  font-size: var(--espo-type-h2-size) !important;
  font-weight: var(--espo-type-heading-weight) !important;
  line-height: var(--espo-type-h2-leading) !important;
  letter-spacing: var(--espo-type-heading-tracking) !important;
}

/* Cards and repeated modules must never compete with section headings. */
body.espo-site main :is(
  article h2,
  article h3,
  .espo-project-card-title,
  .espo-project-related-card h3,
  .espo-cohesive-service-card h3,
  .espo-why-card h3,
  .espo-home-insight-card h3,
  .espo-service-card h3,
  .espo-sector-card h3
) {
  max-width: none;
  font-size: var(--espo-type-card-title) !important;
  font-weight: 620 !important;
  line-height: 1.42 !important;
  letter-spacing: -.012em !important;
}

html:lang(fa) body.espo-site main :is(article h2, article h3, .espo-project-card-title),
html:lang(ar) body.espo-site main :is(article h2, article h3, .espo-project-card-title) {
  line-height: 1.68 !important;
  letter-spacing: 0 !important;
}

/* Paragraphs: reduce utility-driven oversizing and improve measure. */
body.espo-site main p,
body.espo-site main li,
body.espo-site main blockquote {
  text-wrap: pretty;
}

body.espo-site main p:not([class*="text-"]) {
  font-size: 1rem;
  line-height: var(--espo-type-body-leading);
}

body.espo-site main p.text-lg,
body.espo-site main blockquote.text-lg {
  font-size: 1rem !important;
  line-height: var(--espo-type-body-leading) !important;
}
body.espo-site main p.text-xl,
body.espo-site main blockquote.text-xl {
  font-size: clamp(1.02rem, 1.15vw, 1.1rem) !important;
  line-height: 1.82 !important;
}
body.espo-site main p.text-2xl,
body.espo-site main blockquote.text-2xl {
  font-size: clamp(1.16rem, 1.5vw, 1.42rem) !important;
  line-height: 1.65 !important;
}

html:lang(fa) body.espo-site main :is(p.text-xl, blockquote.text-xl),
html:lang(ar) body.espo-site main :is(p.text-xl, blockquote.text-xl) {
  line-height: 1.95 !important;
}
html:lang(fa) body.espo-site main :is(p.text-2xl, blockquote.text-2xl),
html:lang(ar) body.espo-site main :is(p.text-2xl, blockquote.text-2xl) {
  line-height: 1.82 !important;
}

body.espo-site main :is(
  .espo-page-hero-inner p,
  .espo-premium-hero__copy,
  .espo-cohesive-about__copy > p,
  .espo-services-intro,
  .espo-sectors-intro,
  .espo-ohec-text,
  .espo-final-cta__copy > p
) {
  max-width: 64ch;
  font-size: clamp(.96rem, .98vw, 1.04rem) !important;
  font-weight: 400;
  line-height: var(--espo-type-body-leading) !important;
  letter-spacing: 0 !important;
}

/* Editorial justification is restricted to wide text columns. */
@media (min-width: 1024px) {
  body.espo-site main :is(
    .espo-page-hero-inner p,
    .espo-premium-hero__copy,
    .espo-cohesive-about__copy > p,
    .espo-services-intro,
    .espo-sectors-intro,
    .espo-ohec-text,
    .espo-final-cta__copy > p,
    p.max-w-4xl,
    p.max-w-3xl
  ) {
    text-align: justify;
    text-align-last: start;
    text-justify: inter-word;
    overflow-wrap: break-word;
  }
  html:lang(en) body.espo-site main :is(
    .espo-page-hero-inner p,
    .espo-premium-hero__copy,
    .espo-cohesive-about__copy > p,
    .espo-services-intro,
    .espo-sectors-intro,
    .espo-ohec-text,
    .espo-final-cta__copy > p,
    p.max-w-4xl,
    p.max-w-3xl
  ),
  html:lang(tr) body.espo-site main :is(
    .espo-page-hero-inner p,
    .espo-premium-hero__copy,
    .espo-cohesive-about__copy > p,
    .espo-services-intro,
    .espo-sectors-intro,
    .espo-ohec-text,
    .espo-final-cta__copy > p,
    p.max-w-4xl,
    p.max-w-3xl
  ) {
    hyphens: auto;
  }
  html:lang(fa) body.espo-site main :is(
    .espo-page-hero-inner p,
    .espo-premium-hero__copy,
    .espo-cohesive-about__copy > p,
    .espo-services-intro,
    .espo-sectors-intro,
    .espo-ohec-text,
    .espo-final-cta__copy > p,
    p.max-w-4xl,
    p.max-w-3xl
  ),
  html:lang(ar) body.espo-site main :is(
    .espo-page-hero-inner p,
    .espo-premium-hero__copy,
    .espo-cohesive-about__copy > p,
    .espo-services-intro,
    .espo-sectors-intro,
    .espo-ohec-text,
    .espo-final-cta__copy > p,
    p.max-w-4xl,
    p.max-w-3xl
  ) {
    hyphens: none;
  }
}

/* Labels, navigation and controls stay quiet and precise. */
body.espo-site .espo-section-label > span:last-child {
  font-size: .68rem !important;
  font-weight: 650 !important;
  letter-spacing: .1em !important;
  line-height: 1.35;
}
html:lang(fa) body.espo-site .espo-section-label > span:last-child,
html:lang(ar) body.espo-site .espo-section-label > span:last-child {
  font-size: .71rem !important;
  font-weight: 540 !important;
  letter-spacing: 0 !important;
  text-transform: none;
}

body.espo-site .espo-primary-nav > a,
body.espo-site .espo-services-menu > a {
  font-size: .79rem !important;
  font-weight: 610 !important;
  letter-spacing: .005em !important;
}
html:lang(tr) body.espo-site .espo-primary-nav > a,
html:lang(tr) body.espo-site .espo-services-menu > a {
  font-size: .76rem !important;
}

body.espo-site :is(.espo-btn, .espo-service-link) {
  font-size: .76rem !important;
  font-weight: 620 !important;
  letter-spacing: .005em !important;
  line-height: 1.35;
}
html:lang(fa) body.espo-site :is(.espo-btn, .espo-service-link),
html:lang(ar) body.espo-site :is(.espo-btn, .espo-service-link) {
  font-family: inherit;
  font-size: .8rem !important;
  font-weight: 580 !important;
  letter-spacing: 0 !important;
  line-height: 1.55;
}

/* Footer typography remains compact but gains a calmer reading rhythm. */
body.espo-site .espo-site-footer {
  font-size: .94rem;
}
body.espo-site .espo-footer-brandmark p {
  line-height: 1.72;
}
body.espo-site .espo-footer-navgroup a,
body.espo-site .espo-footer-language {
  font-size: .72rem !important;
}

/* Responsive type scale: intentionally designed, not desktop scaled down. */
@media (max-width: 899px) {
  :root {
    --espo-type-h1-size: clamp(1.82rem, 7.4vw, 2.38rem);
    --espo-type-h2-size: clamp(1.48rem, 5.8vw, 1.92rem);
    --espo-type-h3-size: clamp(1.02rem, 4vw, 1.2rem);
    --espo-type-page-hero: clamp(1.82rem, 7.2vw, 2.32rem);
    --espo-type-hero-brand: clamp(1.12rem, 4.8vw, 1.42rem);
    --espo-type-hero-slogan: clamp(1.62rem, 7.2vw, 2.14rem);
  }
  html:lang(tr) {
    --espo-type-h1-size: clamp(1.76rem, 7vw, 2.26rem);
    --espo-type-h2-size: clamp(1.44rem, 5.5vw, 1.84rem);
    --espo-type-page-hero: clamp(1.76rem, 6.9vw, 2.22rem);
    --espo-type-hero-slogan: clamp(1.56rem, 6.8vw, 2.02rem);
  }
  html:lang(fa) {
    --espo-type-h1-size: clamp(1.5rem, 6.1vw, 1.9rem);
    --espo-type-h2-size: clamp(1.35rem, 5.2vw, 1.72rem);
    --espo-type-page-hero: clamp(1.52rem, 6vw, 1.92rem);
  }
  html:lang(ar) {
    --espo-type-h1-size: clamp(1.55rem, 6.2vw, 1.96rem);
    --espo-type-h2-size: clamp(1.39rem, 5.3vw, 1.77rem);
    --espo-type-page-hero: clamp(1.57rem, 6.1vw, 1.98rem);
  }

  body.espo-site main :is(
    .espo-page-hero-inner p,
    .espo-premium-hero__copy,
    .espo-cohesive-about__copy > p,
    .espo-services-intro,
    .espo-sectors-intro,
    .espo-ohec-text,
    .espo-final-cta__copy > p,
    p.max-w-4xl,
    p.max-w-3xl
  ) {
    text-align: start;
    text-align-last: auto;
    hyphens: none;
  }
}

@media (max-width: 767px) {
  html:lang(fa) body:is(.home, .espo-home-context) .espo-premium-hero__brand {
    font-size: clamp(1.18rem, 5vw, 1.48rem) !important;
  }
  html:lang(ar) body:is(.home, .espo-home-context) .espo-premium-hero__brand {
    font-size: clamp(1.22rem, 5.1vw, 1.52rem) !important;
  }
  html:lang(fa) body:is(.home, .espo-home-context) .espo-premium-hero__slogan {
    font-size: clamp(1.48rem, 6.4vw, 1.86rem) !important;
  }
  html:lang(ar) body:is(.home, .espo-home-context) .espo-premium-hero__slogan {
    font-size: clamp(1.52rem, 6.5vw, 1.92rem) !important;
  }

  body.espo-site main p.text-2xl,
  body.espo-site main blockquote.text-2xl {
    font-size: 1.15rem !important;
  }

  body.espo-site .espo-mobile-menu a.text-base {
    font-size: .94rem !important;
  }
}
