/* Gallery template (style galleries: skull, nature, characters, animal, eye, various) — markup from site/lib/gallery.mjs,
   behaviour in gallery.js. Tokens, buttons and type scale are the homepage's (site.css): Arial, ink #121212, accent #ff4d00.
   Layout = .wrap (max 1360, --gutter), spacing only from the --sp-* tokens (docs/type-system.md).
   Cover grid: 4 columns → ≤960 3 → ≤640 2; covers cropped to 3:4 in the grid only (full photo in the viewer). */

/* ---------- heading (kicker + h1) ---------- */
.gh { padding: calc(var(--header-h) + var(--sp-action) * 2) var(--gutter) var(--sp-action); text-align: center; }
.gh__kicker { margin: 0; font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.gh__title { margin-top: var(--sp-label); font: 400 var(--fs-h2)/1.12 var(--font); letter-spacing: -.02em; color: var(--ink); }

/* ---------- chapters: optional kicker + h2 (left) and text (right), then the works ---------- */
.gch { padding-bottom: var(--sp-section); }
.gch__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-head) var(--sp-action); align-items: start; padding-bottom: var(--sp-action); }
.gch--plain .gch__intro { display: block; }
.gch__kicker { margin: 0; font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.gch__title { margin-top: var(--sp-label); font: 400 var(--fs-h2)/1.12 var(--font); letter-spacing: -.02em; color: var(--ink); }
.gch__title em, .gch__title .accent { font-style: normal; color: var(--accent); }
.gch__text { font: 400 var(--fs-body)/1.6 var(--font); color: var(--ink); }
.gch__text p { margin: 0; }
.gch__text p + p { margin-top: var(--sp-para); }
.gch__text a { color: var(--accent); }
/* SEO chapters (queue pages): questions, steps and a booking button inside a chapter's text */
.gch__text h3 { margin: var(--sp-action) 0 0; font: 400 var(--fs-h3)/1.25 var(--font); letter-spacing: -.01em; color: var(--ink); }
.gch__text h3 + p { margin-top: var(--sp-head); }
.gch__text ol, .gch__text ul { margin: var(--sp-para) 0 0; padding: 0; list-style: none; counter-reset: step; }
.gch__text ol li { position: relative; padding: var(--sp-cap) 0 var(--sp-cap) 32px; border-top: 1px solid var(--line); counter-increment: step; }
.gch__text ol li:last-child { border-bottom: 1px solid var(--line); }
.gch__text ol li::before { content: counter(step) "."; position: absolute; left: 0; top: var(--sp-cap); font: 600 var(--fs-label)/1.6 var(--font); letter-spacing: .12em; color: var(--accent); }
.gch__text ul li { position: relative; padding-left: 20px; }
.gch__text ul li + li { margin-top: 8px; }
.gch__text ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--accent); }
.gch__text ol + p, .gch__text ul + p { margin-top: var(--sp-para); }
.gch__text .gch__action { margin-top: var(--sp-action); }
.gch__text .gch__action a { color: #fff; }
/* no heading: the text runs in two columns across the container */
.gch--plain .gch__text { column-count: 2; column-gap: var(--sp-action); }
.gch--plain .gch__text p { break-inside: avoid-column; }
.gch--plain .gch__text p:only-child { break-inside: auto; }
@media (max-width: 960px) {
  .gch__intro { grid-template-columns: minmax(0, 1fr); }
  .gch--plain .gch__text { column-count: 1; }
}

/* ---------- tag filter ---------- */
.gf { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-grid); }
.gf__tag { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--ink); border-radius: var(--radius);
  background: #fff; color: var(--ink); font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.gf__n { font-size: var(--fs-label); opacity: .55; }
.gf__tag:hover { border-color: var(--accent); color: var(--accent); }
.gf__tag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.gf__tag[aria-pressed="true"] .gf__n { opacity: .7; }
@media (max-width: 960px) {
  /* one swipeable row instead of a block of chips */
  .gf { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .gf::-webkit-scrollbar { display: none; }
  .gf__tag { flex: none; }
}

/* ---------- cover grid ---------- */
.gg__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-action) var(--sp-grid); list-style: none; }
.gw { min-width: 0; }
.gw__open { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; background: var(--line); line-height: 0; cursor: zoom-in; }
.gw__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .gw__open:hover .gw__img { transform: scale(1.04); } }
.gw__open:focus-visible { outline-offset: 3px; }
.gw__count { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border-radius: var(--radius); background: rgba(18, 18, 18, .72); color: #fff; font: 700 var(--fs-label)/1 var(--font); }
.gw__count svg { width: 13px; height: 13px; }
.gw__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--sp-cap); padding: 0; list-style: none; }
.gw__tags li { padding: 2px 8px; border: 1px solid var(--ink); border-radius: var(--radius); font: 400 var(--fs-label)/1.4 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); min-width: 0; overflow-wrap: anywhere; } /* long tags (characters page: "pirates of the caribbean") wrap instead of widening a 2-column card */
.gw.is-filtered, .gw.is-off { display: none; }
/* before gallery.js runs: the first rows only (same numbers as gallery.js, so nothing jumps) */
.js .gg__list[data-cut] > .gw:nth-child(n+13) { display: none; }
/* Show More: a section's distance from the works; once every work is open the button and its row are gone */
.gg__foot { display: flex; justify-content: center; padding-top: var(--sp-section); }
.gg__foot:has(.gg__more[hidden]) { display: none; }
.gg__more { min-width: 200px; }
.gg__more:hover { border-color: var(--accent); color: var(--accent); }
.gg__empty { font: 400 var(--fs-small)/1.5 var(--font); color: var(--muted); }
@media (max-width: 960px) {
  .gg__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .js .gg__list[data-cut] > .gw:nth-child(n+10) { display: none; }
}
@media (max-width: 640px) {
  .gg__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .js .gg__list[data-cut] > .gw:nth-child(n+7) { display: none; }
}

/* ---------- spread layout (works.json "spread": true — small galleries, e.g. /eye-tattoos) ----------
   every photo of a work on the page: justified rows (one height per row, photos at their own ratio, nothing cropped),
   a row is never taller than --row-h; phones: 2 columns, a landscape photo spans both. Each photo opens the viewer. */
.gw--spread { grid-column: 1 / -1; --row-h: 640px; }
.gsp { display: flex; flex-direction: column; gap: var(--sp-grid); }
.gsp__row { display: flex; gap: var(--sp-grid); max-width: calc(var(--row-h) * var(--sum) + var(--sp-grid) * 3); }
.gsp__ph { flex: var(--r) 1 0; aspect-ratio: var(--r); min-width: 0; }
.gsp__ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .gsp__ph:hover img { transform: scale(1.03); } }
.gw--spread .gw__tags { margin-top: var(--sp-cap); }
@media (max-width: 960px) { .gw--spread { --row-h: 440px; } }
@media (max-width: 640px) {
  .gsp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gsp__row { display: contents; }
  .gsp__ph--wide { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .gsp__ph img { transition: none; } }

/* ---------- per-work viewer ---------- */
.gv { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #0d0d0d; color: #fff; }
.gv[hidden] { display: none; }
.gv__bar { display: flex; align-items: center; gap: 18px; min-height: 64px; padding: 12px 20px; }
.gv__title, .gv__count { margin: 0; font: 400 var(--fs-small)/1 var(--font); white-space: nowrap; }
.gv__label { font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.gv__sep { margin: 0 3px; opacity: .4; }
.gv__tags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; padding: 0; list-style: none; }
.gv__tags li { padding: 3px 9px; border: 1px solid rgba(255, 255, 255, .6); border-radius: var(--radius); font: 400 var(--fs-label)/1.4 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.gv__count { margin-left: auto; font-weight: 700; }
.gv__close { flex: none; width: 40px; height: 40px; margin-right: -8px; padding: 8px; border: 0; background: none; color: #fff; cursor: pointer; }
.gv__close svg { display: block; width: 23px; height: 23px; }
.gv__close:hover { color: var(--accent); }
.gv__stage { position: relative; flex: 1; min-height: 0; }
.gv__track { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none; }
.gv__track::-webkit-scrollbar { display: none; }
.gv__slide { display: flex; align-items: center; justify-content: center; flex: 0 0 100%; height: 100%; margin: 0; padding: 0 80px; scroll-snap-align: center; scroll-snap-stop: always; }
.gv__slide img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: rgba(255, 255, 255, .04); }
.gv__arrow { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; z-index: 2; transition: background .2s; }
.gv__arrow svg { width: 9px; height: 16px; display: block; margin: auto; }
.gv__arrow:hover { background: #fff; color: var(--accent); }
.gv__arrow--prev { left: 20px; }
.gv__arrow--next { right: 20px; }
.gv__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 12px 20px; }
.gv__work { flex: none; padding: 8px 0; border: 0; background: none; color: #fff; font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; opacity: .8; }
.gv__work:hover { color: var(--accent); opacity: 1; }
.gv__work[disabled] { opacity: .25; cursor: default; color: #fff; }
.gv__thumbs { display: flex; justify-content: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gv__thumbs::-webkit-scrollbar { display: none; }
.gv__thumb { flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 3px; background: none; cursor: pointer; opacity: .5; line-height: 0; overflow: hidden; }
.gv__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gv__thumb:hover { opacity: .85; }
.gv__thumb[aria-current="true"] { opacity: 1; border-color: var(--accent); }
@media (max-width: 960px) {
  .gv__bar { gap: 12px; min-height: 56px; padding: 8px 10px 8px 16px; }
  .gv__tags { display: none; }
  .gv__slide { padding: 0; }
  .gv__arrow { display: none; }
  .gv__thumbs { display: none; }
  .gv__foot { min-height: 56px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .gw__img { transition: none; } .gv__track { scroll-behavior: auto; } }
