/*
Right-to-left overrides for the Dami Tech theme.

style.css uses logical properties wherever CSS offers them, so this file carries
only what has no logical form: mirrored gradient angles, mirrored artwork
framing, the arrow glyphs, and Arabic typography.
Loaded after style.css by dami_tech_rtl_style().
*/

/* Arabic display and text faces. Cairo has a real 900 master; synthetic bolding destroys the joins. */
[dir=rtl]{
    --heading:Cairo,'Barlow Condensed',Tahoma,sans-serif;
    --subheading:Cairo,'Barlow Condensed',Tahoma,sans-serif;
    --body:Cairo,Tahoma,Arial,sans-serif;
}
/* Letter-spacing is inserted between joined Arabic glyphs and severs the connecting baseline. */
[dir=rtl] h1,[dir=rtl] h2{letter-spacing:normal;text-transform:none;line-height:1.45}
[dir=rtl] h3{line-height:1.5}
[dir=rtl] .brand-word,[dir=rtl] .brand-tech{letter-spacing:1px}
[dir=rtl] .eyebrow{font-size:15px;letter-spacing:normal}
[dir=rtl] .hero h1{font-size:68px}
[dir=rtl] .service-content h3{line-height:1.5}

/* The wordmark is a Latin brand and must not reorder to "TECH DAMI". */
[dir=rtl] .brand{direction:ltr}
/* Bidi reordering mangles the @ and the dots inside an Arabic run. */
[dir=rtl] .contact-details a{direction:ltr;justify-content:flex-end}
[dir=rtl] input[type=email],[dir=rtl] input[type=tel]{direction:ltr;text-align:right}

/* Arrow glyphs point along the reading direction. */
[dir=rtl] .button .icon,[dir=rtl] .service-link .icon{transform:scaleX(-1)}
[dir=rtl] .button:hover .icon{transform:scaleX(-1) translateX(3px)}
[dir=rtl] .step-arrow{transform:scaleX(-1)}

/* Mirrored gradient angles: 360 - x. Vertical gradients (0deg, 180deg) are unaffected. */
[dir=rtl] .eyebrow{background:linear-gradient(#0b0b0b,#0b0b0b) padding-box,linear-gradient(230deg,#4b4b4b,transparent 30%,transparent 65%,#525252) border-box}
[dir=rtl] .service-media::after{background:linear-gradient(240deg,#05050566,transparent 55%),linear-gradient(0deg,#06060694,transparent 58%)}
[dir=rtl] .wave-surface::after{background:linear-gradient(270deg,#0004,transparent 60%,#0002)}
[dir=rtl] .benefit{background:linear-gradient(235deg,#161616e6,#0e0e0e8a)}
[dir=rtl] .step-card{background:linear-gradient(225deg,#202020,#151515) padding-box,linear-gradient(220deg,#484848,#181818,#4b4b4b) border-box}
[dir=rtl] .site-footer::before{background:repeating-linear-gradient(276deg,#15151588 0,#07070700 15px,#0006 35px,#0d0d0d44 43px);mask-image:linear-gradient(270deg,transparent,#000 30%,#000 75%,transparent)}

/* Mirrored artwork framing. */
[dir=rtl] .why-section .section-art{object-position:40% center}

@media(max-width:900px){
    [dir=rtl] .hero h1{font-size:48px}
}
@media(max-width:640px){
    [dir=rtl] .hero-video{object-position:35% center}
    [dir=rtl] h1,[dir=rtl] h2{letter-spacing:normal}
    [dir=rtl] .hero h1{font-size:36px}
    /* On mobile the connector already points down, so it must not also be flipped. */
    [dir=rtl] .step-arrow{transform:rotate(90deg)}
}
