/* ============================================================
   portraits.css — the senior-portrait polaroids and their cameos

   Three across, one row, on a page that is always the same shape.
   All in cqi, like everything else printed on a page.
   ============================================================ */

.portraits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3cqi;
}

.polaroid {
  position: relative;
  margin: 0;
  padding: 2cqi 2cqi 0;
  background: linear-gradient(170deg, #fffdf7, #f7f1e3 70%, #efe6d2);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 14px 26px -16px rgba(0,0,0,0.65);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

/* a strip of washi tape at the top corner */
.polaroid::before {
  content: "";
  position: absolute;
  top: -1.8cqi;
  left: -2.6cqi;
  width: 12cqi;
  height: 3.8cqi;
  rotate: -32deg;
  background:
    repeating-linear-gradient(118deg, rgba(255,255,255,0.46) 0 3px, rgba(255,255,255,0) 3px 7px),
    rgba(221, 206, 160, 0.86);
  box-shadow: 0 2px 6px rgba(0,0,0,0.16);
}

.polaroid:hover {
  transform: rotate(var(--tilt, 0deg)) translateY(-5px) scale(1.022);
  box-shadow: 0 24px 38px -18px rgba(0,0,0,0.6);
  z-index: 4;
}

.polaroid__frame {
  position: relative;
  background: #141210;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
}

/* ---------- the engraved oval cameo ---------- */

.cameo {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;          /* busts run off the bottom edge, as cameos do */
  aspect-ratio: 1 / 1;
  background:
    repeating-radial-gradient(circle at 50% 46%,
      rgba(42,35,29,0.14) 0 1px, transparent 1px 6px),
    radial-gradient(circle at 50% 36%, #fdf8ec 0%, #e9dcc2 62%, #cdbb9b 100%);
  color: #2b2219;
}

.cameo::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(42,35,29,0.22);
  border-radius: 50% / 46%;
  pointer-events: none;
}

.emblem {
  width: 62%;
  height: 62%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.7));
}

.emblem .fill { fill: currentColor; stroke: none; }

/* A head-and-shoulders silhouette, sat on the bottom edge of the oval the
   way a real senior portrait is. Shoulders are allowed to run off. */
.emblem--bust {
  width: 78%;
  height: 78%;
  align-self: end;
  filter: none;
}

/* features cut back out of the silhouette in the paper's own colour */
.emblem .cut {
  fill: none;
  stroke: #e7dac0;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- caption ---------- */

.polaroid figcaption {
  padding: 2.4cqi 0.6cqi 2.8cqi;
  text-align: center;
}

.polaroid h3 {
  margin: 0;
  font-family: var(--hand);
  font-size: 4cqi;
  font-weight: 600;
  line-height: 1.1;
  color: #27211a;
  word-break: break-word;
}

.polaroid .quote {
  margin: 1.8cqi 0 0;
  font-size: 0.78em;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink-soft);
}

.polaroid .quote em { color: var(--oxblood); }

/* the one with the black border */
.polaroid--memorial .polaroid__frame {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5), 0 0 0 1cqi #14120f;
}

.polaroid--memorial { padding-top: 3cqi; }
