/* #works (owner: S2; pass 7: SECTIONS) · רצפות אפוקסי, מקרוב (pass 2: no kicker, no numbering, no per-frame tags, captions =
   finish · space, one "התמונות להמחשה" note; text from the c.css tokens)
   An editorial strip on paper: tall 4:5 frames with a one-line caption; a before / after on a bounded handle; the launch card,
   whose plate is a film panel with the price on it (pass 7: the letter fill is gone).
   Type: the pass-7 scale (heading 34-40 px phones / 56-72 px desktops). Motion: the heading pours in and the intro and the card's
   text arrive (the page's one reveal, data-in); the frames arrive with a paper lift (they rise, their shadow grows, then
   settles), once on arrival on every device (.is-in from works.js, 600 ms): pass 7 dropped the desktop scrub, so nothing rests
   half-lifted when the scroll stops. Transform / opacity only: the two shadows are pseudo-elements whose opacity crossfades. */

.works { position: relative; z-index: 2; padding: 14svh var(--gut) 12svh; }

/* ---------- the head ---------- */
.works__head { display: grid; gap: 18px; margin-bottom: 8svh; }
.works__h {
  font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-synthesis: none;
  font-size: clamp(34px, 3px + 8.6vw, 40px); line-height: 1; color: var(--ink); margin: 0;
}
.works__hl { display: block; }
.works__intro { display: grid; gap: 12px; max-width: 34ch; }
.works__sub { margin: 0; font: 400 var(--fs-lead)/1.5 var(--text); color: var(--ink); }
.works__note { margin: 0; font: 400 var(--fs-s)/1.5 var(--text); color: var(--ink-3t); }   /* (pass 4, INFRA: small text, 5.1:1) */
@media (min-width: 900px) {
  .works { padding-top: 18svh; }
  /* the sub sits right beside the headline (RTL: to its left), on its last line */
  .works__head { display: flex; align-items: flex-end; gap: 4vw; margin-bottom: 12svh; }
  .works__h { flex: none; font-size: clamp(56px, 24px + 2.5vw, 72px); }
  .works__intro { flex: 0 1 34ch; padding-bottom: .55em; }
}

/* ---------- the strip ---------- */
.works__strip { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9svh; }
.works .wk { min-width: 0; }
.wk__fig { display: grid; gap: 10px; position: relative; }
/* phones: an editorial rhythm, full-width frames and narrower ones set to the other edge */
.works .wk:nth-child(3n+2) .wk__fig, .works .wk:nth-child(3n) .wk__fig { width: 84%; }
.works .wk:nth-child(3n+2) .wk__fig { margin-inline-start: auto; }
.works .wk--ba .wk__fig { width: 100% !important; margin: 0 !important; }
.wk__frame { position: relative; isolation: isolate; aspect-ratio: 4 / 5; background: var(--paper-2); }
.wk__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* two shadows: lifted (big, soft) and settled (close); their opacity carries the lift (compositor only) */
.wk__frame::before, .wk__frame::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.wk__frame::before { box-shadow: 0 46px 70px -34px rgba(11, 10, 9, .62), 0 18px 30px -18px rgba(11, 10, 9, .26); opacity: 0; }
.wk__frame::after { box-shadow: 0 1px 0 rgba(20, 18, 16, .08), 0 22px 34px -26px rgba(11, 10, 9, .55); }
.wk__cap { padding-top: 4px; font: 500 var(--fs-s)/1.4 var(--text); color: var(--ink-2); }
@media (min-width: 900px) {
  .works__strip { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(28px, 3.4vw, 64px); row-gap: 10svh; }
  .works .wk .wk__fig, .works .wk--ba .wk__fig { width: 100% !important; margin: 0 !important; }
  /* a contact sheet: the columns are staggered */
  .works .wk:nth-child(3n+2) { padding-top: 14svh; }
  .works .wk:nth-child(3n) { padding-top: 5svh; }
}

/* the paper lift (motion sweep plan 006, pass 7: on a clock on every device): once on arrival (.is-in from works.js, when a frame's
   top passes 90 % of the screen): a 32 px rise in 600 ms, the lifted shadow swells and settles in 600 ms, the close shadow comes
   in 300 ms after 250 ms. Compositor only; at rest within 600 ms. */
html.js .wk__fig { transform: translateY(32px); transition: transform 600ms var(--ease-out); }
html.js .wk__frame::before { opacity: .4; }
html.js .wk__frame::after { opacity: 0; transition: opacity var(--t-fade) var(--ease-out) 250ms; }
html.js .works .wk.is-in .wk__fig { transform: none; }
html.js .works .wk.is-in .wk__frame::before { animation: wkBigT 600ms var(--ease-out) both; }
html.js .works .wk.is-in .wk__frame::after { opacity: 1; }
@keyframes wkBigT { 0% { opacity: .4; } 45% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- before / after ---------- */
.works .ba { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; overflow: hidden; }
.works .ba img { pointer-events: none; -webkit-user-drag: none; }
/* (RTL: "before" is the right side, the handle's position --p is measured from the left edge) */
.ba__before { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--p, 50%)); }
.ba__lbl {
  position: absolute; top: 12px; z-index: 2; font: 500 var(--fs-s)/1 var(--text); color: var(--ink);
  background: var(--paper); padding: 7px 11px 6px; box-shadow: 0 0 0 1px rgba(20, 18, 16, .12);
}
.ba__lbl--before { right: 12px; }
.ba__lbl--after { left: 12px; }
.ba__handle {
  position: absolute; top: 0; bottom: 0; left: var(--p, 50%); width: 0; z-index: 3; pointer-events: none;
}
.ba__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -.75px; width: 1.5px; background: var(--pearl); box-shadow: 0 0 10px rgba(0, 0, 0, .35); }
.ba__handle i {
  position: absolute; top: 50%; left: 0; width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--paper) url(../assets/paper.webp) 0 0 / 256px 256px; box-shadow: 0 0 0 1px rgba(20, 18, 16, .16), 0 10px 26px -10px rgba(11, 10, 9, .6);
  transition: transform .25s var(--ease);
}
.ba__handle i::before, .ba__handle i::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 6px solid transparent; transform: translateY(-50%);
}
.ba__handle i::before { left: 11px; border-right-color: var(--ink); border-left-width: 0; }
.ba__handle i::after { right: 11px; border-left-color: var(--ink); border-right-width: 0; }
.works .ba.is-drag .ba__handle i { transform: translate(-50%, -50%) scale(1.08); }
/* the range is the keyboard / screen-reader control (it never takes a touch: the frame does, with pan-y) */
.ba__range {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 1px; margin: 0; opacity: 0; pointer-events: none;
}
.works .ba:has(.ba__range:focus-visible) .ba__handle i { outline: 2px solid var(--copper); outline-offset: 3px; }
.works .ba.is-focus .ba__handle i { outline: 2px solid var(--copper); outline-offset: 3px; }

/* ---------- the launch card: a numbered print ---------- */
.works .print {
  margin-top: 14svh; display: grid; gap: 28px; position: relative;
  padding: 18px; background: var(--pearl) url(../assets/paper.webp) 0 0 / 256px 256px;
  box-shadow: 0 1px 0 rgba(20, 18, 16, .06), 0 30px 60px -40px rgba(11, 10, 9, .55);
}
.print__plate {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; overflow: clip; display: grid; place-items: center;
  background: #3d3732; color: var(--pearl); isolation: isolate;
}
.print__plate picture, .print__img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.print__img { object-fit: cover; object-position: 50% 50%; }
/* a soft dark centre so the pearl numerals hold on the veins */
.print__plate::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(11, 10, 9, .62), rgba(11, 10, 9, .28) 70%, rgba(11, 10, 9, .1)); }
.print__n {
  position: relative; z-index: 2; direction: ltr; letter-spacing: 0; line-height: 1;
  font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-synthesis: none;
  font-size: clamp(64px, 6px + 16vw, 88px); color: var(--pearl);
}
html.a11y-contrast .print__plate picture, html.a11y-contrast .print__tag { display: none; }   /* (high contrast: no picture behind the price) */
.print__tag {
  position: absolute; z-index: 2; top: 10px; left: 10px;
  font: 500 var(--fs-xs)/1 var(--text); letter-spacing: .04em; color: var(--pearl);
  background: rgba(12, 11, 10, .72); padding: 6px 9px 5px; pointer-events: none;
}
.print__txt { display: grid; gap: 14px; justify-items: start; padding: 0 2px 6px; }
.print__h {
  font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-synthesis: none;
  font-size: clamp(30px, 2px + 7.6vw, 36px); line-height: 1; color: var(--ink); max-width: 16ch; margin: 0;
}
.print__p { font: 400 var(--fs-lead)/1.5 var(--text); color: var(--ink); max-width: 34ch; }
.print__p strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
.print__terms { font: 400 var(--fs-xs)/1.55 var(--text); color: var(--ink-3t); max-width: 46ch; }   /* (pass 4, INFRA: small text, 5.1:1) */
.print__cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 8px; }
/* (QA-19) the text link beside the button: a 44 px tall hit area, nothing visible moves */
.print__cta .lnk { position: relative; }
.print__cta .lnk::after { content: ""; position: absolute; inset: -6px -4px; }
@media (min-width: 900px) {
  .works .print { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 5vw; padding: 26px 26px 26px 5vw; margin-top: 16svh; }
  .print__plate { aspect-ratio: 5 / 4; }
  .print__n { font-size: clamp(88px, 7vw, 128px); }
  .print__h { font-size: clamp(40px, 12px + 2.4vw, 56px); }
}

/* reduced motion: everything in place */
html.rm .wk__fig { transform: none !important; }
html.rm .wk__frame::before { opacity: 0 !important; }
html.rm .wk__frame::after { opacity: 1 !important; }
