/* gallery.css — the nine looks.
 *
 * WHY A SPECIMEN AND NOT A MOCKUP
 * There is no portrait to put in these frames, and using a stock face would
 * promise something the shop has not got. So each card is the thing the studio
 * actually sells: a paper, a frame, a caption band, drawn at the real
 * proportions the designer uses (band height as a fraction of the face). The
 * empty middle is paper, not a hole — and it is where your photograph goes.
 *
 * Motion follows the house rule: transform and opacity only, under 300 ms,
 * custom easing, nothing at all under prefers-reduced-motion.
 */

/* 🔴 Same trap as the studio panel: a display rule outranks the hidden
   attribute, so a filtered-out card would stay on screen. */
[hidden] { display: none !important; }

.looks-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 18px;
}

.looks-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.looks-chip {
  font: inherit;
  font-size: .84rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--text-soft);
  cursor: pointer;
  transition: transform 150ms cubic-bezier(.2, .8, .2, 1), background-color 150ms, border-color 150ms, color 150ms;
}
.looks-chip:hover { border-color: var(--ink-soft); color: var(--ink); }
.looks-chip:active { transform: scale(.97); }
.looks-chip[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--btn-fg);
}

.looks-count {
  font-size: .78rem;
  color: var(--text-faint);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ── the grid ────────────────────────────────────────────────────────────── */

/* Nine cards, so the grid is built to divide by nine: two up on a phone,
   three up from a tablet. `auto-fill` gave SEVEN columns at desk width and
   split 9 into 7 + 2, which reads as a mistake rather than a collection. */
.looks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 14px;
  margin: 0 0 8px;
}
@media (min-width: 620px) {
  .looks-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 20px; }
}

.look { margin: 0; }

.look-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}
.look-link:focus-visible { outline: 2px solid var(--pine); outline-offset: 4px; }

/* ── the print itself ────────────────────────────────────────────────────── */

.look-print {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border-radius: 2px;
  box-shadow:
    0 1px 1px rgba(30, 24, 16, .10),
    0 10px 22px -18px rgba(30, 24, 16, .55);
  container-type: inline-size;
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms cubic-bezier(.2, .8, .2, 1);
  will-change: transform;
}

.look-link:hover .look-print {
  transform: translateY(-3px);
  box-shadow:
    0 2px 3px rgba(30, 24, 16, .12),
    0 18px 32px -20px rgba(30, 24, 16, .55);
}
.look-link:active .look-print { transform: translateY(-1px) scale(.994); }

/* the face: paper margin + the frame the template would print */
.look-face {
  position: absolute;
  inset: var(--matte, 7%);
  border: var(--edge-w, 1.4px) solid var(--edge);
  border-radius: 1px;
  overflow: hidden;
}
/* the wedding frame is a double rule with paper between the lines */
.look-face.is-double {
  border-width: 1px;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.4px var(--edge);
  margin: 1.6px;
}

/* the photograph would sit here; at rest it is the paper tone, very slightly
   warmer, so the card does not read as a blank error box */
.look-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--edge);
  opacity: .045;
}

/* the caption band, at the proportion of the real template */
.look-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--band-h, 0%);
  background: var(--band-fill);
  border-top: 1px solid var(--rule);
  display: grid;
  place-items: center;
  padding: 0 4%;
  color: var(--band-ink);
  font-family: var(--display, var(--body));
  font-weight: 500;
  letter-spacing: -.004em;
  line-height: 1;
  /* cqw keeps the printed name the same optical size in a 2-up phone grid and
     a 5-up desktop row; the rem value is the fallback */
  font-size: .58rem;
  font-size: 5.6cqw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the woven or dashed thread the template adds above its band */
.look-thread {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--band-h, 0%);
  height: 0;
}
.look-thread.is-tibeb {
  height: 3px;
  background-image: radial-gradient(circle at 1.4px 1.4px, var(--rule) 1.05px, transparent 1.1px);
  background-size: 5px 3px;
  opacity: .75;
}
.look-thread.is-dashes {
  height: 1.5px;
  background-image: repeating-linear-gradient(90deg, var(--rule) 0 3px, transparent 3px 8px);
  opacity: .8;
}

/* "No frame" has no border and no band: the card is the paper, and the name
   is set small and centred on it */
/* absolute, not a grid child in normal flow: a grid item sizes to its content,
   so place-items centered the label inside a content-height box and pinned it
   to the top of the card instead of the middle */
.look-faced {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8%;
}
.look-faced span {
  font-family: var(--display, var(--body));
  font-size: .7rem;
  font-size: 7cqw;
  color: var(--band-ink);
  opacity: .55;
  letter-spacing: -.01em;
}

/* ── the caption under the card ──────────────────────────────────────────── */

.look-meta { padding: 10px 2px 0; }
.look-meta h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: -.008em;
  color: var(--ink);
}
.look-meta h3 .look-am {
  font-family: 'Noto Sans Ethiopic', var(--body);
  font-size: .82rem;
  color: var(--text-mute);
  font-weight: 400;
  margin-left: 6px;
}
.look-meta p {
  margin: 3px 0 0;
  font-size: .76rem;
  line-height: 1.45;
  color: var(--text-mute);
}
.look-meta .look-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: .78rem;
  color: var(--pine-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── entrance ────────────────────────────────────────────────────────────── */

.looks-grid[data-filtering="true"] .look {
  animation: look-in 240ms cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 24ms);
}

@keyframes look-in {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .look-link:hover .look-print { transform: none; }
  .looks-grid[data-filtering="true"] .look { animation: none; }
  .looks-chip, .look-print { transition: none; }
}

@media (max-width: 420px) {
  .looks-grid { gap: 20px 12px; }
  .look-meta h3 { font-size: .9rem; }
}
