/* A1 Lists · gig-poster photo treatment (display time only; photo files on disk are never edited).
   Needs texture-kit.css (palette variables + grain-tile.png) and the photo-filters.svg snippet on the page.
   Markup:
     <figure class="a1-photo a1-photo--strip">            (or a1-photo--card; add a1-photo--plain to opt out)
       <div class="a1-photo__plate"><img src=… srcset=… sizes=… alt=… width=… height=… loading=lazy decoding=async></div>
       <figcaption class="a1-photo__credit">…credit from manifest.json… <span class="a1-photo__mod">Cropped and recolored for display.</span></figcaption>
     </figure>
   Inks come from the nearest .a1p-list--{slug} ancestor (generated block at the end), or from data-a1p-list on a card. */

.a1-photo {
  --a1-photo-border: 10px;
  margin: 0; padding: var(--a1-photo-border) var(--a1-photo-border) 0;
  background: var(--a1p-paper); color: var(--a1p-ink);
  box-shadow: 0 0 0 1px rgb(10 10 11 / .14);           /* paper edge on paper pages; reads as a printed card on dark stock */
  display: flex; flex-direction: column;
}
.a1-photo__plate {
  position: relative; isolation: isolate; overflow: visible; /* visible: the dark plate's 1-2px misregistration shows at the edge */
  aspect-ratio: var(--a1-photo-ratio, 4 / 3);
  background: var(--a1p-paper);
}
.a1-photo__plate img {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--a1-photo-focus, 50% 50%);
  filter: var(--a1-photo-filter, grayscale(1) contrast(1.1)); /* fallback before a list is known: a one-ink ink print */
}
/* light halftone screen: fine dot grid in the dark ink, multiplied, lower right heavier */
.a1-photo__plate::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(circle, var(--a1-photo-dark, var(--a1p-ink)) 26%, transparent 30%);
  background-size: 4px 4px;
  mix-blend-mode: multiply; opacity: .16;
  -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000 95%);
          mask-image: linear-gradient(120deg, transparent 20%, #000 95%);
}
/* paper grain from the texture kit */
.a1-photo__plate::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: url("/a1/kit/4d34409cf7/texture-kit/grain-tile.png") repeat; background-size: 128px 128px;
  mix-blend-mode: multiply; opacity: .4;
}
/* credit sits OUTSIDE the plate: plain ink on paper (17.28:1), never over the photo */
.a1-photo__credit {
  margin: 0; padding: 8px 0 10px;
  font: 400 12px/1.45 var(--a1p-font-body); letter-spacing: .005em;
  color: var(--a1p-ink); background: var(--a1p-paper);
  overflow-wrap: anywhere;
}
.a1-photo__credit a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.a1-photo__credit a:focus-visible { outline: 3px solid var(--a1p-tide); outline-offset: 2px; border-radius: 2px; }
.a1-photo__mod { white-space: nowrap; }

/* FE puts .a1-photo on every photo. If it sits on a bare <img> (no figure/plate wrapper yet), apply the duotone only:
   the border, grain and screen need the wrapper markup in section 3 of spec.md. */
img.a1-photo { filter: var(--a1p-photo-filter, grayscale(1) contrast(1.1)); margin: 0; padding: 0; box-shadow: none; background: none; }
img.a1-photo.a1-photo--plain { filter: none; }

/* sizes / crops */
.a1-photo--strip { --a1-photo-ratio: 3 / 1; }
.a1-photo--card  { --a1-photo-ratio: 4 / 3; --a1-photo-border: 8px; }
@media (max-width: 760px) {
  .a1-photo--strip { --a1-photo-ratio: 4 / 3; --a1-photo-border: 8px; }
  .a1-photo--card  { --a1-photo-ratio: 3 / 2; }
  .a1-photo__credit { font-size: 12px; }
}

/* opt-out: original photo, same paper border and credit, no recolor / screen / grain */
.a1-photo--plain .a1-photo__plate img { filter: none; }
.a1-photo--plain .a1-photo__plate::before,
.a1-photo--plain .a1-photo__plate::after { content: none; }

/* no motion anywhere in the treatment; the guard below keeps it that way if a host page adds transitions */
.a1-photo, .a1-photo * { animation: none; }
@media (forced-colors: active) { img.a1-photo { filter: none; } }
@media (prefers-reduced-motion: reduce) {
  .a1-photo, .a1-photo *, .a1-photo *::before, .a1-photo *::after { animation: none !important; transition: none !important; }
}
/* Windows high contrast / forced colors: show the plain photo */
@media (forced-colors: active) {
  .a1-photo__plate img { filter: none; }
  .a1-photo__plate::before, .a1-photo__plate::after { content: none; }
}
@media print { .a1-photo__plate::before, .a1-photo__plate::after { content: none; } }

/* ---- generated from headers/themes.json by photo-treatment/build.py: per-list photo inks (dark plate, light plate) ---- */
.a1p-list--allston-brighton-venues, [data-a1p-list="allston-brighton-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-tide-tangerine); }
.a1p-list--arlington-va-plumbers, [data-a1p-list="arlington-va-plumbers"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--back-bay-boston-venues, [data-a1p-list="back-bay-boston-venues"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-pine-sun); }
.a1p-list--boston-arenas-and-large-halls, [data-a1p-list="boston-arenas-and-large-halls"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-tide-tangerine); }
.a1p-list--boston-comedy-most-active-rooms, [data-a1p-list="boston-comedy-most-active-rooms"] { --a1-photo-dark: var(--a1p-flare); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-flare-sun); }
.a1p-list--boston-drag-and-cabaret-nights, [data-a1p-list="boston-drag-and-cabaret-nights"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--boston-free-or-cheap-live-music, [data-a1p-list="boston-free-or-cheap-live-music"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--boston-hip-hop-and-rnb-nights, [data-a1p-list="boston-hip-hop-and-rnb-nights"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--boston-improv-and-sketch-venues, [data-a1p-list="boston-improv-and-sketch-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--boston-intimate-venues-under-200, [data-a1p-list="boston-intimate-venues-under-200"] { --a1-photo-dark: var(--a1p-flare); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-flare-sun); }
.a1p-list--boston-jazz-and-listening-rooms, [data-a1p-list="boston-jazz-and-listening-rooms"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--boston-midsize-venues-200-800, [data-a1p-list="boston-midsize-venues-200-800"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-tide-tangerine); }
.a1p-list--boston-music-venues, [data-a1p-list="boston-music-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--boston-rock-clubs, [data-a1p-list="boston-rock-clubs"] { --a1-photo-dark: var(--a1p-flare); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-flare-sun); }
.a1p-list--boston-shows-under-15, [data-a1p-list="boston-shows-under-15"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--boston-stand-up-clubs, [data-a1p-list="boston-stand-up-clubs"] { --a1-photo-dark: var(--a1p-ink); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-ink-sun); }
.a1p-list--boston-venues-best-t-access, [data-a1p-list="boston-venues-best-t-access"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-pine-tangerine); }
.a1p-list--boston-venues-clear-bag-policy, [data-a1p-list="boston-venues-clear-bag-policy"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-pine-flare); }
.a1p-list--boston-world-music-venues, [data-a1p-list="boston-world-music-venues"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-pine-tangerine); }
.a1p-list--cambridge-music-venues, [data-a1p-list="cambridge-music-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--cambridge-somerville-comedy-venues, [data-a1p-list="cambridge-somerville-comedy-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--central-square-cambridge-venues, [data-a1p-list="central-square-cambridge-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--date-night-jazz-small-rooms-boston, [data-a1p-list="date-night-jazz-small-rooms-boston"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-pine); --a1-photo-filter: url(#a1p-duo-tide-pine); }
.a1p-list--davis-square-venues, [data-a1p-list="davis-square-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--downtown-crossing-venues, [data-a1p-list="downtown-crossing-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--fairfax-county-ac-contractors, [data-a1p-list="fairfax-county-ac-contractors"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--fenway-kenmore-venues, [data-a1p-list="fenway-kenmore-venues"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-pine-sun); }
.a1p-list--free-classical-concerts-boston-cambridge, [data-a1p-list="free-classical-concerts-boston-cambridge"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--halloween-shows-boston-2026, [data-a1p-list="halloween-shows-boston-2026"] { --a1-photo-dark: var(--a1p-flare); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-flare-tangerine); }
.a1p-list--harvard-square-venues, [data-a1p-list="harvard-square-venues"] { --a1-photo-dark: var(--a1p-flare); --a1-photo-light: var(--a1p-tangerine); --a1-photo-filter: url(#a1p-duo-flare-tangerine); }
.a1p-list--jp-jamaica-plain-venues, [data-a1p-list="jp-jamaica-plain-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-pine); --a1-photo-filter: url(#a1p-duo-tide-pine); }
.a1p-list--late-night-live-music-boston, [data-a1p-list="late-night-live-music-boston"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--loudoun-county-heat-pump-hvac, [data-a1p-list="loudoun-county-heat-pump-hvac"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-pine-sun); }
.a1p-list--medford-malden-venues, [data-a1p-list="medford-malden-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--seaport-boston-venues, [data-a1p-list="seaport-boston-venues"] { --a1-photo-dark: var(--a1p-flare); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-flare-sun); }
.a1p-list--somerville-music-venues, [data-a1p-list="somerville-music-venues"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--sunday-afternoon-matinee-shows-boston, [data-a1p-list="sunday-afternoon-matinee-shows-boston"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--things-to-do-boston, [data-a1p-list="things-to-do-boston"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-sun); --a1-photo-filter: url(#a1p-duo-tide-sun); }
.a1p-list--things-to-do-cambridge, [data-a1p-list="things-to-do-cambridge"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--things-to-do-somerville, [data-a1p-list="things-to-do-somerville"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
.a1p-list--union-square-somerville-venues, [data-a1p-list="union-square-somerville-venues"] { --a1-photo-dark: var(--a1p-pine); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-pine-flare); }
.a1p-list--vienna-va-hvac-contractors, [data-a1p-list="vienna-va-hvac-contractors"] { --a1-photo-dark: var(--a1p-tide); --a1-photo-light: var(--a1p-flare); --a1-photo-filter: url(#a1p-duo-tide-flare); }
