/* Arabic editorial placement and reading direction. The original artwork,
   illustration geometry, logo pixels, state selectors and motion stay intact.
   This same file is loaded by /ar and appended inside its seven shadow roots. */
.portfolio-ar, :host([lang="ar"]) {
  --sans: var(--arabic-sans), "Instrument Sans Composite", Tahoma, sans-serif;
  --serif: var(--arabic-serif), "Newsreader Composite", Georgia, serif;
  --mono: var(--arabic-sans), "IBM Plex Mono Composite", Tahoma, sans-serif;
}
.portfolio-ar { font-family: var(--sans); }
:host([lang="ar"]) .section-root {
  --sans: var(--arabic-sans), Tahoma, sans-serif;
  --serif: var(--arabic-serif), Georgia, serif;
  --mono: var(--arabic-sans), Tahoma, sans-serif;
  /* Absolute visual arrangements keep the approved coordinate system. */
  direction: ltr;
}
:host([lang="ar"]) :is(h1,h2,h3,p,blockquote,figcaption,summary,dt,dd,label,button,input,select,.control-label,.feature-meta,.feature-tags,.archive-card__facts,.contact-frame__caption,.company-reach-statement,.act-label,.organizer,.placement,.presence-column__label,.presence-column__word) {
  direction: rtl;
  letter-spacing: 0;
  text-align: start;
}
:host([lang="ar"]) :is(h1,h2,h3) { line-height: 1.3; text-wrap: pretty; }
:host([lang="ar"]) :is(p,blockquote,figcaption,summary,dt,dd,label,.company-reach-statement) { line-height: 1.7; }
:host([lang="ar"]) :is(.folio-controls,.process-track,.mode-controls,.category-controls,.feature-tags,.project-controls) { direction: rtl; }
:host([lang="ar"]) :is(.working-folio__meta,.working-folio__detail,.gallery-stage__copy,.archive-card__copy,.award-story,.gallery-handoff__context) { direction: rtl; }
:host([lang="ar"]) .hero-bridge__statement { direction: rtl; }
:host([lang="ar"]) .hero-bridge__statement h1 { line-height: 1.25; letter-spacing: 0; }
:host([lang="ar"]) .hero-bridge__statement h1 span { white-space: normal; max-width: 100%; }
:host([lang="ar"]) .hero-bridge__transition { direction: rtl; }
:host([lang="ar"]) .studio-about__opening h2 { max-width: 12ch; line-height: 1.35; letter-spacing: 0; }
:host([lang="ar"]) .working-folio h3 { line-height: 1.35; letter-spacing: 0; }
:host([lang="ar"]) .working-folio__detail p { line-height: 1.65; }
:host([lang="ar"]) .process-phase__line { line-height: 1.65; letter-spacing: 0; direction: rtl; }
:host([lang="ar"]) .process-phase > strong { line-height: 1.35; letter-spacing: 0; }
:host([lang="ar"]) :is(.feature-title,.archive-card__title,.section-intro h2,.index-heading h3,.gallery-handoff h2,.outcome-lead h2,.strip-heading h2) { line-height: 1.35; letter-spacing: 0; }
:host([lang="ar"]) :is(.project-disclosure__toggle,.feature-destination,.archive-card__details summary,.archive-actions button) { direction: rtl; line-height: 1.6; }
:host([lang="ar"]) :is(.contact-frame__caption b,.contact-frame__caption small) { direction: ltr; unicode-bidi: isolate; }
:host([lang="ar"]) .reach-metrics strong { direction: ltr; unicode-bidi: isolate; font-family: "Instrument Sans Composite", sans-serif; }
:host([lang="ar"]) .reach-metrics span { letter-spacing: 0; line-height: 1.6; }
:host([lang="ar"]) .presence-column__word { font-family: var(--sans); letter-spacing: 0; }
.portfolio-ar .contact-signoff__note { direction: rtl; }
.portfolio-ar .contact-signoff :is(a,p,span) { letter-spacing: 0; line-height: 1.6; }
.portfolio-ar .contact-signoff__title { direction: rtl; }
.portfolio-ar .contact-signoff__yours { font-family: var(--serif); line-height: 1.3; }
.portfolio-ar :is(.contact-signoff__email,.contact-signoff__socials,.contact-signoff__signature-frame) { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 620px) {
  :host([lang="ar"]) .working-folio__detail p { max-width: none; }
}

/* J2: explicit text alignment wins over section-specific Latin rules. Geometry
   stays LTR; only textual boxes read RTL. Never transform authentic artwork. */
:host([lang="ar"]) .section-root :is(h1,h2,h3,p,blockquote,figcaption,dt,dd,label,summary,button,a,li,small,strong,span) { text-align: right; }
:host([lang="ar"]) .section-root :is(.working-folio,.working-folio h3,.working-folio__detail,.working-folio__detail > span,.working-folio__meta,.process-phase,.process-phase__line,.process-phase > strong,.process-phase__index,.control-label,.feature-meta,.gallery-tile__copy,.archive-card__copy,.press-proof,.presence-item__copy) { direction: rtl; text-align: right; }
:host([lang="ar"]) .section-root .working-folio__meta span:first-child { direction: ltr; unicode-bidi: isolate; }
:host([lang="ar"]) .section-root .working-folio__detail > span { letter-spacing: 0; line-height: 1.6; }
:host([lang="ar"]) .section-root .folio-controls-wrap { align-items: flex-end; }
:host([lang="ar"]) .section-root :is(.contact-grid,.contact-item,.contact-frame-stack,.proof-sheet,.contact-frame__caption) { direction: ltr; }
:host([lang="ar"]) .section-root .contact-frame__caption :is(b,small) { direction: ltr; unicode-bidi: plaintext; }
:host([lang="ar"]) .section-root :is(.contact-frame__aperture,.contact-frame__portrait) { direction: ltr; }
:host([lang="ar"]) .section-root .hero-bridge h1 span { letter-spacing: 0; margin-inline: 0; }
.portfolio-ar :is(.contact-signoff__composition,.contact-signoff__index) { direction: ltr; }
.portfolio-ar :is(.contact-signoff__title,.contact-signoff__note,.contact-signoff__edition) { text-align: right; direction: rtl; }
.portfolio-ar .contact-signoff__title { align-items: flex-end; }
.portfolio-ar .contact-signoff__yours { font-size: clamp(3rem, 6vw, 5rem); line-height: 1.3; }
.portfolio-ar .contact-signoff__signature-frame { width: min(100%, 29rem); margin: -.5rem 0 0 auto; direction: ltr; }
.portfolio-ar .contact-signoff__note { padding-inline: 0; justify-self: end; max-width: 28ch; font-size: clamp(1.7rem, 2.8vw, 2.45rem); font-weight: 600; line-height: 1.55; }
.portfolio-ar .contact-signoff__socials a { align-items: flex-end; text-align: right; }
.portfolio-ar .contact-signoff__socials :is(span,small) { direction: ltr; unicode-bidi: isolate; }
.portfolio-ar .contact-signoff__email { direction: ltr; text-align: left; }
@media(max-width:760px) { .portfolio-ar .contact-signoff__signature-frame { width: min(100%,24rem); margin: 0 0 0 auto; } .portfolio-ar .contact-signoff__note { max-width: 26ch; } }

/* Use the gallery's own loaded Latin faces: alternate aliases can change line
   wrapping and hence the masonry row heights, especially at tablet widths. */
:host([lang="ar"]) .section-root .contact-frame__caption b { font-family: "Instrument Sans Lab", Helvetica, Arial, sans-serif; direction: ltr; text-align: left; }
:host([lang="ar"]) .section-root .contact-frame__caption small { font-family: "IBM Plex Mono Lab", Consolas, monospace; }

.portfolio-ar .contact-signoff__yours { align-self: stretch; text-align: right; }

/* J3: reverse only editorial tracks, never the artwork or stateful canvases.
   Grid line 1 starts on the right; the shared breakpoints still stack content. */
:host([lang="ar"]) .section-root :is(.workbench-intro,.section-intro,.index-heading,.gallery-handoff,.outcome-lead,.strip-heading) {
  direction: rtl;
}
:host([lang="ar"]) .section-root .studio-about__opening {
  direction: rtl;
  align-items: stretch;
  margin-inline-start: auto;
}
:host([lang="ar"]) .section-root .studio-about__opening h2 {
  line-height: 1.35;
  letter-spacing: 0;
}
@media (min-width: 981px) {
  :host([lang="ar"]) .section-root[data-about-refined="true"] .studio-about {
    grid-template-columns: minmax(0, 1fr) minmax(15.5rem, 0.38fr);
    grid-template-areas: "folios opening" "more more";
  }
}
/* Use the English hero's shared container scale, portrait sizing and row height.
   Only the label's reading edge and Arabic wrapping differ. */
:host([lang="ar"]) .hero-bridge__statement .selection-label {
  left: auto;
  right: 0;
}

/* Arabic connected letterforms must stay readable across the portrait overlap.
   Use the existing foreground-text layer without moving either composition. */



@media (min-width: 761px) {
  .portfolio-ar .contact-signoff__composition {
    grid-template-columns: minmax(21rem, 0.82fr) minmax(0, 1.18fr);
    grid-template-areas: "note title" "index email";
  }
}

.portfolio-ar .contact-signoff__stroke { display: none; }
.portfolio-ar .contact-signoff__email { max-width: 100%; }
.portfolio-ar .contact-signoff__email [data-contact-email-text] { white-space: normal; overflow-wrap: anywhere; }

.portfolio-ar .contact-signoff::before { right: auto; left: -8rem; }
@media(min-width:761px) {
 :host([lang="ar"]) .section-root .hero-bridge h1 span:nth-child(3) { max-width: none; white-space: nowrap; font-size: .82em; justify-self: start; }
 .portfolio-ar .contact-signoff__signature-frame { width: clamp(19rem,39vw,35rem); margin-top: clamp(-1.55rem,-2.2vw,-.8rem); margin-left: auto; margin-right: 0; }
}
@media(max-width:760px) {
 :host([lang="ar"]) .section-root :is(.gallery-stage__art,.gallery-tile__art,.archive-card__visual) { --sans: "Instrument Sans Lab",Helvetica,Arial,sans-serif; --serif: "Newsreader Lab",Georgia,serif; --mono: "IBM Plex Mono Lab",Consolas,monospace; font-family: var(--sans); direction: ltr; text-align: start; }
 :host([lang="ar"]) .section-root .selected-azer__letters { direction: ltr; }
 :host([lang="ar"]) .section-root .selected-azer__letters span { direction: ltr; text-align: center; }
}

:host([lang="ar"]) .section-root .workbench-intro p { grid-column: 9 / -1; max-width: 33rem; font-size: clamp(1.4rem, 2vw, 1.85rem); font-weight: 600; line-height: 1.55; align-self: center; }
:host([lang="ar"]) .section-root .outcome-lead p { max-width: 43rem; font-size: clamp(1.4rem, 2vw, 1.85rem); font-weight: 600; line-height: 1.55; }
:host([lang="ar"]) .section-root .strip-heading > p { max-width: 28rem; font-size: clamp(1.4rem, 2vw, 1.85rem); font-weight: 600; line-height: 1.55; }
@media (max-width: 780px) {
  :host([lang="ar"]) .section-root .workbench-intro p { grid-column: 2 / -1; }
}
@media (max-width: 520px) {
  :host([lang="ar"]) .section-root .workbench-intro p { grid-column: 1; max-width: 26rem; font-size: clamp(1.25rem, 5vw, 1.5rem); }
  :host([lang="ar"]) .section-root .outcome-lead p,
  :host([lang="ar"]) .section-root .strip-heading > p { font-size: clamp(1.25rem, 5vw, 1.5rem); }
  .portfolio-ar .contact-signoff__note { font-size: clamp(1.5rem, 5vw, 1.85rem); }
}

/* Visible SVG bounds are (45,81)-(1085,789) in its 1135x967 viewBox.
   Compensate transparent padding inside the existing centered loader box. */
.portfolio-ar .portfolio-loader { direction: ltr; }
.portfolio-ar .portfolio-loader__logo, .portfolio-ar .portfolio-loader__slash { translate: .1585% 5.0155%; }
