/* Case galleries: 9 or 12 photographs, aligned rows, two-card mobile carousel. */
.case-gallery{padding:clamp(56px,7vw,100px) var(--pad,5vw)}
.case-gallery h2{font-size:clamp(34px,4.5vw,68px);line-height:1.04;margin:0 0 32px;letter-spacing:-.045em}
.case-gallery .section-heading{margin-bottom:32px}
.case-gallery .section-heading h2{margin-bottom:0}
.gallery-jump{margin-top:24px}
.article-body .case-gallery{padding:0;margin:44px 0}
.gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;max-width:1440px;min-width:0;margin-inline:auto}
.gallery-item{display:block;position:relative;break-inside:avoid;margin:0;min-width:0;min-height:44px;aspect-ratio:2/3;background:#e4e4e4;border-radius:8px;cursor:zoom-in}
.gallery-item img{display:block;width:100%;height:100%;max-width:100%;object-fit:cover;border-radius:inherit}
.gallery-carousel-controls{display:none}
.gallery-photo-index{position:absolute;inset:auto 0 0;padding:24px 14px 12px;display:flex;justify-content:space-between;color:white;background:linear-gradient(transparent,#0e0e0eaa);border-radius:0 0 8px 8px;font-size:11px;letter-spacing:.08em;pointer-events:none}
.gallery-photo-index>span{font-size:18px;line-height:1}
.gallery-dialog [hidden]{display:none!important}
.gallery-item:hover{outline:1px solid #8e8e8e;outline-offset:3px}
.gallery-item:focus-visible{outline:3px solid var(--orange,#ff5a2d);outline-offset:5px}

html.gallery-open,html.gallery-open body{overflow:hidden;overscroll-behavior:none}
.gallery-dialog{box-sizing:content-box;width:var(--gallery-photo-width,280px);height:var(--gallery-photo-height,420px);max-width:none;max-height:none;margin:auto;padding:0;border:1px solid #ffffff30;border-radius:8px;background:#111;color:#fff;overflow:hidden;overscroll-behavior:contain;color-scheme:dark;box-shadow:0 18px 70px #0005}
.gallery-dialog[open]{display:block}
.gallery-dialog::backdrop{background:rgba(8,8,8,.86)}
.gallery-dialog-head{position:absolute;inset:12px 12px auto auto;z-index:2}
.gallery-dialog h2,.gallery-caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.gallery-control{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:1px solid #ffffff80;border-radius:50%;background:#161616a6;color:#fff;font:inherit;font-size:24px;line-height:1;cursor:pointer;touch-action:manipulation;flex-shrink:0;backdrop-filter:blur(8px)}
.gallery-control:hover:not(:disabled){background:var(--orange,#ff5a2d);border-color:var(--orange,#ff5a2d);color:#171717}
.gallery-control:disabled{opacity:.35;cursor:default}
.gallery-control:focus-visible,.gallery-original:focus-visible{outline:3px solid #ff9e78;outline-offset:4px}
.gallery-close{font-size:31px}
.gallery-dialog-figure{width:100%;height:100%;margin:0}
.gallery-dialog-stage{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.gallery-dialog-image{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.gallery-dialog-image img{display:block;width:100%;height:100%;object-fit:contain;border-radius:0}
.gallery-loading,.gallery-image-error{position:absolute;inset:auto 20px;text-align:center;font-size:13px;line-height:1.7;color:#cccccc;margin:0}
.gallery-original{display:block;text-decoration:underline;text-underline-offset:4px;color:#f4f4f4;margin-top:12px;min-height:44px;padding:10px 0}
.gallery-dialog-footer{position:absolute;inset:auto 0 0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:30px 12px 12px;background:linear-gradient(transparent,#0009);pointer-events:none}
.gallery-description{min-width:0;font-size:12px;line-height:1.6}
.gallery-counter{font-size:11px;letter-spacing:.08em;font-variant-numeric:tabular-nums;color:white;white-space:nowrap;text-shadow:0 1px 4px #000}
.gallery-navigation{display:flex;gap:8px;flex-shrink:0;pointer-events:auto}

@media(max-width:760px){
  .case-gallery{padding:60px 22px}
  .case-gallery h2{margin-bottom:26px}
  .gallery-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - 12px)/2);gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none}
  .gallery-grid::-webkit-scrollbar{display:none}
  .gallery-item{border-radius:6px;scroll-snap-align:start}
  .gallery-item:focus-visible{outline-offset:-3px}
  .gallery-carousel-controls{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:18px}
  .gallery-carousel-hint{display:flex;flex-direction:column;gap:4px;margin:0;font-size:13px;line-height:1.4}
  .gallery-carousel-counter{color:#6b6b6b;font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.04em}
  .gallery-carousel-buttons{display:flex;gap:8px}
  .gallery-carousel-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:0;border:1px solid #b8b6b1;border-radius:50%;background:transparent;color:#171717;font:inherit;font-size:24px;line-height:1;cursor:pointer;touch-action:manipulation}
  .gallery-carousel-button:disabled{opacity:.3;cursor:default}
  .gallery-carousel-button:hover:not(:disabled){background:var(--orange,#ff5a2d);border-color:var(--orange,#ff5a2d)}
  .gallery-carousel-button:focus-visible,.gallery-grid:focus-visible{outline:2px solid var(--orange,#ff5a2d);outline-offset:3px}
  .gallery-dialog{border-radius:6px}
  .gallery-close{font-size:29px}
  .gallery-loading,.gallery-image-error{font-size:12px}
}
@media print{
  .gallery-dialog{display:none!important}
  .case-gallery{padding:25px 0;break-before:auto}
  .gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;grid-auto-columns:auto;overflow:visible}
  .gallery-carousel-controls{display:none}
  .gallery-item{break-inside:avoid}
}

/* Case covers use the best available source, within its real pixel width. */
.article-image.case-cover{
  width:min(calc(100% - 2 * var(--pad)),var(--cover-width));
  height:auto;
  aspect-ratio:8/5;
  margin-inline:auto;
}
.article-image.case-cover img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:var(--cover-position);
}
@media(max-width:760px){
  .article-image.case-cover{width:calc(100% - 44px);aspect-ratio:1/1}
}

/* KAOS: the venue's visual identity alongside the guests at its opening. */
.article-image.case-cover--duo{
  display:grid;
  grid-template-columns:43fr 57fr;
  grid-template-rows:minmax(0,1fr);
  gap:16px;
  overflow:visible;
  border-radius:0;
}
.case-cover-panel{
  min-width:0;
  min-height:0;
  overflow:hidden;
  border-radius:13px;
}
@media(max-width:760px){
  .article-image.case-cover--duo{
    grid-template-columns:1fr;
    grid-template-rows:auto auto;
    aspect-ratio:auto;
    gap:12px;
  }
  .case-cover--duo .case-cover-guests{order:-1;aspect-ratio:4/5}
  .case-cover--duo .case-cover-brand{aspect-ratio:8/3}
  .case-cover-panel{border-radius:8px}
}
