/* Pantry: the ledger with the emptying gutter. Builds on site.css. */

/* opening ---------------------------------------------------------------- */
.p-open{padding-block:5.5rem var(--band)}
.p-open__grid{display:grid;gap:var(--gap);align-items:center}
.p-open__text{min-width:0}
.p-open h1{font-size:clamp(2.4rem,5.4vw,5.25rem);margin-bottom:.3em;overflow-wrap:break-word}
.p-open__call{margin-top:1.4rem;max-width:34ch}
.p-open .cut,.item .cut{width:100%}
.p-open .cut img,.item .cut img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@media (min-width:60rem){
  .p-open__grid{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
}
@media (max-width:47.99rem){
  .p-open{padding-top:8rem}
  .p-open__call{display:none}
}

/* ledger head and the filter plates --------------------------------------- */
.p-head{padding-block:var(--band)}
.p-head__grid{display:grid;gap:var(--gap);align-items:start}
.p-head h2{margin:0}
.p-head__copy{min-width:0}
.p-head p{max-width:38rem}
@media (min-width:60rem){
  .p-head__grid{grid-template-columns:minmax(0,2fr) minmax(0,3fr);align-items:start}
}
.filters{margin-top:1.6rem}
.filters:empty{display:none}
.filters__row{display:flex;gap:.5rem;overflow-x:auto;padding:.6rem .15rem;scrollbar-width:thin}
.filters__count{margin:.5rem 0 0;font-size:var(--small);line-height:1.4}

/* chips as cut plates: no pill radius, each one notched on other corners */
.fbtn{flex:none;min-height:44px;padding:.5rem 1rem;border:0;background:var(--straw-3);color:var(--ink);font-family:var(--text);font-size:1rem;line-height:1.15;border-radius:0;cursor:pointer;
  clip-path:polygon(0 .45rem,.45rem 0,100% 0,100% calc(100% - .5rem),calc(100% - .5rem) 100%,0 100%);
  transition:background var(--fade) var(--ease),color var(--fade) var(--ease)}
.fbtn:nth-child(3n+2){clip-path:polygon(.3rem 0,calc(100% - .5rem) 0,100% .5rem,100% 100%,.6rem 100%,0 calc(100% - .6rem))}
.fbtn:nth-child(3n){clip-path:polygon(0 0,calc(100% - .65rem) 0,calc(100% - .2rem) .4rem,100% .4rem,100% 100%,.45rem 100%,.45rem calc(100% - .45rem),0 calc(100% - .45rem))}
.fbtn:hover{background:var(--ground)}
.fbtn[aria-pressed="true"]{background:var(--ink);color:var(--ground)}
.fbtn[aria-pressed="true"]:hover{background:var(--ink)}
.fbtn:focus-visible{outline:3px solid var(--blue);outline-offset:-6px}
@media (min-width:60rem){
  .filters__row{flex-wrap:wrap;overflow:visible;padding:.4rem 0;gap:.6rem}
}

/* the rows: gutter slot, name and note, own picture ------------------------ */
.item{padding-block:calc(var(--band) * .5);background:var(--ground)}
.item[data-tone="pale"]{background:var(--straw-3)}
.item[hidden]{display:none}
.item__in{display:grid;grid-template-columns:2rem minmax(0,1fr);column-gap:clamp(.75rem,2vw,1.5rem);row-gap:1rem;align-items:start}
.item__slot{grid-column:1;grid-row:1;width:1.6rem;height:1.2rem;margin-top:.6rem;transition:background var(--move) var(--ease)}
.item__text{grid-column:2;grid-row:1;min-width:0}
.item__fig{grid-column:2;grid-row:2;max-width:34rem;width:100%;transition:transform var(--move) var(--ease)}
.item__name{font-size:clamp(1.8rem,3.5vw,3.1rem);margin-bottom:.3em}
.item__name a{text-decoration:underline;text-decoration-thickness:.035em;text-underline-offset:.12em}
.item__name a:hover{text-decoration-thickness:.07em}
.item__note{max-width:36ch;margin-bottom:.9rem;font-size:clamp(1.125rem,1.6vw,1.375rem);line-height:1.4}
.item__facts{display:flex;flex-wrap:wrap;gap:.5rem 2.25rem;margin:0;font-size:1.125rem;line-height:1.4}
.item__facts div{display:grid;gap:.15rem}
.item__facts dt{font-size:1.125rem;font-weight:600;opacity:.85}
.item__facts dd{margin:0;font-size:1.125rem}

/* the set piece: hover or focus empties the slot and lifts the picture */
.item:hover .item__slot,.item:focus-within .item__slot{background:transparent}
.item:hover .item__fig,.item:focus-within .item__fig{transform:translateY(-.6rem)}

/* desk: pictures widened; the side alternates with the row tone */
@media (min-width:60rem){
  .item__in{grid-template-columns:2.75rem minmax(0,.8fr) minmax(0,var(--p,1fr));column-gap:var(--gap)}
  .item__slot{width:2.1rem;height:1.55rem;margin-top:.95rem}
  .item__fig{grid-column:3;grid-row:1;max-width:none}
  .item[data-tone="ground"] .item__in{grid-template-columns:2.75rem minmax(0,var(--p,1fr)) minmax(0,.8fr)}
  .item[data-tone="ground"] .item__fig{grid-column:2}
  .item[data-tone="ground"] .item__text{grid-column:3}
}

/* the call band between row five and row six ---------------------------- */
.callband{padding-block:var(--band)}
.callband[hidden]{display:none}
.callband__grid{display:grid;gap:var(--gap);align-items:center}
.callband h2{font-size:clamp(2rem,4.3vw,3.5rem);margin:0}
.callband p{max-width:40rem}
.callband__act{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.25rem;margin-top:1.1rem}
@media (min-width:60rem){
  .callband__grid{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
}

/* the hand-off: one marker, two plates of different width ---------------- */
.p-next{padding-block:var(--band)}
.next{display:grid;gap:var(--gap)}
.next__item{display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:1rem;align-items:start}
.next__item .slot{grid-row:1 / span 2;width:1.6rem;height:1.2rem;margin-top:.7rem}
.next__item h2{margin:0 0 .4em}
.next__item h2 a{text-decoration:underline;text-decoration-thickness:.035em;text-underline-offset:.12em}
.next__item h2 a:hover{text-decoration-thickness:.07em}
.next__item p{max-width:36ch}
@media (min-width:48rem){
  .next{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}
  .next__item:first-child h2{font-size:clamp(2.1rem,3.8vw,3.4rem)}
  .next__item .slot{width:2.1rem;height:1.55rem;margin-top:1rem}
}
