/* ---------- language menu ---------- */
.lang{position:relative}
.lang-b{display:inline-flex;align-items:center;gap:7px;height:32px;padding:0 12px;border:1px solid var(--line2);border-radius:999px;background:transparent;color:var(--paper);font:500 12px/1 var(--mono);letter-spacing:.06em;cursor:pointer;transition:background .3s,color .3s}
.lang-b:hover,.lang-b[aria-expanded="true"]{background:var(--paper);color:#000}
.lang-b .g{font-size:13px;opacity:.8}
.lang-m{position:absolute;top:calc(100% + 8px);inset-inline-end:0;min-width:168px;padding:6px;border:1px solid var(--line2);border-radius:16px;background:rgba(10,10,10,.92);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);display:grid;gap:2px;opacity:0;transform:translateY(-6px);pointer-events:none;transition:opacity .2s,transform .2s;z-index:60}
.lang-m.open{opacity:1;transform:none;pointer-events:auto}
.lang-m a{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:10px;font:500 14px/1 var(--sans);color:#d8d5cc}
.lang-m a:hover{background:rgba(237,235,228,.08);color:var(--paper)}
.lang-m a[aria-current]{color:var(--paper)}
.lang-m a[aria-current]::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--red)}
.lang-m a[lang="fa"]{font-family:"KMfa",var(--sans)}
.lang-m a[lang="ar"]{font-family:"KMar",var(--sans)}

/* ---------- Persian + Arabic type: only the Arabic-script glyphs come from these files ---------- */
@font-face{font-family:"KMfa";src:url(fonts/vazirmatn-ar.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+2010-2011,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:"KMar";src:url(fonts/kufi-ar.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+2010-2011,U+FB50-FDFF,U+FE70-FEFC}
/* Farsi display: cinematic poster faces (stand-ins for Gofteh / Daftar from the Dom Font Suggestion reel) */
@font-face{font-family:"KMfaDisp";src:url(fonts/lalezar-fa.woff2) format("woff2");font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
@font-face{font-family:"KMfaHand";src:url(fonts/ruqaa-fa.woff2) format("woff2");font-display:swap;unicode-range:U+0600-06FF,U+0750-077F,U+0870-08FF,U+200C-200E,U+FB50-FDFF,U+FE70-FEFC}
html[lang="fa"]{--sans:"KMfa","Geist",system-ui,sans-serif;--mono:"KMfa","Geist",system-ui,sans-serif;--disp:"KMfaDisp","Archivo","Geist",sans-serif;--rtlf:"KMfaHand"}

html[lang="ar"]{--sans:"KMar","Geist",system-ui,sans-serif;--mono:"KMar","Geist",system-ui,sans-serif;--disp:"KMar","Archivo","Geist",sans-serif;--rtlf:"KMar"}

/* joined scripts break with letter-spacing, condensed stretch and tight leading */
html[dir="rtl"] body *{letter-spacing:0!important}
html[dir="rtl"] :is(h1,h2,h3,.h3-h,.price,.st-price){line-height:1.25!important}
html[dir="rtl"] :is(h1,h2,h3,h4){font-weight:800}
html[dir="rtl"] .h3-h{font-size:clamp(40px,6.4vw,112px)}
html[dir="rtl"] :is(.sh h2,.stu-head h2,.cbox h2){font-size:clamp(34px,5.2vw,84px)}
/* the red serif accent: Latin stays Instrument italic, Persian/Arabic takes the bold face in red */
html[dir="rtl"] :is(.sh h2,.cbox h2,.h3-h .l2,.stu-head h2,.se-head h3) i{font-family:"Instrument",var(--rtlf),serif;font-weight:800;font-style:normal}
html[dir="rtl"] .h3-h .l2 i{font-size:1em}
html[dir="rtl"] .marq .tr span{font-weight:700}

/* layout mirroring that the browser can't do by itself */
html[dir="rtl"] .hd{direction:rtl}
html[dir="rtl"] :is(.pill,.ghost,.chip){direction:rtl}
html[dir="rtl"] .h3-copy,html[dir="rtl"] .h3-top{text-align:right}
html[dir="rtl"] details summary{text-align:right}
html[dir="rtl"] input,html[dir="rtl"] textarea{text-align:right}
html[dir="rtl"] input[type="email"]{direction:ltr;text-align:right}
html[dir="rtl"] .meta a[href^="mailto"]{direction:ltr;unicode-bidi:isolate}
/* prices and other numbers read left-to-right inside RTL lines */
html[dir="rtl"] :is(.price,.st-price,.pr,.se-row b,[data-p],.cc){unicode-bidi:isolate}

/* French lines run ~20% longer: let the big condensed headings shrink a touch */
html[lang="fr"] .h3-h{font-size:clamp(40px,5.4vw,104px)}
html[lang="fr"] .h3-h .l2 i{font-size:.96em}
/* if a translated accent line wraps, keep its lines from stacking on top of each other */
html:not([lang="en"]) .h3-h .l2{line-height:1}

/* Farsi weights come last so they win over the shared RTL rules */
html[lang="fa"] :is(h1,h2,h3,.h3-h,.price,.st-price){font-synthesis:none;font-weight:400}
html[lang="fa"] :is(.sh h2,.cbox h2,.h3-h .l2,.stu-head h2,.se-head h3) i{font-weight:700;font-synthesis:none;font-size:1.08em}

/* hero: copy on the right, industry rail on the left when reading right-to-left */
html[dir="rtl"] .h3-copy{left:auto;right:var(--side)}
html[dir="rtl"] .h3-rail{right:auto;left:var(--side)}
@media (max-width:1000px){html[dir="rtl"] .h3-copy{left:var(--side)}}

/* Kufi runs wide: keep the Arabic hero to two lines */
html[lang="ar"] .h3-h{font-size:clamp(36px,4.9vw,90px)}
