/* CALYNEVO 0.8.15 — case-study slides + image viewer (zoom only the image). */

/* ---------- Case-study slides ---------- */
.cs-chapter-lead { max-width: 760px; margin: -6px 0 22px; color: var(--inverse-muted); font-size: .94rem; line-height: 1.65; }
.cs-slides { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px 24px; }
.cs-slides.cs-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cs-slide { margin: 0; min-width: 0; }
.cs-slide.cs-wide { grid-column: 1 / -1; }
.cs-open { position: relative; display: block; overflow: hidden; border-radius: 12px; line-height: 0; cursor: zoom-in;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 26px 60px -30px rgba(0, 0, 0, .75); }
.cs-open img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease, ease); }
.cs-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.cs-slide figcaption { padding-top: 14px; font-size: .88rem; line-height: 1.55; color: var(--inverse-muted); }
.cs-slide figcaption strong { display: block; margin-bottom: 2px; color: var(--inverse-text); font-size: 1rem; font-weight: 700; }
.case-clean-visual .cs-open { border-radius: var(--radius, 12px); box-shadow: var(--shadow-2, 0 20px 50px -28px rgba(0, 0, 0, .35)); }
html body .case-clean-intro .case-clean-visual .cs-open img { border: 0; box-shadow: none; border-radius: 0; }

/* Zoom icon: always visible on touch screens, on hover / focus with a mouse. */
.cs-open::after { content: ""; position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(20, 22, 21, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: .9; transition: opacity .25s ease, transform .25s ease, background-color .25s ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .cs-open::after { opacity: 0; transform: scale(.9); }
  .cs-open:hover::after, .cs-open:focus-visible::after { opacity: 1; transform: none; background-color: var(--accent); }
  .cs-open:hover img { transform: scale(1.012); }
}
@media (max-width: 860px) {
  .cs-slides.cs-two { grid-template-columns: minmax(0, 1fr); }
  .cs-slides { gap: 28px; }
}
@media (max-width: 640px) {
  .cs-open { border-radius: 8px; }
  .cs-open::after { width: 32px; height: 32px; right: 8px; bottom: 8px; background-size: 15px; }
  .cs-slide figcaption { font-size: .84rem; }
}

/* ---------- Image viewer ---------- */
html.cv-lock, html.cv-lock body { overflow: hidden; }
.cal-viewer { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 10, 9, var(--cv-fade, 1)); color: #F4F1EC; overflow: hidden; overscroll-behavior: contain; font-family: inherit; }
.cal-viewer::backdrop { background: transparent; }
.cal-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: cv-in .22s ease; }
@keyframes cv-in { from { opacity: 0; } to { opacity: 1; } }
.cv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 8px; }
.cv-count { font-size: .85rem; letter-spacing: .08em; color: rgba(244, 241, 236, .72); font-variant-numeric: tabular-nums; }
.cv-tools { display: flex; gap: 8px; }
.cv-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(244, 241, 236, .24); background: rgba(255, 255, 255, .06); color: #F4F1EC; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.cv-btn:hover { background: var(--accent, #FF5A1F); border-color: var(--accent, #FF5A1F); color: #111; }
.cv-btn:focus-visible { outline: 2px solid var(--accent, #FF5A1F); outline-offset: 2px; }
.cv-btn[hidden] { display: none; }
.cv-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cv-stage { position: relative; display: flex; align-items: center; justify-content: center; margin: 0 clamp(8px, 5vw, 88px); overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.cal-viewer.cv-zoomed .cv-stage { cursor: grab; }
.cv-img { display: block; max-width: none; border-radius: 6px; transform-origin: center center; will-change: transform; -webkit-user-drag: none;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.cv-img.cv-anim { transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.cv-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); background: rgba(10, 10, 9, .6); }
.cv-prev { left: 16px; }
.cv-next { right: 16px; }
.cv-cap { max-width: 900px; margin: 0 auto; padding: 10px 20px max(16px, env(safe-area-inset-bottom)); text-align: center; font-size: .9rem; line-height: 1.45; color: rgba(244, 241, 236, .7); }
.cv-cap strong { display: block; color: #F4F1EC; font-size: 1.02rem; font-weight: 700; }
.cal-viewer.cv-zoomed .cv-cap, .cal-viewer.cv-zoomed .cv-nav { opacity: 0; pointer-events: none; }
.cv-hint { position: absolute; left: 50%; bottom: 96px; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 9px 16px; transform: translateX(-50%);
  border: 1px solid rgba(244, 241, 236, .18); border-radius: 99px; background: rgba(28, 28, 26, .94); color: #F4F1EC; font-size: .82rem; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.cal-viewer.cv-show-hint .cv-hint { opacity: 1; }
@media (pointer: coarse) { .cv-nav, .cv-zin, .cv-zout { display: none; } .cv-stage { cursor: default; } }
@media (max-width: 640px) { .cv-stage { margin: 0; } .cv-img { border-radius: 0; } .cv-cap { font-size: .84rem; } .cv-cap strong { font-size: .96rem; } }
@media (prefers-reduced-motion: reduce) {
  .cal-viewer[open] { animation: none; }
  .cs-open img, .cs-open::after, .cv-img.cv-anim { transition: none; }
}
