/* Book Me case study: before/after slider, flow loop, empathy lightbox trigger.
   Page-specific styles only. The shared lightbox classes (.lightbox, .lb-fig,
   .lb-close, .lb-prev, .lb-next, .lb-count) live in v2.css and are reused, not redefined. */

/* ---------- before / after drag slider ---------- */
.bm-ba-fig { margin: 0 auto; max-width: 360px; }
.bm-ba-fig figcaption { margin-top: 14px; display: grid; gap: 2px; }
.bm-ba-fig figcaption b { font-weight: 400; font-style: italic; color: var(--paper); display: block; font-size: 24px; }
.bm-ba__box { position: relative; width: 100%; aspect-ratio: 402 / 874; overflow: hidden; background: #000; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; }
.bm-ba__box img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.bm-ba__before { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bm-ba__before img { max-width: none; }
.bm-ba__after-mask { position: absolute; top: 0; bottom: 0; right: 0; overflow: hidden; pointer-events: none; }
.bm-ba__handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--paper); z-index: 4; pointer-events: none; }
.bm-ba__knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 56px; height: 38px; padding: 0 10px; border-radius: 999px; background: var(--paper); color: var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 20px; letter-spacing: .02em; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); pointer-events: none; }
.bm-ba__tag { position: absolute; top: 12px; z-index: 6; font-family: var(--display); text-transform: uppercase; font-size: 14px; letter-spacing: .06em; padding: 5px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.bm-ba__tag--l { left: 12px; background: var(--ink); color: var(--paper); }
.bm-ba__tag--r { right: 12px; background: var(--paper); color: var(--ink); border: 1px solid rgba(27, 23, 20, .25); }
.bm-ba__handle:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }

/* empathy map tile trigger: same "Enlarge" chip as .zoom, without the shared lightbox hook */
.bm-map-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; }
.bm-map-open::after { content: "Enlarge"; position: absolute; right: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px; background: var(--black); color: var(--paper); font-family: var(--serif); font-size: 16px; }
.bm-map-open img { width: 100%; }

/* ---------- flow loop: one camera pass across four screens, 12 seconds ---------- */
/* Stage height: the phone is a paper frame (12px mat) around a 402x874 screen, so the
   phone is (phw - 24px) * 874/402 tall, plus 26px of dark stage above and below. */
.bmloop { --phw: min(216px, 74vw); position: relative; overflow: hidden; background: #0d0b0a; border: 1px solid var(--line-strong); height: calc((var(--phw) - 24px) * 2.174 + 76px); max-width: 860px; margin: 0 auto; }
.bmloop-world { position: absolute; left: 0; top: 0; width: 100%; height: 100%; will-change: transform; transform-origin: 0 0; }
.bmloop-row { position: absolute; left: 0; top: 26px; display: flex; gap: 79px; padding: 0 43px; align-items: flex-start; }
.bmloop-phone { position: relative; z-index: 1; margin: 0; flex: none; width: var(--phw); }
.bmloop-screen { position: relative; }
.bmloop-screen img { display: block; width: 100%; height: auto; max-height: none; }
.bmloop-sel { position: absolute; border: 2px solid var(--ink); border-radius: 10px; opacity: 0; pointer-events: none; z-index: 2; }
.bmloop-ball { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); opacity: 0; z-index: 5; pointer-events: none; }
.bmloop-ball::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--ink); }
.bmloop-check { position: absolute; left: 49.9%; top: 12.3%; width: 19.9%; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; z-index: 2; }
.bmloop-check svg { display: block; width: 100%; height: 100%; }
.bmloop-toggle { position: absolute; top: 12px; right: 12px; z-index: 6; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--paper); background: var(--black); color: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.bmloop-toggle:hover { background: var(--paper); color: var(--ink); }
.bmloop-toggle span { display: flex; align-items: center; justify-content: center; line-height: 0; }
.bmloop-toggle span[hidden] { display: none; }
.bmloop-steps { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; justify-content: center; }
.bmloop-step { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; font-size: 16px; color: var(--paper); border: 2px solid var(--paper); border-radius: 999px; padding: 6px 16px 6px 8px; background: transparent; cursor: pointer; }
.bmloop-step b { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 14px; }
.bmloop-step.is-on { background: var(--paper); color: var(--ink); }
.bmloop-step.is-on b { background: var(--ink); color: var(--paper); }
.bmloop-bar { height: 3px; background: var(--line-strong); border-radius: 2px; margin-top: 14px; overflow: hidden; }
.bmloop-bar span { display: block; height: 100%; width: 0; background: var(--paper); }

/* Reduced motion: no camera, no cursor — the four screens sit still in a row. */
.bmloop.is-static { height: auto; overflow: visible; }
.bmloop.is-static .bmloop-world { position: static; transform: none !important; }
.bmloop.is-static .bmloop-row { position: static; flex-wrap: wrap; justify-content: center; gap: 24px; padding: 26px; }
.bmloop.is-static .bmloop-ball,
.bmloop.is-static .bmloop-toggle { display: none; }
.bmloop.is-static ~ .bmloop-steps,
.bmloop.is-static ~ .bmloop-bar { display: none; }
