/* Public Persian typography, matched by role to the approved QHSE reference.
   The public layout deliberately omits this sheet on QHSE and English pages. */
html[lang=fa][dir=rtl]{
    --fa-type-hero:clamp(1.54rem,2.38vw,2.45rem);
    --fa-type-section:clamp(1.6rem,2vw,2.2rem);
    --fa-type-proof:clamp(1.08rem,1.6vw,1.6rem);
    --fa-type-compact:clamp(.98rem,1.15vw,1.2rem);
    --fa-type-subsection:1.5rem;
    --fa-type-hero-leading:1.38;
    --fa-type-section-leading:1.65;
    --fa-type-card-leading:1.35;
}

/* Page openings: retain authored spans and breaks, and use the content column. */
html[lang=fa][dir=rtl] #main :is(
    .public-page-hero .public-page-hero__content h1,
    .project-detail-hero #project-detail-title,
    .career-application__intro h1,
    .search-page h1,
    .privacy-page h1,
    .not-found-page__content h1
){
    max-width:none;
    font-size:calc(var(--fa-type-hero) * 1.1);
    font-weight:300;
    line-height:var(--fa-type-hero-leading);
    letter-spacing:0;
    white-space:normal;
    word-break:normal;
    overflow-wrap:break-word;
    text-wrap:pretty;
}

/* Narrative, call-to-action and colored-panel section headings share a scale.
   Compact proof tiles, labels and operational form headings keep their roles. */
html[lang=fa][dir=rtl] #main :is(
    .home-page,.about-page,.services-page,.projects-page,.careers-page,
    .contact-page,.principle-page,.project-detail,.job-detail
) h2:not(:where(
    .public-page-hero *,
    .sr-only,
    #home-lifecycle-title,
    .principle-page__bridge *,
    .career-form-step__header *,
    .career-persian-calendar *
)),
html[lang=fa][dir=rtl] #main .contact-page #contact-form :is(
    .contact-page__details h2,.contact-page__form h2
){
    max-width:none;
    font-size:var(--fa-type-section);
    font-weight:500;
    line-height:var(--fa-type-section-leading);
    letter-spacing:0;
    white-space:normal;
    word-break:normal;
    overflow-wrap:break-word;
    text-wrap:pretty;
}

/* The existing editorial performance subheading is already below this scale. */
html[lang=fa][dir=rtl] #main .principle-page--editorial #principle-performance-title{
    font-size:min(clamp(1.4rem,1.75vw,1.575rem),var(--fa-type-section));
}

/* Proof titles and prominent cards correspond to the QHSE white proof rail. */
html[lang=fa][dir=rtl] #main .public-page-hero .public-page-hero__statistics dd,
html[lang=fa][dir=rtl] #main :is(
    .about-commitments h3,
    .about-values h3,
    .about-workflow h3,
    .home-parity-path__copy strong,
    .home-parity-quick-links__copy strong,
    .home-parity-lifecycle h3,
    .projects-sectors h3,
    .projects-impact__card h3,
    .projects-on-hand h3,
    .projects-card h3,
    .projects-source-portfolios h3,
    .projects-empty h3,
    .services-page .managed-section--source-pillar h2,
    .search-results h2
){
    max-width:none;
    font-size:var(--fa-type-proof);
    font-weight:650;
    line-height:var(--fa-type-card-leading);
    letter-spacing:0;
    white-space:normal;
    word-break:normal;
    overflow-wrap:break-word;
    text-wrap:pretty;
}

/* Dense icon cards and related-project tiles follow the QHSE capability strip. */
html[lang=fa][dir=rtl] #main :is(
    .public-page-hero__capabilities h2,
    .home-parity-industries h3,
    .home-parity-solution h3,
    .project-related__title
){
    max-width:none;
    font-size:var(--fa-type-compact);
    font-weight:680;
    line-height:1.34;
    letter-spacing:0;
    white-space:normal;
    word-break:normal;
    overflow-wrap:break-word;
    text-wrap:pretty;
}

/* Existing smaller guide/reading headings stay smaller; remove nowrap only. */
html[lang=fa][dir=rtl] #main :is(.about-journey h3,.services-highlights h3){
    max-width:none;
    font-size:min(1.25rem,var(--fa-type-proof));
    font-weight:500;
    line-height:1.5;
    white-space:normal;
    text-wrap:pretty;
}

html[lang=fa][dir=rtl] #main :is(
    .job-detail__requirements h3,.job-detail__content-section h3
){
    max-width:none;
    font-size:var(--fa-type-subsection);
    font-weight:500;
    line-height:1.6;
    letter-spacing:0;
    white-space:normal;
    text-wrap:pretty;
}

/* Keep the compact careers guide below the major section scale. */
html[lang=fa][dir=rtl] #main .careers-page .careers-application-guide--reference :is(
    .careers-application-steps h3,.careers-accessibility h3
){
    max-width:none;
    font-size:min(1.375rem,var(--fa-type-proof));
    font-weight:500;
    line-height:1.6;
    white-space:normal;
    text-wrap:pretty;
}

/* Long catalogue titles can grow their own row instead of being clipped. */
html[lang=fa][dir=rtl] #main .projects-page .projects-card__content{
    height:auto;
    min-height:22.75rem;
    grid-template-rows:
        minmax(var(--projects-card-title-track),auto)
        var(--projects-card-facts-track)
        var(--projects-card-summary-track)
        var(--projects-card-action-track);
}

html[lang=fa][dir=rtl] #main .projects-page .projects-card h3{
    display:block;
    min-height:0;
    overflow:visible;
    -webkit-line-clamp:unset;
}

/* The reduced-motion grid must release the marquee cards' fixed inline size. */
@media (prefers-reduced-motion:reduce){
    html[lang=fa][dir=rtl] #main .home-page .home-parity-lifecycle__track{
        width:100%;
    }
    html[lang=fa][dir=rtl] #main .home-page .home-parity-lifecycle article{
        width:auto;
        min-width:0;
        max-width:100%;
    }
}

@media (max-width:767px){
    html[lang=fa][dir=rtl]{
        --fa-type-proof:1rem;
        --fa-type-compact:1.0625rem;
    }
    html[lang=fa][dir=rtl] #main .public-page-hero__capabilities h2{
        line-height:1.4;
    }
}

/* Persian Home only: a little more title prominence and quieter evidence figures. */
html[lang=fa][dir=rtl] #main .home-page #home-page-title{
    font-size:calc(var(--fa-type-hero) * 1.1);
}

html[lang=fa][dir=rtl] #main .home-page .home-parity-statistics .home-parity-counter{
    font-size:calc(clamp(4.5rem,8vw,6rem) * .75);
}

@media (max-width:767px){
    html[lang=fa][dir=rtl] #main .home-page .home-parity-statistics .home-parity-counter{
        font-size:calc(clamp(3rem,11vw,3.5rem) * .75);
    }
}

/* Numeric proof values only; text-based proof titles and contact values retain
   their approved sizes. Home's three counters have their separate 72px scale. */
html[lang=fa][dir=rtl] #main :is(
    .about-page .about-hero .public-page-hero__statistics dd,
    .careers-page .public-page-hero__statistics [data-section-key="hero-stat-1"] dd,
    .projects-page .public-page-hero__statistics [data-section-key="hero-stat-1"] dd,
    .principle-page--project-management .public-page-hero__statistics [data-section-key="framework-since"] dd,
    .principle-page--sustainable-growth .public-page-hero__statistics [data-section-key="established"] dd
){
    font-size:calc(var(--fa-type-proof) * .9);
}

html[lang=fa][dir=rtl] #main .about-page .about-evidence dd > bdi{
    font-size:.9em;
}

html[lang=fa][dir=rtl] #main .projects-page .projects-catalogue__total strong{
    font-size:calc(clamp(2rem,4vw,3rem) * .9);
}
