/* designs (tools/sections/designs.html): pieces on iJewel Design as glass cards; a click opens one live in a box over the page.
   The kit's variables have fallbacks here, so the section also works on a page without /site/assets/kit.css (/products/asset-library/). */
.k-dz { --k-dz-gut: var(--k-gut, clamp(16px, 4vw, 48px)); --k-dz-ease: var(--k-ease, cubic-bezier(.22, 1, .36, 1));
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; margin: 0; padding: 0; list-style: none; text-align: left; }
.k-dz > li { min-width: 0; }
.k-dz-card .k-plate { display: flex; flex-direction: column; height: 100%; box-sizing: border-box; transition: transform .35s var(--k-dz-ease), box-shadow .35s var(--k-dz-ease); }
.k-dz-media { -webkit-appearance: none; appearance: none; display: block; width: 100%; aspect-ratio: 1; margin: 0; padding: 0; border: 0; font: inherit; cursor: pointer; }  /* the whole poster is the button */
.k-dz-media > img { transition: transform .8s var(--k-dz-ease); -webkit-user-drag: none; user-select: none; }
.k-dz-media:focus-visible { outline: 2px solid #6E72F2; outline-offset: 3px; }
.k-dz-play { position: absolute; left: 50%; top: 50%; z-index: 2; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 6px; border-radius: 999px;
  background: rgba(25, 24, 38, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font: 500 14px/1 var(--sans); white-space: nowrap;
  opacity: 0; transform: translate(-50%, -40%); transition: opacity .3s, transform .3s; pointer-events: none; }  /* "View live" in the picture's middle, under the pointer */
.k-dz-play i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #6E72F2, #8f93ff); }
.k-dz-play svg { width: 14px; height: 14px; margin-left: 2px; }
.k-dz-media:focus-visible .k-dz-play { opacity: 1; transform: translate(-50%, -50%); }
.k-dz-info { display: flex; align-items: center; gap: 10px; padding: 12px 4px 4px 8px; }
.k-dz-info > span { flex: 1; min-width: 0; }
.k-dz-info b, .k-dz-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* a long name does not widen its card */
.k-dz-info b { font: 500 16px/1.25 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.k-dz-info small { margin-top: 3px; font: 400 13px/1.3 var(--sans); color: var(--ink2); }
.k-dz-open { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--ink2); text-decoration: none; transition: background .2s, color .2s; }
.k-dz-open:hover { background: rgba(110, 114, 242, .1); color: #5053D0; }
.k-dz-open svg { width: 18px; height: 18px; }
/* the last card: a glass bar under the two rows on a laptop and a tablet (the grid ends on a full row), one more card on a phone */
.k-dz-more { grid-column: 1 / -1; }
.k-dz-go { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 84px; box-sizing: border-box; padding: 14px 24px; text-decoration: none; color: var(--ink);
  background: linear-gradient(160deg, rgba(252, 241, 246, .82), rgba(240, 246, 255, .82)); transition: transform .35s var(--k-dz-ease), box-shadow .35s var(--k-dz-ease); }
.k-dz-go img { width: 113px; height: auto; }
.k-dz-go b { font: 500 18px/1.25 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.k-dz-go i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; transition: transform .3s var(--k-dz-ease); }
.k-dz-go i svg { width: 18px; height: 18px; }
.k-dz-go:focus-visible { outline: 2px solid #6E72F2; outline-offset: 3px; }
.k-dz-dots { display: none; }  /* a phone's row only (below) */
@media (hover: hover) {
  .k-dz-card:hover .k-plate, .k-dz-go:hover { transform: translateY(-6px); box-shadow: var(--k-edge), 0 26px 90px -40px rgba(40, 44, 120, .25); }
  .k-dz-card:hover .k-dz-media > img { transform: scale(1.05); }
  .k-dz-card:hover .k-dz-play { opacity: 1; transform: translate(-50%, -50%); }
  .k-dz-go:hover i { transform: translateX(3px); }
}
@media (hover: none) { .k-dz-play { opacity: 1; transform: translate(-50%, -50%); } }  /* a tap is not a hover: the button shows from the start */
@media (max-width: 860px) {
  .k-dz { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .k-dz-play { height: 36px; padding: 0 14px 0 5px; font-size: 13px; } .k-dz-play i { width: 26px; height: 26px; }
}
/* a phone (Dasha, 22 Oct, on the landing: the cards must be easy to scroll there): one row that a thumb swipes, a card and the
   edge of the next in view so the row shows it goes on, each swipe stopping on a card's edge, a dot for each card */
@media (max-width: 640px) {
  .k-dz { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: -12px calc(-1 * var(--k-dz-gut)) -36px; padding: 12px var(--k-dz-gut) 36px; scroll-padding: 0 var(--k-dz-gut); }  /* out to the screen's edges; room for the shadow */
  .k-dz::-webkit-scrollbar { display: none; }
  .k-dz > li { flex: 0 0 min(76%, 300px); scroll-snap-align: start; }
  .k-dz-go { flex-direction: column; gap: 14px; height: 100%; padding: 22px; text-align: center; }
  .k-dz-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
  .k-dz-dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(25, 24, 38, .16); transition: width .3s var(--k-dz-ease), background .3s; }
  .k-dz-dots i.on { width: 18px; background: #6E72F2; }
}
/* the box over the page: the piece live in iJewel Design's embed; a thin bar in its colours until the embed has loaded */
.k-lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(226, 229, 240, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.k-lb.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.k-lb-box { position: relative; display: flex; flex-direction: column; width: min(960px, 100%); height: min(700px, calc(100svh - 48px)); overflow: hidden; border-radius: 28px; background: #fff;
  box-shadow: 0 40px 90px -30px rgba(40, 44, 120, .5), 0 0 0 1px rgba(25, 24, 38, .05); transform: translateY(16px) scale(.98); transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
.k-lb.on .k-lb-box { transform: none; }
.k-lb-stage { position: relative; flex: 1; min-height: 0; }
.k-lb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.k-lb-poster { position: absolute; inset: 8% 12%; width: 76%; height: 84%; object-fit: contain; opacity: .5; filter: blur(6px); transition: opacity .5s; pointer-events: none; }  /* under the pointer, the frame: a drag turns the piece, it never picks up this picture */
.k-lb.is-live .k-lb-poster { opacity: 0; }
.k-lb-info { display: flex; align-items: center; gap: 12px; padding: 14px 18px 14px 22px; border-top: 1px solid rgba(25, 24, 38, .06); text-align: left; }
.k-lb-info > span { min-width: 0; }
.k-lb-info b, .k-lb-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-lb-info b { font: 500 16px/1.25 var(--sans); letter-spacing: -.01em; color: var(--ink); }
.k-lb-info small { margin-top: 2px; font: 400 13px/1.3 var(--sans); color: var(--ink2); }
.k-lb-info a { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; font: 500 14px/1 var(--sans); white-space: nowrap; }
.k-lb-info a:hover { background: #2b2940; }
.k-lb-info a svg { width: 16px; height: 16px; }
.k-lb-x { -webkit-appearance: none; appearance: none; position: absolute; right: 14px; top: 14px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 1px solid rgba(25, 24, 38, .08); border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; }
.k-lb-x:hover { background: #fff; }
.k-lb-x svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .k-lb { padding: 10px; } .k-lb-box { height: min(620px, calc(100svh - 20px)); border-radius: 22px; } .k-lb-info { padding: 12px 12px 12px 16px; } .k-lb-info a { padding: 0 12px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .k-dz-card .k-plate, .k-dz-media > img, .k-dz-go, .k-lb, .k-lb-box { transition: none; } .k-dz-card:hover .k-plate, .k-dz-go:hover { transform: none; } }
