/* Arabic locale: Cairo typography and RTL finishing.
   Loaded last and only when html[lang=ar] (app/platform.php), so EN/FR keep Inter and are not affected.
   Cairo: SIL Open Font License 1.1 (fonts/Cairo-OFL.txt), variable 200-1000, hosted locally (CSP font-src 'self').
   ascent/descent overrides keep Cairo's 70/30 vertical balance but bring its very tall default line box (1.87em)
   down to 1.5em, so buttons, chips and table rows keep the height they were designed with. */
@font-face{font-family:'Cairo';font-style:normal;font-weight:200 1000;font-display:swap;ascent-override:105%;descent-override:45%;line-gap-override:0%;src:url(/assets/fonts/Cairo-arabic.woff2) format('woff2');unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-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,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EEFF}
@font-face{font-family:'Cairo';font-style:normal;font-weight:200 1000;font-display:swap;ascent-override:105%;descent-override:45%;line-gap-override:0%;src:url(/assets/fonts/Cairo-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Cairo';font-style:normal;font-weight:200 1000;font-display:swap;ascent-override:105%;descent-override:45%;line-gap-override:0%;src:url(/assets/fonts/Cairo-latin.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}

/* ---- Typography: Cairo everywhere (text, headings, buttons, fields, placeholders, menus, tables) ---- */
html[lang=ar]{--font-arabic:'Cairo',Tahoma,Arial,sans-serif;--font-sans:var(--font-arabic)}
html[lang=ar] :is(body,body *):not(code,kbd,pre,samp){font-family:var(--font-arabic)!important}
html[lang=ar] :is(input,textarea,select,button)::placeholder{font-family:var(--font-arabic)}
html[lang=ar] body{line-height:1.6}
/* Letter-spacing breaks the joining of Arabic letters: neutralise it, except on the Latin brand overline. */
html[lang=ar] body :not(.hero-overline){letter-spacing:0!important}
html[lang=ar] :is(h1,h2,h3,h4,h5,h6){line-height:1.35}
html[lang=ar] :is(code,kbd,pre,samp){direction:ltr;unicode-bidi:isolate}

/* ---- Photo banners: mirrored photo (cinema-hero-rtl.webp) and mirrored scrim, so the subject never sits behind RTL text ---- */
html[lang=ar] .platform .phero{background-image:linear-gradient(270deg,#061225dd,#06122540 70%,#06122500),url(/assets/cinema-hero-rtl.webp)}
html[lang=ar] .platform .phero .home-camera{display:none}
html[lang=ar] .platform :is(.pexplore-hero,.smart-hero){background-image:linear-gradient(270deg,#091830dd,#09183000),url(/assets/cinema-hero-rtl.webp)}
/* Festival page: the festival's own cover is never mirrored, only its scrim moves under the RTL title. */
html[lang=ar] .platform .festival-page.venice-demo .festival-hero{background-image:linear-gradient(270deg,rgba(2,12,27,.72),rgba(3,15,28,.12) 63%),url('/assets/venice-hero.webp')}
html[lang=ar] .platform .festival-hero:has(>.festival-cover-image)::before{background:linear-gradient(270deg,rgba(5,14,35,.9),rgba(5,14,35,.48) 65%,rgba(5,14,35,.15))}
@media(max-width:540px){html[lang=ar] .platform .festival-page.venice-demo .festival-hero{background-image:linear-gradient(270deg,rgba(2,12,27,.74),rgba(3,15,28,.35)),url('/assets/venice-hero.webp')}}
html[lang=ar] .platform .film-discovery-hero{background-image:linear-gradient(270deg,rgba(4,13,35,.93),rgba(4,13,35,.3)),url(/assets/cinema-hero-rtl.webp)}
html[lang=ar] .platform .submissions-hero{background-image:linear-gradient(270deg,#071227ed 20%,#08132777 55%,#07122720),url(/assets/cinema-hero-rtl.webp)}
html[lang=ar] .platform .member-profile-hero{background-image:linear-gradient(250deg,#0b1537f5,#101a43bf),url(/assets/cinema-hero-rtl.webp)}
html[lang=ar] .platform .pauth-story{background-image:linear-gradient(210deg,#09162df5 12%,#141e46b8 62%,#281657a6),url(/assets/cinema-hero-rtl.webp);background-position:0 0,31% center}
html[lang=ar] .platform.screen-dashboard .pheading{background-image:linear-gradient(270deg,var(--color-page) 48%,#f8faff66),url(/assets/cinema-hero-rtl.webp)}
/* Filmmaker dashboard banner: the illustrated photo (with its hand-written slogan) moves to the left, away from the title. */
html[lang=ar] .platform .dash-reference-hero{right:auto;left:0;mask-image:linear-gradient(270deg,transparent,var(--color-black) 14%),linear-gradient(180deg,transparent,var(--color-black) 16%)}
@media(max-width:760px){html[lang=ar] .platform .dash-reference-hero{left:-380px}}
html[lang=ar] .platform .filmmaker-dashboard .dash-deadline{padding:15px 14px 15px 0}
/* Film page banner: photo mirrored to the left, scrim from the right; the title never exceeds its column. */
html[lang=ar] .platform .film15-hero>.reference-art{inset:0 auto 0 0;transform:scaleX(-1)}
html[lang=ar] .platform .film15-hero:after{background:linear-gradient(270deg,#071026d9,#07102625)!important}
html[lang=ar] .platform .project-hero-content h1{width:auto;max-width:100%}

/* ---- User content typed in Latin script keeps its own direction (plaintext) but follows the RTL column ---- */
:where(html[lang=ar]) :where([data-user-content]){text-align:-webkit-match-parent;text-align:match-parent}
html[lang=ar] .platform :is(.festival-hero-copy,.project-hero-content)>:is(h1,p){text-align:right}

/* ---- Home hero ---- */
html[lang=ar] .platform .hero-numbers>div{font-size:11px;line-height:1.45}
html[lang=ar] .platform .hero-numbers>div:last-child{border-left:0;padding-left:0}
html[lang=ar] .platform .hero-numbers strong{font-size:13px}
html[lang=ar] .platform .phero h1{line-height:1.25;font-weight:800}
html[lang=ar] .platform .phero-inner>p:not(.hero-overline){line-height:1.7}
@media(max-width:600px){
 html[lang=ar] .platform .phero{background-image:linear-gradient(270deg,#061225dd,#06122599),url(/assets/cinema-hero-rtl.webp)}
 html[lang=ar] .platform .hero-numbers>div{padding-left:8px;font-size:10px}
 html[lang=ar] .platform .hero-numbers strong{font-size:11px}
}
