/* ═══════════════════════════════════════════════════════════════════════
   TREATMENT: slider
   The dual slider from deloitte.com/us/en/services/consulting/services/
   engineering-ai-data.html, which is the page JT pointed at.

   ⛔ WHAT IT ACTUALLY IS, AND THE MISREAD THAT NEARLY GOT BUILT.

   probe-deloitte-ai.py measured DIV.cmp-dual-slider-v2__right-wrapper at
   10 distinct transforms, 7,207.9px of horizontal travel, and called it
   SCROLL-LINKED. That was WRONG, and probe-dual-slider.py caught it by
   walking the ancestor chain:

       DIV  cmp-dual-slider-v2__right-wrapper   relative
       LI   swiper-slide cmp-dual-slider-v2__slide-item
       UL   swiper-wrapper cmp-dual-slider-v2__slides
       DIV  cmp-dual-slider-v2__container

   `swiper-slide` and `swiper-wrapper` are Swiper. It is a CAROUSEL, and
   the 7,208px was it advancing through slides during the seconds I spent
   scrolling. Sampling over time while scrolling reads time-based motion as
   scroll-driven. The first probe also reported "motion libraries: NONE"
   because it sniffed network requests and Swiper is bundled into their
   main script, so it never appeared as its own file.

   The /about.html photo collage IS genuinely scroll-linked and that port
   stands. This one is different and needed a different build.

   ⛔ NO SWIPER HERE. The CSP in .htaccess refuses outside script hosts,
   and self-hosting a carousel library to move two panels is not a trade
   worth making. CSS scroll-snap gives the same two-pane advance with zero
   script, keyboard access for free, and a native scrollbar on touch.

   Scoped to main.
   ═══════════════════════════════════════════════════════════════════════ */

[data-treatment="slider"] main .dual{
  display:grid;gap:clamp(20px,3vw,44px);align-items:center;
  grid-template-columns:minmax(0,1fr)}
@media(min-width:900px){
  [data-treatment="slider"] main .dual{
    grid-template-columns:minmax(0,5fr) minmax(0,7fr)}
}

/* LEFT: the copy pane. Holds still, which is the half that makes the
   right-hand movement legible. */
[data-treatment="slider"] main .dual-copy h2{margin-bottom:10px}
[data-treatment="slider"] main .dual-copy p{max-width:46ch}

/* RIGHT: the strip. One row, snapping, scrollable by wheel, touch,
   keyboard and the dots below. */
[data-treatment="slider"] main .dual-strip{
  display:grid;grid-auto-flow:column;
  grid-auto-columns:min(100%,560px);
  gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;
  scroll-behavior:smooth;padding-bottom:10px;
  scrollbar-width:thin;overscroll-behavior-x:contain}
[data-treatment="slider"] main .dual-slide{
  scroll-snap-align:center;min-width:0;
  background:#fff;border:1px solid var(--rule-light);
  border-top:3px solid var(--hue,#0f5450);border-radius:var(--r-soft);
  padding:clamp(18px,2vw,26px);
  box-shadow:0 20px 48px -38px rgba(4,20,36,.5)}
[data-treatment="slider"] main .dual-slide img{
  display:block;width:100%;height:auto;border-radius:12px;margin-bottom:14px}
[data-treatment="slider"] main .dual-slide h3{
  font-family:var(--sans);font-size:15.5px;margin:0 0 8px}
[data-treatment="slider"] main .dual-slide p{
  font-size:14.5px;line-height:1.5;margin:0;max-width:none}
[data-treatment="slider"] main .dual-slide .dual-n{
  font-family:var(--sans);font-size:11px;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;color:var(--hue,#0f5450);
  display:block;margin-bottom:8px}

/* The slide the reader is on gets the weight. :has is widely supported
   now and this is a progressive enhancement: without it every slide keeps
   its resting state and nothing breaks. */
@supports selector(:has(*)){
  [data-treatment="slider"] main .dual-slide{
    transition:opacity .35s ease,transform .35s ease}
}

/* A row of dots that are REAL anchors, so this works with no JS at all
   and a keyboard user can tab through the slides. */
[data-treatment="slider"] main .dual-dots{
  display:flex;gap:10px;margin-top:14px;padding:0;list-style:none}
[data-treatment="slider"] main .dual-dots a{
  display:grid;place-items:center;width:44px;height:44px;
  text-decoration:none;border:0}
[data-treatment="slider"] main .dual-dots a::before{
  content:"";width:9px;height:9px;border-radius:50%;
  background:var(--rule-light);transition:background .25s ease}
[data-treatment="slider"] main .dual-dots a:hover::before,
[data-treatment="slider"] main .dual-dots a:focus-visible::before{
  background:var(--hue,#0f5450)}

@media (prefers-reduced-motion:reduce){
  [data-treatment="slider"] main .dual-strip{scroll-behavior:auto}
}

/* Under 900px the strip is the whole component and the copy sits above
   it, which is what their own layout does at tablet width. */
@media(max-width:899px){
  [data-treatment="slider"] main .dual-strip{
    grid-auto-columns:min(86%,420px);
    margin-inline:calc(var(--gut) * -1);
    padding-inline:var(--gut)}
}

/* One pane and a hole is not a two-pane layout. When the section has no
   heading of its own outside the deck, the strip takes the full width
   rather than leaving half a band empty. */
[data-treatment="slider"] main .dual--nocopy{grid-template-columns:minmax(0,1fr)}
[data-treatment="slider"] main .dual--nocopy .dual-copy{display:none}
@media(min-width:900px){
  [data-treatment="slider"] main .dual--nocopy{
    grid-template-columns:minmax(0,1fr)}
  [data-treatment="slider"] main .dual--nocopy .dual-strip{
    grid-auto-columns:min(100%,460px)}
}
