/* Shared case-study image enlargement (1 Oct 2026).
   Every .os-window image gets an "Enlarge" button; the enlarged view is a native
   <dialog>, so Escape, focus trapping and backdrop clicks come from the browser.
   Loaded after each case study's own stylesheet; tokens come from there. */

.os-window { position: relative; }
.os-window_body { position: relative; }

.lightbox_trigger {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border, #EAEAEA);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  color: var(--ink, #111);
  font: 500 0.8125rem/1 inherit;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms var(--ease, ease), transform 200ms var(--ease, ease);
}
.lightbox_trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.os-window:hover .lightbox_trigger,
.os-window:focus-within .lightbox_trigger,
.lightbox_trigger:focus-visible { opacity: 1; }
@media (hover: none) { .lightbox_trigger { opacity: 1; } }
.lightbox_trigger:hover { transform: translateY(-1px); background: #fff; }

.lightbox {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: 94vh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--body, #2F3437);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.35);
  overflow: hidden;
}
.lightbox::backdrop { background: rgb(17 17 17 / 0.72); }
.lightbox_bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 12px 12px 24px;
  border-bottom: 1px solid var(--border, #EAEAEA);
}
.lightbox_caption { margin: 0; font-size: 0.9375rem; --lh: 1.4; }
.lightbox_close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--border, #EAEAEA);
  border-radius: 50%;
  background: #fff;
  color: var(--ink, #111);
  cursor: pointer;
  font: inherit;
}
.lightbox_close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lightbox_body {
  max-height: calc(94vh - 69px);
  overflow: auto;
  background: var(--surface-2, #F4F3F0);
}
.lightbox_body img { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lightbox-in 220ms var(--ease, ease); }
  @keyframes lightbox-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
}
