/* ============================================================
   polaroid.css  ·  shared instant-photo print
   ------------------------------------------------------------
   The polaroid look used on the homepage pile (css/home.css +
   js/home-polaroids.js) and the About page photo stack
   (css/about.css + js/about-polaroids.js). Only the print itself
   lives here; how prints are piled, positioned and animated stays
   in each page's own CSS/JS.

   Markup:  <a|div class="polaroid"><img ...><span class="polaroid-cap">Name</span></a>
   (caption optional: without one the print keeps its deep bottom border)

   Link after the page's shared CSS (and paper.css), before the page's
   own stylesheet so it can adjust sizes.
   ============================================================ */
:root {
  --polaroid-bg:    #fbfaf6;
  --polaroid-ink:   #232742;
  --polaroid-shadow: 0 1px 2px rgba(35, 39, 66, 0.16), 0 6px 14px rgba(35, 39, 66, 0.16), 0 18px 40px rgba(35, 39, 66, 0.20);
  --polaroid-lift:   0 2px 4px rgba(35, 39, 66, 0.14), 0 14px 30px rgba(35, 39, 66, 0.22), 0 36px 80px rgba(35, 39, 66, 0.32);
}
[data-theme="dark"] {
  --polaroid-bg:    #eeece6;
  --polaroid-ink:   #232742;
  --polaroid-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 8px 18px rgba(0, 0, 0, 0.45), 0 20px 44px rgba(0, 0, 0, 0.50);
  --polaroid-lift:   0 2px 6px rgba(0, 0, 0, 0.45), 0 16px 34px rgba(0, 0, 0, 0.55), 0 40px 90px rgba(0, 0, 0, 0.65);
}
/* ---------- the polaroid ---------- */
.polaroid {
  display: block;
  background: var(--polaroid-bg);
  padding: 10px 10px 0;
  border-radius: 2px;
  box-shadow: var(--polaroid-shadow);
  text-decoration: none;
}
/* each print takes the shape of its own image: nothing is cropped */
.polaroid img,
.polaroid video {
  display: block;
  width: 100%;
  height: auto;
}
.polaroid-cap {
  display: block;
  padding: 10px 4px 14px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.2;
  color: var(--polaroid-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* a print without a caption keeps the deep bottom border */
.polaroid > img:last-child,
.polaroid > video:last-child { margin-bottom: 38px; }
/* reveal.js fades images in as they scroll into view; inside a polaroid that
   showed an empty white frame first, so the prints skip it */
.polaroid .reveal { opacity: 1; transform: none; transition: none; }
