/* LAYAN — section IV «Результаты» v3: the photo stream (js/results.js).
   Reference: client recording 2026-10-28 of huyml.co (home, "Selected work").
   · .rsp is 100svh + --run tall; .rsp__stage sticks for the run. One scroll
     step (--run / (cases − 1)) = one case.
   · .rsp__scene: the photos. js places every card on a diagonal 3D path
     (next one low left, current centre, the last ones stacked up to the top
     right) and bends it with the scroll speed: each card is cut into
     horizontal slices (.rsp__sl) laid on an arc, so it curls like paper.
   · .rsp__list: procedure / name / story per case, centred in the right
     column, rolling in step with the photos; the current one is bright.
   · .rsp__count: the big rolling number bottom left (top left on phones).
   · Background: the soon.html curtain shader (.rsp__bg, js/results-bg.js,
     unchanged from v2), on the section's warm Black.
   · Reduced motion: no pin, no 3D; a plain list of photo + text (.rsp--static).
   Old versions: archive/results-v1/, archive/results-v2/. */

.rsp{
  --run:600svh;           /* set by js: (cases − 1) × step */
  --cw:360px;             /* card width, set by js */
  --ch:288px;
  position:relative;height:calc(100svh + var(--run));
  background:var(--black);color:var(--cotton-fluff);
}
.rsp__stage{position:sticky;top:0;height:100svh;overflow:hidden;contain:layout paint}
.rsp__bg{position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}

/* ---------- photos ---------- */
.rsp__scene{position:absolute;inset:0;z-index:1;perspective:1500px;pointer-events:none}   /* own stack: cards' z-index stays inside, the counter (z 3) stays on top */
.rsp__card{
  position:absolute;left:0;top:0;width:var(--cw);height:var(--ch);
  transform-style:preserve-3d;will-change:transform,opacity;visibility:hidden;
}
.rsp__card.is-on{visibility:visible}
/* one horizontal slice of the photo; js sets its place on the arc */
.rsp__sl{
  position:absolute;left:0;top:50%;width:100%;
  background-color:var(--burgundy-midnight);background-repeat:no-repeat;
  backface-visibility:hidden;-webkit-backface-visibility:hidden;
}

/* ---------- case list (right column) ---------- */
.rsp__list{
  position:absolute;top:0;bottom:0;left:66%;right:var(--pad-x);
  margin:0;padding:0;list-style:none;
  -webkit-mask:linear-gradient(transparent 0,#000 18%,#000 82%,transparent 100%);
          mask:linear-gradient(transparent 0,#000 18%,#000 82%,transparent 100%);
}
.rsp__it{
  position:absolute;left:0;right:0;top:0;
  display:flex;flex-direction:column;align-items:center;text-align:center;
  will-change:transform,opacity;cursor:pointer;
}
.rsp__it.is-cur{cursor:default}
.rsp__proc{
  margin:0 0 .55em;
  font:400 12px/1.2 var(--font-text);letter-spacing:.02em;color:var(--cream-a60);
}
.rsp__name{
  margin:0;
  font:400 clamp(26px,2.25vw,40px)/1 var(--font-display);letter-spacing:.01em;text-transform:uppercase;
}
.rsp__dash{display:block;width:10px;height:1px;margin:.9em 0 .85em;background:currentColor;opacity:.6}
.rsp__story{
  margin:0;max-width:34ch;
  font:400 13px/1.45 var(--font-text);color:var(--cream-a90);
}
.rsp__ph{display:none}

/* ---------- counter ---------- */
.rsp__count{
  position:absolute;left:var(--content-l);bottom:clamp(8px,2svh,24px);z-index:3;margin:0;
  display:flex;align-items:flex-start;pointer-events:none;
  font:400 clamp(110px,12.5vw,230px)/1 var(--font-display);letter-spacing:-.03em;
}
.rsp__num{display:flex;will-change:filter,transform}
.rsp__reel{display:block;height:.86em;overflow:hidden}
.rsp__strip{display:block;will-change:transform}
.rsp__strip i{display:block;height:.86em;line-height:.86em;font-style:normal;text-align:center}
.rsp__tot{
  margin:.25em 0 0 .6em;
  font:400 12px/1 var(--font-text);letter-spacing:.04em;color:var(--cream-a60);
}

/* «Следующий результат»: phones / tablets only, the doctors page's button */
.rsp__next{display:none}

/* ---------- phones / tablets: the huyml.co phone layout (client
   screenshot IMG_6611, measured at 393×793): counter top left, a 3:2 photo
   centred, the text anchored under it, «Пропустить» where the reference has
   its colour chips. js/results.js sets the item and button tops (client
   2026-11-05). */
@media (max-width:1023px){
  .rsp__list{left:var(--gutter);right:var(--gutter);top:0;bottom:0;z-index:2;-webkit-mask:none;mask:none}
  .rsp__it{will-change:transform,opacity,filter}
  .rsp__count{left:calc(var(--gutter) + 6px);top:13.2svh;bottom:auto;font-size:clamp(64px,22vw,124px)}
  .rsp__tot{margin:.2em 0 0 .9em;font-size:13px}
  .rsp__proc{margin:0 0 .45em;font-size:14px;letter-spacing:0}
  .rsp__name{font-size:clamp(26px,8vw,40px)}
  .rsp__dash{width:12px;margin:.75em 0 .9em;opacity:.35}
  .rsp__story{max-width:min(300px,76vw);font-size:14px;line-height:1.2}
  .rsp__next{
    position:absolute;left:50%;top:0;z-index:4;transform:translateX(-50%);
    display:inline-flex;align-items:center;gap:.6em;white-space:nowrap;
    font:400 14px/1 var(--font-text);color:var(--black);
    background:var(--cotton-fluff);border:0;border-radius:0;cursor:pointer;
    padding:.9em 1.4em;
    -webkit-tap-highlight-color:transparent;transition:background-color .3s;
  }
  .rsp__next svg{width:1em;height:1em;stroke:currentColor;fill:none;stroke-width:1.6}
  .rsp__next:active{background:var(--white)}
  .rsp__next:focus-visible{outline:2px solid var(--garnet);outline-offset:3px}
}
.rsp--static .rsp__next{display:none}

/* ---------- reduced motion: a plain list ---------- */
.rsp--static{height:auto}
.rsp--static .rsp__stage{position:relative;height:auto;overflow:visible;padding:clamp(64px,10svh,120px) var(--pad-x) 80px var(--content-l)}
.rsp--static .rsp__scene,.rsp--static .rsp__count{display:none}
.rsp--static .rsp__list{position:relative;inset:auto;-webkit-mask:none;mask:none;display:grid;gap:clamp(48px,8svh,96px)}
.rsp--static .rsp__it{position:relative;transform:none!important;opacity:1!important;cursor:default}
.rsp--static .rsp__ph{display:block;width:min(100%,420px);aspect-ratio:5/4;object-fit:cover;margin:0 0 24px}
