/* ==========================================================================
   ECCO landing page — right-to-left layer, /ar/ecco only.

   SOURCE: ~/ecco-source/brand-ecco-rtl.css. build-page.py copies this file to
   assets/web/css/ and links it from the ARABIC head only, so the English page
   never downloads it and its markup does not change when a rule here does.

   brand-ecco.css was written with logical properties, so most of the page
   mirrors by itself once <main> is dir="rtl". What is here is the remainder:
   things that are physical on purpose (a gradient angle, a keyframe, a JS
   scroller that reads scrollLeft) and type decisions that only make sense for
   Latin script. Every selector starts at html[dir="rtl"] as a second lock.
   ========================================================================== */

/* ---- Type ---------------------------------------------------------------
   Figtree has no Arabic glyphs, so Arabic text was already falling through to
   whatever came next in the stack. Name the fallbacks deliberately instead:
   the fonts each platform ships for Arabic UI text, Latin-capable too, so a
   model name such as "BIOM 720" inside an Arabic sentence matches its line. */
html[dir="rtl"] .ecco-lp{
  --font:'Segoe UI','SF Arabic','Geeza Pro','Noto Sans Arabic','Noto Naskh Arabic',Tahoma,Arial,sans-serif;
  /* Arabic sits taller on the line than Latin at the same size. */
  line-height:1.75;
}
/* Letter-spacing breaks the joins between Arabic letters. Zero it everywhere
   rather than chase each rule: no tracking value on this page suits Arabic. */
html[dir="rtl"] .ecco-lp,
html[dir="rtl"] .ecco-lp *{letter-spacing:0 !important;}
/* Headings were tightened for Latin capitals; Arabic needs the air back so
   marks above and below a line do not touch the next one. */
html[dir="rtl"] .ecco-lp .ec-h1{line-height:1.3;}
html[dir="rtl"] .ecco-lp .ec-h2{line-height:1.35;}
html[dir="rtl"] .ecco-lp h3{line-height:1.5;}
/* Slanted Arabic is a synthesised oblique, not a typeface. */
html[dir="rtl"] .ecco-lp .ec-serif,
html[dir="rtl"] .ecco-lp .ec-pull,
html[dir="rtl"] .ecco-lp figcaption,
html[dir="rtl"] .ecco-lp .ec-price i{font-style:normal;}

/* ---- Hero ---------------------------------------------------------------
   The copy now sits on the right, so the diagonal wash that carries the
   headline has to start from the right. Same stops, mirrored angle. */
html[dir="rtl"] .ecco-lp .ec-hero-img::after{
  background:linear-gradient(to top,rgba(12,12,13,.62) 0%,rgba(12,12,13,.30) 14%,rgba(12,12,13,0) 30%),
             linear-gradient(260deg,rgba(12,12,13,.80) 0%,rgba(12,12,13,.52) 40%,rgba(12,12,13,0) 72%);
}

/* The photograph is mirrored with it. Left to right, the couple stand on the
   right and the copy sits on the quiet wall to the left; mirroring the frame
   gives the Arabic page that same composition instead of laying the headline
   across the two faces. Nothing in the frame carries lettering. */
html[dir="rtl"] .ecco-lp .ec-hero-img img{transform:scaleX(-1);}
/* 16ch was measured against the English headline. Each Arabic line is its own
   block already, so the cap only forced a third line. */
html[dir="rtl"] .ecco-lp .ec-hero .ec-h1{max-width:none;}

/* ---- Arrows -------------------------------------------------------------
   Text arrows are swapped in the markup (&larr; on Arabic). The drawn arrow
   inside buttons is an SVG, so it is flipped here, and every hover nudge
   moves the way the arrow now points. */
html[dir="rtl"] .ecco-lp .ec-btn-ico{transform:scaleX(-1);}
html[dir="rtl"] .ecco-lp .ec-btn--solid:hover .ec-btn-ico,
html[dir="rtl"] .ecco-lp .ec-btn--light:hover .ec-btn-ico,
html[dir="rtl"] .ecco-lp .ec-btn--ghost:hover .ec-btn-ico{transform:scaleX(-1) translateX(3px);}
html[dir="rtl"] .ecco-lp .ec-textlink:hover span,
html[dir="rtl"] .ecco-lp .ec-more-tile:hover .ec-more-tile-arrow,
html[dir="rtl"] .ecco-lp .ec-tile:hover .ec-tile-go{transform:translateX(-3px);}

/* ---- Trust strip --------------------------------------------------------
   The 4-up grid set its facts flush left by name. */
html[dir="rtl"] .ecco-lp .ec-trust li{text-align:right;}
/* Below 480px the strip is a marquee that slides a two-copy rail by -50%.
   That maths only works on a rail that starts at the left edge, so the rail
   keeps left-to-right flow and each fact goes back to right-to-left inside. */
@media (max-width:479px) and (prefers-reduced-motion:no-preference){
  html[dir="rtl"] .ecco-lp .ec-trust-rail{direction:ltr;}
  html[dir="rtl"] .ecco-lp .ec-trust-rail li{direction:rtl;}
}

/* ---- "Just landed" carousel ---------------------------------------------
   brand-ecco.js pages this row and draws its progress bar from scrollLeft,
   which runs negative in a right-to-left scroller. The track, its paging
   buttons and the bar therefore stay left-to-right as one unit (so the left
   button still scrolls left), and the cards inside read right-to-left. */
html[dir="rtl"] .ecco-lp .ec-trend-rail,
html[dir="rtl"] .ecco-lp .ec-trend-nav,
html[dir="rtl"] .ecco-lp .ec-trend-bar{direction:ltr;}
html[dir="rtl"] .ecco-lp .ec-trend-rail > *{direction:rtl;}

/* ---- Numbers and Latin fragments ----------------------------------------
   "-30%" would otherwise render as "30%-", and the phone number would have
   its "+" moved to the far end.
   `plaintext` rather than `direction:ltr`: the badge is positioned with
   inset-inline-start, and giving it its own direction moved it to the other
   corner of the card, underneath the wishlist button. */
html[dir="rtl"] .ecco-lp .ec-badge,
html[dir="rtl"] .ecco-lp a[href^="tel:"]{unicode-bidi:plaintext;}
/* Size cells are numbers such as "5½": left-to-right inside the cell, or the
   fraction lands in front of the digit. Columns still run right to left. */
html[dir="rtl"] .ecco-lp .ec-table td{direction:ltr;text-align:right;}

/* ---- "Coming soon" tile badge --------------------------------------------
   The badge is a white plate, and inside a tile the ink token is re-pointed
   to white for the label underneath, so its text came out white on white.
   (The English page has the same fault; it is left alone there because the
   English output is frozen for this pass.) */
html[dir="rtl"] .ecco-lp .ec-tile-soon{color:#111;}
