/* LinguaEmpire — "Works with" strip (shared).
 *
 * Loaded by the sibling builders via:
 *   <link rel="stylesheet" href="linguaempire-works-with.css">
 *   <script src="linguaempire-works-with.js" defer></script>
 * (Paths are relative to the page; locale copies under ar/, de/, … use
 *  ../linguaempire-works-with.css / ../linguaempire-works-with.js.)
 *
 * Contract (markup is supplied by the sibling builders, this file only
 * styles it — it must not be edited here):
 *   <section class="le-works-with">
 *     <h2 class="le-works-with-title">…</h2>
 *     <button type="button" class="le-works-with-pause"
 *             aria-label="Pause" data-play="Play">Pause</button>
 *     <div class="le-works-with-track">
 *       <a class="le-works-with-tile" href="integrations.html">
 *         <span class="le-works-with-mark">G</span>
 *         <span class="le-works-with-name">Google Docs</span>
 *         <span class="le-works-with-live">Live</span>   <!-- ONE tile only -->
 *       </a>
 *       <a class="le-works-with-tile" href="integrations.html">
 *         <img class="le-works-with-logo"
 *              src="linguaempire-works-with-logos/wordpress.svg"
 *              alt="" aria-hidden="true">
 *         <span class="le-works-with-name">WordPress / WPML</span>
 *       </a>
 *       … 21 tiles, then the same 21 tiles repeated once more …
 *     </div>
 *   </section>
 * Logo tiles use a local Simple Icons (CC0) SVG file; the three tiles
 * with no brand mark (Public API + Webhooks, CLI / Git, Akeneo) keep
 * the text monogram (.le-works-with-mark).
 *
 * Honesty rules for this strip: local brand logos only (Simple Icons
 * CC0 files in linguaempire-works-with-logos/, never hot-linked,
 * never copied from another platform), no wording that presents
 * integrations as anything other than integrations — these are
 * integrations the platform works with, nothing more. Only the 21
 * real integrations are listed; the "Live" badge appears on one tile
 * only (the Public API + Webhooks tile, whose status is live).
 *
 * Timing (21 tiles, re-timed 2026-11-12): the loop keeps the SAME
 * linear speed (px/s) as the 15-tile strip, so durations scale by
 * 21/15 = 1.4x — 45s -> 63s desktop, 32s -> 45s mobile (32 x 1.4 =
 * 44.8s, rounded to 45s; +0.45% duration, imperceptible). Keeping
 * 45s would have made the longer strip run visibly faster.
 * Full arithmetic in SLIDER-REPORT.md (works-with-strip-21).
 *
 * No external references, no imports, no external fonts/images here.
 */

/* ------------------------------------------------------------------ */
/* Strip band — sits directly above the footer, clear separation.      */
/* ------------------------------------------------------------------ */
.le-works-with {
  background: #eef1f5;                 /* light band, distinct from page bg */
  border-top: 1px solid #dbe0e8;
  border-bottom: 1px solid #dbe0e8;
  padding: 28px 0 32px;
  margin: 0;
  overflow: hidden;                    /* animation never causes page scroll */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #1a2332;
}

.le-works-with-title {
  margin: 0 20px 6px;
  text-align: center;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #1a2332;
}

/* Pause / Play control. Small, quiet, keyboard-reachable. */
.le-works-with-pause {
  display: block;
  margin: 0 auto 18px;
  padding: 6px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a2332;
  background: #fff;
  border: 1px solid #c4cbd6;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  cursor: pointer;
}
.le-works-with-pause:hover,
.le-works-with-pause:focus-visible {
  border-color: #1a2332;
  outline: 2px solid #f5c542;
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Track — continuous seamless auto-scroll.                            */
/*                                                                     */
/* The track holds TWO copies of the same 21-tile set (42 tiles).    */
/* Translating it by exactly -50% of its own width therefore moves     */
/* one full set out of view and lands on the identical second set,     */
/* so the loop restarts with no visible jump.                          */
/*                                                                     */
/* Seam condition (padding vs gap): the second set starts at pad-left  */
/* + sum(first 21 tile widths) + 21 gaps; half the track is sum(first  */
/* 21) + 20.5 gaps + pad-left + pad-right. The two agree exactly when  */
/* pad-left = gap/2 — desktop 7px pad / 14px gap, mobile 5px pad /    */
/* 10px gap (a 7px mobile pad gave a 2.00px seam, fixed 2026-11-11 by  */
/* setting the mobile pad to 5px; re-checked with 21 tiles — see       */
/* SLIDER-REPORT.md in works-with-strip-21).                           */
/*                                                                     */
/* Timing (21 tiles, re-timed 2026-11-12, same linear speed as the     */
/* 15-tile strip): 63s desktop — 45s x 21/15 = 45s x 1.4 = 63.0s;      */
/* mobile 45s — 32s x 1.4 = 44.8s, rounded to 45s (see the media       */
/* query below).                                                       */
/*                                                                     */
/* RTL safety: the track is forced direction:ltr (see comment below)   */
/* so the translateX keyframe always moves the same visual way,        */
/* regardless of the page's dir="rtl" (ar copy). Text inside the       */
/* tiles is unaffected — tile labels keep the page direction.          */
/*                                                                     */
/* RTL PLACEMENT FIX (2026-11-12): direction:ltr alone does NOT make   */
/* the strip RTL-safe. The track is a width:max-content block inside   */
/* an RTL section, and CSS over-constraint rules right-align such a    */
/* box in RTL (its margin-left is ignored and goes to -6028px at a     */
/* 1280px viewport): the track's left edge sat at x=-6028, so the      */
/* viewport showed only the track's TAIL (tiles 35-41) at loop start   */
/* and a completely EMPTY band once translateX passed -1280px —        */
/* measured over a full 63s loop on ar: 8 tiles at t=0s, 1 at t=20s,   */
/* ZERO for t=25s..60s (~40 of 63s blank), 7 again after restart.      */
/* Pre-existing defect of the 15-tile strip, not caused by the         */
/* 21-tile extension or the re-timing (same CSS, same mechanism).      */
/* float:left pins the track to the section's LEFT edge in every       */
/* locale (in LTR it is already left-aligned, so nothing changes       */
/* there); the reduced-motion rule below sets float:none so the        */
/* static wrapping row stays centred.                                  */
/* ------------------------------------------------------------------ */
.le-works-with-track {
  /* Force LTR on the scrolling strip only: in RTL the flex row and the
     translateX(-50%) end-point would otherwise be mirrored, breaking
     the seamless loop (the track would jump or scroll the wrong way).
     Direction here governs layout/animation geometry only; tile text
     still renders in the page's own direction. */
  direction: ltr;
  display: flex;
  float: left;                     /* RTL placement: pin to the section's left edge (see comment above) */
  gap: 14px;
  width: max-content;
  max-width: none;
  padding: 4px 7px;                    /* room for tile shadows at the edges */
  animation: le-works-with-scroll 63s linear infinite;
  will-change: transform;
}

@keyframes le-works-with-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Pause on hover, on keyboard focus anywhere inside the section, and
   when the JS toggle adds .le-works-with-paused to the section. */
.le-works-with:hover .le-works-with-track,
.le-works-with:focus-within .le-works-with-track,
.le-works-with.le-works-with-paused .le-works-with-track {
  animation-play-state: paused;
}

/* ------------------------------------------------------------------ */
/* Tiles — clean, legible text tiles matching the site card style:     */
/* white card, dark text, 10px radius, subtle shadow, system-ui.       */
/* ------------------------------------------------------------------ */
.le-works-with-tile {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  color: #1a2332;
  border: 1px solid #dbe0e8;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
}
.le-works-with-tile:hover,
.le-works-with-tile:focus-visible {
  border-color: #1a2332;
  outline: 2px solid #f5c542;
  outline-offset: 2px;
}

/* Generic first-letter monogram — no brand artwork. */
.le-works-with-mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a2332;
  color: #f5c542;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

/* ------------------------------------------------------------------ */
/* Brand logo — local Simple Icons (CC0) SVG as <img> in the tile.     */
/*                                                                     */
/* Fixed height + aspect-ratio:1 make the mark's box a CSS-sized      */
/* 28px square both before AND after the image loads, so a tile's     */
/* width never changes mid-loop. That is what keeps the two 21-tile   */
/* halves exactly equal, and therefore the translateX(-50%) loop     */
/* seamless: image loading cannot shift tile widths. width:auto      */
/* keeps the mark's natural square shape; max-width is a belt-and-   */
/* braces cap for browsers without aspect-ratio support (the SVGs    */
/* are all viewBox="0 0 24 24", so width:auto already resolves       */
/* square). object-fit:contain guards against any non-square file.   */
/* The rule matches ANY <img> inside a tile (class optional), so it   */
/* works whatever class the builders put on the element.              */
/* ------------------------------------------------------------------ */
.le-works-with-tile img,
.le-works-with-logo {
  flex: 0 0 auto;
  display: block;
  height: 28px;
  width: auto;
  aspect-ratio: 1;
  max-width: 28px;
  object-fit: contain;
}

/* Brand colours for the three logo files shipped WITHOUT a brand
 * fill. CORRECTION to LOGO-MANIFEST.md: the manifest says these
 * files "render in currentColor" — they do NOT. Verified by grep
 * (no `currentColor` string in any of the three files) and by
 * screenshot (Canva rendered black with `color` set): their
 * <path> carries no fill at all, so the SVG default (black) wins
 * and a `color` declaration has no effect on the glyph.
 *
 * Official hexes, resolved from the Simple Icons data files (NOT
 * guessed) — full source trail in CSSJS-REPORT.md:
 *   Canva               #00C4CC  (simple-icons 15.22.0 data)
 *   Microsoft OneDrive  #0078D4  (simple-icons 12.4.0 _data)
 *   Salesforce          #00A1E0  (simple-icons 15.22.0 data)
 *
 * Mechanism (CSS-only; the SVG files are another agent's
 * deliverable and must NOT be edited here): the tile gets a
 * solid brand-colour patch exactly behind the mark (the mark is
 * always the tile's first child, so the patch sits at the tile's
 * left padding edge, vertically centred), and the mark itself
 * gets a white background + mix-blend-mode:screen. Screen-blend
 * turns the black glyph pixels into the patch colour and leaves
 * the white surround white — verified by headless screenshot
 * (Canva renders as a teal disc on a white tile). The other nine
 * SVGs carry their own brand fill attribute and get NO blend
 * rule, so they are unaffected.
 *
 * The `color` rules below are kept as well: they do nothing on
 * the as-shipped files, but they are the correct mechanism the
 * moment any of the three SVGs gains a currentColor fill, and
 * they document the brand colour in the obvious place.
 *
 * Fallback safety: the patch and blend rules live inside
 * @supports selector(:has(...)), so a browser without :has()
 * drops the whole block and the mark simply renders as a black
 * glyph on white — never invisible. The patch offsets MUST track
 * the tile padding + mark size in this file: 18px / 28px on
 * desktop, 14px / 24px at <=720px (see the media query below). */
.le-works-with-tile img[src$="canva.svg"] { color: #00c4cc; }
.le-works-with-tile img[src$="microsoftonedrive.svg"] { color: #0078d4; }
.le-works-with-tile img[src$="salesforce.svg"] { color: #00a1e0; }

@supports selector(.le-works-with-tile:has(> img)) {
  .le-works-with-tile:has(> img[src$="canva.svg"]) {
    background-image: linear-gradient(#00c4cc, #00c4cc);
    background-size: 28px 28px;
    background-position: 18px 50%;
    background-repeat: no-repeat;
  }
  .le-works-with-tile:has(> img[src$="microsoftonedrive.svg"]) {
    background-image: linear-gradient(#0078d4, #0078d4);
    background-size: 28px 28px;
    background-position: 18px 50%;
    background-repeat: no-repeat;
  }
  .le-works-with-tile:has(> img[src$="salesforce.svg"]) {
    background-image: linear-gradient(#00a1e0, #00a1e0);
    background-size: 28px 28px;
    background-position: 18px 50%;
    background-repeat: no-repeat;
  }
  /* Blend rule only for these three files (never for the nine
     pre-coloured SVGs: screen-blend against white would erase
     their colour). Scoped under the same :has() so it can never
     apply without its patch. */
  .le-works-with-tile:has(> img[src$="canva.svg"]) > img[src$="canva.svg"],
  .le-works-with-tile:has(> img[src$="microsoftonedrive.svg"]) > img[src$="microsoftonedrive.svg"],
  .le-works-with-tile:has(> img[src$="salesforce.svg"]) > img[src$="salesforce.svg"] {
    background: #fff;
    mix-blend-mode: screen;
  }
}

.le-works-with-name {
  color: #1a2332;
}

/* "Live" badge — present on ONE tile only (Public API + Webhooks). */
.le-works-with-live {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6f4ea;
  color: #067647;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ */
/* Reduced motion — animation off, static wrapping row.                */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .le-works-with-track {
    animation: none;
    float: none;                   /* undo the RTL placement float: the static row is a normal centred block */
    width: auto;
    max-width: 1020px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ------------------------------------------------------------------ */
/* Small screens — tiles shrink, strip never overflows horizontally.   */
/* The section's overflow:hidden plus width:max-content on the track    */
/* keeps the scrolling strip inside the viewport; nothing here may     */
/* introduce horizontal page scroll.                                   */
/* ------------------------------------------------------------------ */
@media (max-width: 720px) {
  .le-works-with {
    padding: 22px 0 26px;
  }
  .le-works-with-title {
    font-size: 20px;
  }
  .le-works-with-track {
    gap: 10px;
    padding: 4px 5px;
    animation-duration: 45s;                 /* 32s x 21/15 = 44.8s, rounded to 45s (same linear speed) */
  }
  .le-works-with-tile {
    padding: 10px 14px;
    font-size: 14px;
    gap: 8px;
  }
  .le-works-with-mark {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }
  .le-works-with-tile img,
  .le-works-with-logo {
    height: 24px;
    max-width: 24px;
  }
  /* Small-screen brand patches: track the shrunken tile padding
     (14px) and mark size (24px) — see the brand-colour comment. */
  .le-works-with-tile:has(> img[src$="canva.svg"]),
  .le-works-with-tile:has(> img[src$="microsoftonedrive.svg"]),
  .le-works-with-tile:has(> img[src$="salesforce.svg"]) {
    background-size: 24px 24px;
    background-position: 14px 50%;
  }
}
