/* ====== TAPED INSTANT PHOTOS ======
   White instant-photo frames with a strip of tape, used in three or four
   places only (Eric, 2026-10-26, DECISIONS.md). Square photos, 176px inside
   the frame on desktop, Fredoka captions.
   - Laid out in flow (flex row), never absolutely placed beside text. The
     tape is the only absolute element, inside .taped-photo__media, which
     holds no text.
   - Static: nothing moves on hover, because hover motion belongs only to
     links. Tilts are fixed, so reduced motion needs no override.
   - Phones (600px and below): three in one row, scaled down; a fourth hides. */

/* ---- Taped photos: tokens and row ---- */
.taped-photos {
  --tp-n: 4;
  --tp-max: 200px;
  --tp-pad: 12px;
  --tp-overlap: 10px;
  --tp-frame: var(--white, #FFFFFF);
  --tp-ink: var(--navy, #1C355E);
  --tp-shadow: 0 10px 24px rgba(28, 53, 94, .18);
  --tp-tape-orange: rgba(247, 141, 43, .55);
  --tp-tape-blue: rgba(91, 137, 180, .55);
  --tp-tape-gold: rgba(255, 181, 73, .6);
  container-type: inline-size;
  margin: 0;
  padding: 30px 14px 18px;
}
.taped-photos--three { --tp-n: 3; }
.taped-photos__row {
  --tp-w: min(var(--tp-max), calc((100cqw + (var(--tp-n) - 1) * var(--tp-overlap)) / var(--tp-n)));
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

/* ---- Taped photos: frame ---- */
.taped-photo {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: var(--tp-w);
  margin: 0;
  padding: var(--tp-pad) var(--tp-pad) 14px;
  background: var(--tp-frame);
  box-shadow: var(--tp-shadow);
  transform: rotate(var(--tp-tilt, -3deg));
}
.taped-photo + .taped-photo { margin-left: calc(-1 * var(--tp-overlap)); }
.taped-photo:nth-child(4n + 1) { --tp-tilt: -6deg; --tp-tape: var(--tp-tape-orange); --tp-tape-tilt: 4deg;  margin-top: calc(var(--tp-w) * .15); }
.taped-photo:nth-child(4n + 2) { --tp-tilt: 4deg;  --tp-tape: var(--tp-tape-blue);   --tp-tape-tilt: -5deg; }
.taped-photo:nth-child(4n + 3) { --tp-tilt: -3deg; --tp-tape: var(--tp-tape-gold);   --tp-tape-tilt: 3deg;  margin-top: calc(var(--tp-w) * .22); }
.taped-photo:nth-child(4n + 4) { --tp-tilt: 5deg;  --tp-tape: var(--tp-tape-orange); --tp-tape-tilt: -3deg; margin-top: calc(var(--tp-w) * .04); }

/* ---- Taped photos: photo and tape ---- */
.taped-photo__media {
  position: relative;
  display: block;
}
.taped-photo__media picture,
.taped-photo__media img {
  display: block;
  width: 100%;
}
.taped-photo__media img {
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: var(--tp-focus, center 35%);
}
.taped-photo__tape {
  position: absolute;
  top: calc(-1 * var(--tp-pad) - 14px);
  left: 50%;
  width: 42%;
  height: 26px;
  background: var(--tp-tape);
  transform: translateX(-50%) rotate(var(--tp-tape-tilt, 4deg));
}

/* ---- Taped photos: caption ---- */
.taped-photo figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(.8rem, calc(var(--tp-w) * .095), 1.1875rem);
  line-height: 1.2;
  color: var(--tp-ink);
  text-wrap: balance;
}

/* ---- Taped photos: focus points for tall or busy frames ---- */
.taped-photo--focus-top { --tp-focus: center 20%; }
.taped-photo--focus-mid { --tp-focus: center 50%; }
.taped-photo--focus-right { --tp-focus: 78% 40%; }

/* ---- Taped photos: placements ---- */
/* Homepage give band: the row fills the space under the trust line, and the
   START HERE cue tucks up under it so the band ends with the donate card. */
#give .give-copy-foot .taped-photos { padding-bottom: 0; }
#give .give-copy-foot .taped-photos + .give-start-cue { margin-top: -1rem; }

/* About story intro: "then" snapshots beside the lede, below it on narrow screens. */
.page-about .about-story__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
}
.page-about .about-story__intro .about-story__link { margin-bottom: 0; }
@media (min-width: 1024px) {
  .page-about .about-story__intro { grid-template-columns: minmax(0, 1fr) minmax(0, 600px); }
}

/* Open Door Circle give: under the copy, beside the give card. */
#give .two-col .taped-photos { margin-top: .75rem; }

/* Volunteer, a typical afternoon: a third column beside the list, then a row below it. */
.lp--volunteer .vol-afternoon--taped > .taped-photos { grid-column: 1 / -1; }
@media (min-width: 1100px) {
  .lp--volunteer .vol-afternoon--taped { grid-template-columns: auto minmax(0, 1fr) minmax(0, 560px); }
  .lp--volunteer .vol-afternoon--taped > .taped-photos { grid-column: auto; align-self: center; }
}

/* ---- Taped photos: phones ---- */
@media (max-width: 600px) {
  .taped-photos { --tp-n: 3; --tp-pad: 8px; --tp-overlap: 6px; padding: 26px 10px 14px; }
  .taped-photo { padding-bottom: 10px; }
  .taped-photo:nth-child(n + 4) { display: none; }
  .taped-photo__tape { top: calc(-1 * var(--tp-pad) - 10px); height: 18px; }
  .taped-photo figcaption { margin-top: 6px; }
}
