/* Allied Decorations Co · index.css — the window as a crate label, then the slips packed under it. Desk first; narrower screens take things away. */

/* ================= THE LABEL WINDOW ================= */

/* allwn — the label window: photograph and foot band touch, no weave between them */
.allwn { gap: 0; }

/* allhp — the hero photograph: unmatted, runs to the inner frame rule, takes what the band leaves */
.allhp {
  position: relative; flex: 1 1 0; min-height: 15rem; margin: 0;
  overflow: hidden; background: var(--crate);
}
.allhp img, .allhp video {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
}

/* allbd — the foot band: h1 on the left, instruction and call on the right, both hung from one top line; allba — the instruction-and-call side */
.allbd {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem 2.5rem; align-items: start;
}
.allop.allwn > .allbd { box-sizing: border-box; padding: 1.5rem; }
.allbd > * { min-width: 0; margin: 0; }
.allba { display: grid; gap: .85rem; justify-items: start; align-content: start; font-size: 1.0625rem; line-height: 1.5; }
.allba p { margin: 0; }

/* ================= THE SLIPS ================= */

/* allsl — a slip stack: a head and its panels, weave showing between */
.allsl { display: grid; gap: var(--crate-gap); }

/* allsh — a slip head: the h2 sentence on the left, its first lines on the right */
.allsh {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
  gap: 1rem var(--crate-gap); align-items: start;
}

/* alls3 alls4 alls5 — a slip spanning three, four or five of the eight columns */
.alls3 { grid-column: span 3; }
.alls4 { grid-column: span 4; }
.alls5 { grid-column: span 5; }

/* allqa — one question answered short, on a crate label */
.allqa { align-content: start; }
.allqa .allhs { margin-bottom: .6rem; }
.allqa .alltx p { margin-bottom: .4rem; }

/* alldb — the up-by / down-by plates as a full-width strip on their own panel, under a pair of answers */
.alldb { padding: clamp(1rem, 2vw, 1.5rem); }

/* allfa — the full-answer link under a slip, a full touch target tall */
.allfa { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.0625rem; }

/* alltr — the three moves side by side; allud — one move: photograph over its single step.
   Each move takes the two rows of the strip, so the pictures share one row and the steps start on one line. */
.alltr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--crate-gap); }
.allud {
  display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 1.25rem;
  padding: clamp(1.25rem, 2.2vw, 2rem);
}
.allud > * { min-width: 0; }
.allud .allph img { flex: none; height: auto; aspect-ratio: 4 / 5; }
.allud .allsp { align-self: start; }
.allud .allsp li { border-top: 0; padding: .25rem 0 0; }
.allud:nth-child(2) .allsp { counter-reset: allsp 1; }
.allud:nth-child(3) .allsp { counter-reset: allsp 2; }

/* allpk — packing slip rows: number, item, what it is, measured by; allpkh — its column heads */
.allpk { list-style: none; margin: 0 0 .75rem; padding: 0; border-bottom: .25rem double var(--brass); }
.allpk li, .allpkh {
  display: grid; grid-template-columns: 2.75rem minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: .2rem 1rem; align-items: center; font-size: .95rem; line-height: 1.45;
}
.allpk li { padding: .35rem 0; border-top: .25rem double var(--brass); }
.allpkh { margin: 1.5rem 0 0; padding: .5rem 0; color: var(--brass); }
.allpk li > span:first-child { font: 800 1.5rem/1 var(--stencil); color: var(--brass); }
.allpk a { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* allsg — a step list set under a head sentence, with room above */
.allsg { margin: 1.5rem 0 .5rem; border-bottom: .25rem double var(--brass); }

/* allac — the two actions at the foot of the last label */
.allac { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem var(--crate-gap); margin: 0; }

/* headings inside reading slips keep clear of what follows */
.alltx .allhl { margin-bottom: 1rem; }
.allsh .alltx { padding-top: .35rem; }

/* ================= THE OFFER STANDS ON ITS OWN PLATE ================= */
/* allpr allpw — the pinned stamp carries words of its own, so at desk widths it comes
   down on an opaque crate plate: the page's reading slips pass beneath the plate, never
   between its letters. The tag (.allpt) already has its own ground inside this one. */
@media (min-width: 56.0625rem) {
  .allpr {
    box-sizing: border-box; width: 17rem; padding: .5rem;
    background: var(--crate); border: var(--hairline) solid var(--brass);
    box-shadow: inset 0 0 0 .25rem var(--crate), inset 0 0 0 .3125rem var(--brass);
  }
  .allpw { justify-content: flex-end; }
}

/* ================= NARROWER: small desks ================= */
@media (max-width: 72rem) {
  .allbd { grid-template-columns: minmax(0, 1fr); }
  .allsh { grid-template-columns: minmax(0, 1fr); }
  .allpk li { grid-template-columns: 2.75rem minmax(0, 1fr) minmax(0, 1fr); }
  .allpkh { display: none; }
  .allpk li > span:nth-child(4) { grid-column: 2 / -1; padding-bottom: .4rem; }
}

/* ================= NARROWER: tablets and phones ================= */
@media (max-width: 56rem) {
  .allwn { gap: var(--crate-gap); margin-top: var(--crate-gap); }
  /* the band comes apart: the h1 goes above the photograph, the call below it, each on its own panel */
  .allbd { display: contents; }
  .allbd > * {
    padding: 1rem 1.1rem; background: var(--crate);
    border: var(--hairline) solid var(--brass);
    box-shadow: inset 0 0 0 .25rem var(--crate), inset 0 0 0 .3125rem var(--brass);
  }
  .allbd .allhl { order: -1; }
  .allba { justify-items: stretch; font-size: 1rem; }
  .allhp { flex: none; min-height: 0; height: clamp(13rem, 62vw, 28rem); }
  .alls3, .alls4, .alls5 { grid-column: 1 / -1; }
  .alltr { grid-template-columns: minmax(0, 1fr); }
  .allud .allph img { aspect-ratio: 4 / 3; }
  .allg .allph img { aspect-ratio: 4 / 3; }
  .allpk li { grid-template-columns: 2.75rem minmax(0, 1fr); align-items: start; }
  .allpk li > span:first-child { grid-row: span 3; padding-top: .7rem; }
  .allpk li > span:nth-child(n + 2) { grid-column: 2; }
  .allfa { font-size: 1rem; }
  .allac .allbt { width: 100%; }
}
