/* pillars.com.sa Arabic pages (2026-11-15). Loaded after pl-fixes.css on /ar/ pages only.
   Every rule is scoped to html[dir="rtl"], so the English pages look exactly as before (only @font-face is global). */

/* IBM Plex Sans Arabic (SIL OFL, self-hosted). Arabic and Latin subsets; the Latin part gives digits and Latin words
   the same look as the Arabic text. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-400.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-600.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-arabic-arabic-700.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-arabic-latin-400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-arabic-latin-600.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-arabic-latin-700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Font, weights and line heights: Arabic font first, the English font (Outfit) as fallback. Plex has 400/600/700 only. */
html[dir="rtl"] {
  --font-display: "IBM Plex Sans Arabic", "Outfit Variable", Arial, sans-serif;
  --font-heading: "IBM Plex Sans Arabic", "Outfit Variable", Arial, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Outfit Variable", Arial, sans-serif;
  --font-light: "IBM Plex Sans Arabic", "Outfit Variable", Arial, sans-serif;
  --w-display: 700; --w-heading: 700; --w-body: 400; --w-light: 400;
  --lh-tight: 1.4; --lh-snug: 1.4; --lh-body: 2;
  /* Arabic renders larger than Latin at the same size, so display/heading sizes are the Latin ones scaled down, as on
     jaderoom.sa (h1 .72, h2 .78, h3 .9); h2 raised to .85 after comparing screenshots side by side. Same clamps as the English design (_astro CSS). */
  --t-display: calc(clamp(2.5rem, 1.4rem + 4.7vw, 5.5rem) * .72);
  --t-h1: calc(clamp(2rem, 1.3rem + 3vw, 3.75rem) * .72);
  --t-h2: calc(clamp(1.5rem, 1.1rem + 1.7vw, 2.5rem) * .85);
  --t-h3: calc(clamp(1.25rem, 1.05rem + .85vw, 1.75rem) * .9);
}
/* The English CSS shrinks its sizes under 340px; same here, scaled the same way. */
@media (max-width: 340px) {
  html[dir="rtl"] { --t-display: calc(2rem * .72); --t-h1: calc(1.625rem * .72); --t-h2: calc(1.375rem * .85); }
}

/* Headings and text, like jaderoom.sa: bold, line-height 1.4, a little word spacing; body text line-height 2; no italic. */
html[dir="rtl"] :is(h1, h2, h3, h4, h5, h6, .hero__title, .statement, .quote, .brand-card__name, .step__n) {
  font-weight: 700; line-height: 1.4; word-spacing: .05em; letter-spacing: 0;
}
html[dir="rtl"] main :is(p, li) { line-height: 2; letter-spacing: 0; }
html[dir="rtl"] * { font-style: normal; }
html[dir="rtl"] body, html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] button { font-family: var(--font-body); }

/* Arabic is never letter-spaced or upper-cased (the English design uses both on labels, buttons, titles). */
html[dir="rtl"] * { letter-spacing: 0; text-transform: none; }

/* Arrows: the brand-card arrow ("→") is mirrored to point left. The ">" in the plain .btn is already mirrored by the browser's
   bidi rules in RTL, so it is left alone (if a .btn ever gets "→", mirror it too). */
html[dir="rtl"] .brand-card__cta .btn__arrow { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .brand-card__cta:hover .btn__arrow { transform: translateX(-4px) scaleX(-1); }
html[dir="rtl"] .btn:hover .btn__arrow { transform: translateX(-4px); }
/* The 404 buttons use "→" (not mirrored by the browser): mirror them like the brand cards. */
html[dir="rtl"] .pl-404__actions .btn__arrow { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .pl-404__actions .btn:hover .btn__arrow { transform: translateX(-4px) scaleX(-1); }

/* Skip link appears on the right. */
html[dir="rtl"] .skip-link { left: auto; right: var(--s-4); }

/* Hidden anti-spam field sits off-screen to the left: in RTL that would add a sideways scroll, so push it right instead. */
html[dir="rtl"] [style*="left:-9999px"] { left: auto !important; right: -9999px; }

/* Language switch (AR on English pages, EN on Arabic pages; this block is NOT scoped: the English twin loads this file too).
   Sits in the header after the nav, styled like the nav links; on phones it moves next to the menu button, outside the drawer. */
/* Desktop: logo at the start, nav links centred in the header, switch at the end (Riyadh, 2026-11-15). */
@media (min-width: 901px) {
  .header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  .header__logo { justify-self: start; }
  .header__lang { justify-self: end; }
}
.header__lang { display: flex; align-items: center; min-height: 44px; padding-inline: .25rem; font-family: "Outfit Variable", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t-label); letter-spacing: var(--ls-label); text-transform: uppercase; white-space: nowrap; font-weight: 500;
  border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.header__lang:hover, .header__lang:focus-visible { border-bottom-color: currentColor; }
/* Phones, Arabic pages: the menu button sits on the left, so the drawer slides in from the left (English: from the right). */
@media (max-width: 900px) {
  html[dir="rtl"] .header__nav { transform: translate(-100%); }
  html[dir="rtl"] .header__nav[data-open=true] { transform: translate(0); }
}
@media (max-width: 900px) {
  .header__lang { order: 1; margin-inline-start: auto; min-width: 44px; justify-content: center; font-size: .8125rem; }
  .header__toggle { order: 2; }
  .header__inner { gap: var(--s-3); }
}
html[dir="rtl"] .header__lang { font-size: .875rem; letter-spacing: .08em; font-weight: 600; }

/* Email, phone and URL fields: typed in Latin, so left-to-right text, but sitting on the right edge. */
html[dir="rtl"] input[dir="ltr"] { text-align: right; }

/* Form labels: Arabic labels need a bit more size than the tiny uppercase English ones. */
html[dir="rtl"] .field label, html[dir="rtl"] .details__label, html[dir="rtl"] .brand-card__meta,
html[dir="rtl"] .btn, html[dir="rtl"] .brand-card__cta, html[dir="rtl"] .header__nav a { font-size: 0.9375rem; }

/* Brand pages: the Instagram button uses "→" (not mirrored by the browser): mirror it like the brand cards.
   (The "Visit jaderoom.sa" button uses ">", which the browser mirrors itself.) */
html[dir="rtl"] .pl-follow a[href*="instagram.com"] .btn__arrow { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .pl-follow a[href*="instagram.com"].btn:hover .btn__arrow { transform: translateX(-4px) scaleX(-1); }
