/* Round 53 (Mo, 19 November 2026, /impeccable overdrive: "scrollable cards on the left, right with title stays
   sticky, impress me"; direction chosen: Focus pull). Brand films page, section "Making a brand film with us"
   (.deliver). Desktop only (992px and up): the three cards run down the left; the title, a frame counter and a
   cyan progress line stay pinned on the right. r53-focus-pull.js racks focus like a lens: the card at the middle of
   the screen is sharp and lit, the cards above and below sit softly out of focus and dimmed, and they ease through
   focus as the page scrolls. Phones and tablets keep the original card grid; reduced motion keeps the layout with
   every card sharp.
   Round 58 (Mo, 19 November 2026: "this should be on all services pages"): the ids became classes. The layout applies to
   every Deliver card section on a service page with two or more .dcard; the script adds .r53-on to each for the lens. */
@media (min-width: 992px) {
  .deliver:has(.dcard ~ .dcard) > .container {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(3rem, 7vw, 8rem); align-items: start;
  }
  .deliver:has(.dcard ~ .dcard) .xv-sec-head {
    grid-column: 2; grid-row: 1; position: sticky; top: max(7rem, calc(50svh - 8.5rem)); margin: 0;
    display: block; opacity: 1 !important; transform: none !important;
  }
  .deliver:has(.dcard ~ .dcard) .deliver-grid {
    grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 16svh;
    padding-block: 12svh 20svh; margin: 0;
  }
  .deliver .dcard {
    --fp: 0; max-width: 42rem; padding: clamp(2.25rem, 3.2vw, 3.25rem);
    transform-origin: 0 50%;
    transition: border-color .6s var(--ease-out, ease), background-color .6s var(--ease-out, ease) !important;
  }
  .deliver .dcard .dcard__h3 { font-size: clamp(1.7rem, 2.4vw, 2.35rem); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
  .deliver .dcard .dcard__p { font-size: 1.1rem; line-height: 1.6; max-width: 34em; }
  .deliver .dcard .num { font-size: .78rem; letter-spacing: .18em; }

  /* The lens. Set only once the script is running, so without it every card is simply sharp. */
  .deliver.r53-on .dcard {
    opacity: calc(1 - var(--fp) * .6) !important;
    filter: blur(calc(var(--fp) * 5px)) saturate(calc(1 - var(--fp) * .5));
    transform: scale(calc(1 - var(--fp) * .045)) !important;
    will-change: filter, transform, opacity;
  }
  .deliver.r53-on .dcard.is-focus { border-color: rgba(29, 190, 213, .38); background-color: #124541; }

  /* The pinned meter under the title: frame counter and progress line. */
  .deliver:has(.dcard ~ .dcard) .xv-sec-head h2 { max-width: 11ch; }
  .deliver .r53-meter { margin-top: clamp(2rem, 3.5vw, 3rem); max-width: 22rem; }
  .deliver .r53-count {
    display: flex; align-items: baseline; gap: .6em; font-family: "JetBrains Mono", monospace;
    font-variant-numeric: tabular-nums; color: var(--text-dim);
  }
  .deliver .r53-now { position: relative; display: inline-block; height: 1em; overflow: hidden; font-size: clamp(3rem, 4.6vw, 4.25rem); line-height: 1; color: var(--cyan, #1DBED5); letter-spacing: -.02em; }
  .deliver .r53-now span { display: block; transition: transform .55s var(--ease-out, ease), opacity .55s var(--ease-out, ease), filter .55s var(--ease-out, ease); }
  .deliver .r53-now span.is-out { position: absolute; inset: 0; opacity: 0; filter: blur(6px); transform: translateY(-60%); }
  .deliver .r53-now span.is-in { opacity: 0; filter: blur(6px); transform: translateY(60%); }
  .deliver .r53-of { font-size: .82rem; letter-spacing: .18em; }
  .deliver .r53-track { position: relative; height: 1px; margin-top: 1.25rem; background: rgba(234, 243, 235, .14); overflow: hidden; }
  .deliver .r53-fill { position: absolute; inset: 0; background: var(--cyan, #1DBED5); transform: scaleX(var(--r53-p, 0)); transform-origin: 0 50%; }
  .deliver .r53-label { margin-top: 1rem; font-family: "JetBrains Mono", monospace; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); min-height: 1.4em; transition: opacity .4s ease; }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
  .deliver.r53-on .dcard { opacity: 1 !important; filter: none; transform: none !important; }
  .deliver .r53-now span { transition: none; }
}
