/* Gallery index (/gallery/). Adds to site.css; never redefines tokens or primitives.
   Each album is a wide strip: a large framed cover over a quiet hand-tinted wash in the journey's terrain colour,
   the title and count, and a row of thumbnails peeking alongside. The wash sits behind the cover's edges, never behind text. */

/* terrain tones (the album page uses the same names for its thread colour) */
.tone-taiga   { --tone: #7fae9a; }
.tone-savanna { --tone: #d9a35b; }
.tone-erg     { --tone: #d98a55; }
.tone-jungle  { --tone: #5fae9c; }
.tone-paddy   { --tone: #96bd6e; }
.tone-bush    { --tone: #b9b45a; }
.tone-dust    { --tone: #caa47a; }
.tone-slate   { --tone: #8fa3bd; }
.tone-sea     { --tone: #79b6c0; }
.tone-heather { --tone: #b49ab8; }

.gl-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1rem clamp(28px, 4vw, 64px); align-items: end;
  padding-top: calc(var(--bar-h) + clamp(56px, 6vw, 88px)); padding-bottom: clamp(0px, 1vw, 12px); }
.gl-head h1 { max-width: 16ch; }
.gl-head .lede { margin: 0 0 .35rem; max-width: 46ch; }

/* ------------------------------------------------------------------ an album */
.al { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: 'cover text';
  column-gap: clamp(28px, 4.4vw, 72px); align-items: center; padding-block: clamp(36px, 4.6vw, 64px); }
.al-flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: 'text cover'; }
.al-cover { grid-area: cover; position: relative; display: block; width: min(100%, 600px); justify-self: end; text-decoration: none; }
.al-flip .al-cover { justify-self: start; }
.al-wash { position: absolute; z-index: -1; inset: -26% -24% -30% -22%; background: var(--tone); opacity: .72;
  -webkit-mask: url('/media/gallery-ui/wash-1.svg') center / 100% 100% no-repeat; mask: url('/media/gallery-ui/wash-1.svg') center / 100% 100% no-repeat; }
.al-wash.wash-2 { -webkit-mask-image: url('/media/gallery-ui/wash-2.svg'); mask-image: url('/media/gallery-ui/wash-2.svg'); inset: -24% -28% -26% -18%; }
.al-wash.wash-3 { -webkit-mask-image: url('/media/gallery-ui/wash-3.svg'); mask-image: url('/media/gallery-ui/wash-3.svg'); inset: -30% -18% -24% -26%; }
.al-frame { translate: 0 var(--album-drift, 0px); display: block; aspect-ratio: 3 / 2; overflow: hidden; border: 7px solid var(--cream); border-radius: var(--radius-sm); background: var(--cream);
  box-shadow: 0 0 0 1px rgba(41, 30, 12, .18), 0 26px 44px -26px rgba(41, 30, 12, .75); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.al-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@media (hover: hover) and (pointer: fine) {
.al-cover:hover .al-frame { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(41, 30, 12, .2), 0 34px 52px -28px rgba(41, 30, 12, .8); }
}

.al-text { grid-area: text; position: relative; min-width: 0; max-width: 30rem; }
.al-title { font-size: var(--step-3); line-height: 1.06; }
.al-title a { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
.al-title a:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; }
}
.al-count { margin-top: .35rem; font-weight: 600; color: var(--link); }
.al-peek { display: flex; gap: 8px; margin: 1.1rem 0 0; }
.al-peek li { flex: 0 1 84px; min-width: 0; }
.al-peek a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm); border: 3px solid var(--cream);
  box-shadow: 0 0 0 1px rgba(41, 30, 12, .16), 0 10px 18px -12px rgba(41, 30, 12, .7); transition: transform .35s var(--ease); }
.al-peek img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
@media (hover: hover) and (pointer: fine) {
.al-peek a:hover { transform: translateY(-2px); }
}
.al-peek a:focus-visible { outline-offset: 2px; }
.al-open { margin-top: 1.2rem; }

/* the live shows: their own heading, slightly smaller strips */
.gl-shows { margin-top: clamp(20px, 4vw, 48px); }
.gl-shows-head { max-width: 40rem; padding-top: clamp(20px, 3vw, 36px); border-top: 1px solid var(--rule); }
.gl-shows-head p { margin-top: .6rem; color: var(--text-soft); }
.al-small { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); padding-block: clamp(28px, 4vw, 52px); }
.al-small.al-flip { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.al-small .al-cover { width: min(100%, 500px); }
.al-small .al-title { font-size: var(--step-2); }

/* ------------------------------------------------------------------ phones */
/* the washes may run past the edges of the page: site.css clips html and body horizontally, so they cannot widen it */

@media (max-width: 760px) {
  .gl-head { grid-template-columns: minmax(0, 1fr); padding-top: calc(var(--bar-h) + 34px); }
  .gl-head h1 { font-size: 2.15rem; }
  .gl-head .lede { font-size: 16px; margin: 0; }
  .al, .al-flip, .al-small, .al-small.al-flip { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'cover' 'text'; row-gap: 18px; padding-block: 30px; }
  .al-cover, .al-flip .al-cover, .al-small .al-cover { justify-self: stretch; width: 100%; }
  .al-wash, .al-wash.wash-2, .al-wash.wash-3 { inset: -14% -12% -16% -12%; }
  .al-frame { border-width: 5px; }
  .al-text { max-width: none; }
  .al-title { font-size: var(--step-2); }
  .al-peek { gap: 6px; margin-top: .9rem; }
  .al-peek li { flex: 1 1 0; }
  .al-peek li:nth-child(n+5) { display: none; }
  .al-open .btn { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .al-frame, .al-peek a { transition: none; }
}

/* The wash moves more slowly than the framed print; captions remain still. */
.al-wash { transform: translateY(calc(var(--album-drift, 0px) * -.35)); }
@media (prefers-reduced-motion: reduce) { .al-frame, .al-wash { transform: none; translate: none; } }
