/* Kotona: photos.
   Every picture in the product is named here and nowhere else. To put a real
   photo in, save it in photos/ and change the file name on its line below
   (dana.svg to dana.jpg). Nothing else needs to change. The files that ship
   are drawn stand-ins, tagged "stand-in", so the screens can be judged before
   a family has added anything.

   Two pictures carry the system:
   1. The cover: one wide photo of the whole family. In version 2 it lives in
      the Family book and on the kitchen screen, and on Home only from tablet
      width up, in space the day does not need.
   2. A headshot of each person and pet, wherever they appear. Theo has none
      on purpose: leave ph-theo off his bullet and the lettered bullet shows.
   Photos run in full color. Kotona frames them; it does not recolor them. */

.ph-family  { background-image: url("photos/family.svg"); }
.ph-dana    { background-image: url("photos/dana.svg"); }
.ph-marcus  { background-image: url("photos/marcus.svg"); }
.ph-theo    { background-image: url("photos/theo.svg"); }
.ph-imogen  { background-image: url("photos/imogen.svg"); }
.ph-wren    { background-image: url("photos/wren.svg"); }
.ph-june    { background-image: url("photos/june.svg"); }
.ph-biscuit { background-image: url("photos/biscuit.svg"); }
.ph-house   { background-image: url("photos/house.svg"); }
.ph-sheetpan { background-image: url("photos/sheetpan.svg"); }
.ph-filter  { background-image: url("photos/filter-label.svg"); }
.ph-flyer   { background-image: url("photos/flyer.svg"); }   /* a school flyer Dana photographed */
.ph-slip    { background-image: url("photos/slip.svg"); }    /* a permission slip, for the camera in the drawing */

/* Each person's line color, for the ring around a headshot. */
.pD { --pc: var(--p-dana); }   .pM { --pc: var(--p-marcus); }
.pT { --pc: var(--p-theo); }   .pI { --pc: var(--p-imogen); }
.pW { --pc: var(--p-wren); }   .pB { --pc: var(--p-biscuit); }
.pJ { --pc: var(--p-june); }

/* A photo block: flat, nearly square corners, cropped to fill. */
.pic {
  display: block;
  background-color: var(--surface-2);
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  border-radius: var(--radius-s);
}
.pic.cover { background-position: 50% 30%; border-radius: 0; }  /* the wide crop keeps the row of faces */

/* A headshot in a person bullet. The bullet already has the person's color
   and letter; give it a ph- class and the photo fills it, ringed in that
   color. Take the class away, or never add a photo, and the lettered bullet
   is what shows. Small bullets crop tighter to the face. */
.pb[class*="ph-"] {
  background-color: var(--pc, var(--ink));
  background-size: 132%;
  background-position: 50% 26%;
  background-repeat: no-repeat;
  border: 3px solid var(--pc, var(--ink));   /* at these sizes the ring tells people apart, so it is thick */
  color: transparent;
  font-size: 0;
  overflow: hidden;
}
/* The large, square headshot on a person's page. */
.pb.sq[class*="ph-"], .pic.sq {
  border: 0;
  border-radius: var(--radius-s);
  background-size: cover;
  background-position: 50% 50%;
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  border-bottom: 8px solid var(--pc, var(--ink));
}

/* Optional, not the default: a photo toned in two of the house colors.
   Wrap the photo: <span class="duo"><i class="pic ph-family"></i></span> */
.duo { position: relative; display: block; isolation: isolate; overflow: hidden; }
.duo > .pic, .duo > .pb { filter: grayscale(1) contrast(1.15); }
.duo::before, .duo::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.duo::before { background: var(--duo-light, var(--hl)); mix-blend-mode: multiply; z-index: 1; }
.duo::after { background: var(--duo-dark, var(--hl-ink)); mix-blend-mode: lighten; z-index: 2; }
