/* Xeres — Inspiration Gallery (/gallery/): filter pills, a three-column grid
   of project photos with a caption overlay. Colours, type
   and buttons come from the market + shell stylesheets. */

.g-sec{padding:clamp(2.5rem,6vw,4.5rem) 0 clamp(3.5rem,8vw,6rem)}

/* filters */
.g-filters{display:grid;gap:1rem;margin-bottom:clamp(1.8rem,3.5vw,2.6rem)}
.g-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}
.g-row-l{flex:0 0 7.5rem;line-height:40px;font-size:var(--f-label);letter-spacing:.18em;text-transform:uppercase;color:var(--ink-quiet)}
.g-row-p{display:flex;flex-wrap:wrap;gap:.5rem;flex:1}
.g-pill{min-height:40px;padding:0 1rem;border:1px solid var(--rule-2);background:#fff;color:var(--ink);cursor:pointer;
  font:400 .85rem/1 "Poppins",system-ui,sans-serif;letter-spacing:.04em;transition:background .25s,color .25s,border-color .25s,opacity .25s}
.g-pill:hover{border-color:var(--ink)}
.g-pill[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
.g-pill:disabled{opacity:.35;cursor:default;border-color:var(--rule)}
.g-pill:focus-visible,.g-open:focus-visible{outline:2px solid var(--accent-text);outline-offset:2px}
.g-count{margin:0;font-size:var(--f-label);letter-spacing:.18em;text-transform:uppercase;color:var(--ink-quiet)}

/* grid */
.g-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(.75rem,1.6vw,1.4rem);transition:opacity .18s ease}
.g-grid.is-fading{opacity:0}
.g-item{position:relative;margin:0;overflow:hidden}
.g-open{display:block;width:100%;padding:0;border:0;background:var(--ground-2);cursor:pointer}
.g-open img{display:block;width:100%;height:auto;aspect-ratio:800/537;object-fit:cover;transition:transform 1s var(--ease)}
.g-cap{display:grid;gap:.15rem;padding:.8rem 0 0;font-size:.85rem;line-height:1.45;color:var(--ink-quiet)}
.g-cap b{font-weight:500;font-size:.95rem;color:var(--ink)}
.g-meta a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.g-meta a:hover{color:var(--accent-text)}
.g-proj{font-size:.8rem}
.g-empty{margin:2rem 0 0;color:var(--ink-quiet)}
.g-empty button{margin-left:.6rem}

/* the caption is a dark overlay on the photo with product + project:
   with a mouse it appears on hover; on phones and tablets a tap shows it */
.g-cap{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;
  padding:1.5rem;text-align:center;background:rgba(14,13,12,.48);opacity:0;transition:opacity .35s ease;pointer-events:none}
.g-cap b{font-weight:600;font-size:clamp(1.05rem,1.5vw,1.35rem);line-height:1.25;color:#fff}
.g-cap .g-proj{font-weight:300;font-size:clamp(1rem,1.4vw,1.25rem);line-height:1.3;color:#fff}
.g-cap .g-meta{display:none}
.g-item.is-on .g-cap{opacity:1}
@media (hover:hover){
  .g-item:hover .g-open img{transform:scale(1.04)}
  .g-item:hover .g-cap,.g-item:focus-within .g-cap{opacity:1}
}

@media (max-width:1000px){.g-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:700px){
  .g-sec .wrap{padding-inline:16px}
  .g-grid{grid-template-columns:1fr}
  .g-row{align-items:flex-start;flex-direction:column}
  .g-row-l{flex:none;line-height:1.4}
}
