/* The pictures on LabSnap's and PatchSnap's pages (pictures.js). Each photograph is a print: white
   border, a sub-degree off square, as everything in this shop sits. The interface pictures sit on
   the torn sheet the other shots use. */

.compare, .steps, .crops { margin: 30px 0 38px; }

.print {
  background: var(--white);
  padding: 2.4%;
  transform: rotate(var(--rest, 0.4deg));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 14px 30px -18px rgba(60, 10, 0, 0.55);
}

.cmp {
  --at: 50%;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ddd;
  touch-action: pan-y;
}
.cmp img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.cmp .before { clip-path: inset(0 calc(100% - var(--at)) 0 0); }
.cmp.one .before { clip-path: none; }
.cmp.one::after { display: none; }
.cmp::after {                              /* the line */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: var(--at);
  width: 2px;
  margin-left: -1px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.cmp .knob {
  position: absolute;
  top: 50%;
  left: var(--at);
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.cmp .knob::before, .cmp .knob::after {    /* two small arrows, left and right */
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  margin-top: -5px;
  border: 5px solid transparent;
}
.cmp .knob::before { left: 6px; border-right: 6px solid var(--orange); border-left: 0; }
.cmp .knob::after { right: 6px; border-left: 6px solid var(--orange); border-right: 0; }
.cmp input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.cmp input:focus-visible ~ .knob { outline: 3px solid var(--orange-hot); outline-offset: 2px; }
.cmp .tag {
  position: absolute;
  top: 10px;
  padding: 4px 7px 3px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(20, 14, 10, 0.62);
  pointer-events: none;
}
.cmp .tag.l { left: 10px; }
.cmp .tag.r { right: 10px; text-align: right; }
/* Each label keeps to its own half, so on a phone the two wrap instead of running into each other. */
.cmp .tag { max-width: calc(50% - 16px); }
@media (max-width: 480px) { .cmp .tag { font-size: 10px; letter-spacing: 0.04em; } }

/* an upright photograph: the frame narrows and keeps the height a level one has */
.compare.tall .print { width: 56.25%; margin: 0 auto; }
.compare.tall .cmp { aspect-ratio: 3 / 4; }
/* too narrow for two labels side by side: the right one goes to the foot, and each has the width */
.compare.tall .cmp .tag { max-width: calc(100% - 20px); }
.compare.tall .cmp .tag.r { top: auto; bottom: 10px; }

.compare .films, .compare .picks, .steps ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.compare .films button, .steps ol button {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 10px 6px;
  color: var(--white);
  background: transparent;
  border: 1.5px solid var(--hairline);
  cursor: pointer;
}
.compare .films button[aria-pressed="true"], .steps ol button[aria-current="step"] {
  color: var(--orange);
  background: var(--white);
  border-color: var(--white);
}
.compare .picks { gap: 8px; margin-top: 12px; }
.compare .picks button {
  padding: 3px;
  width: 72px;
  background: var(--white);
  border: 0;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s;
}
.compare .picks button:hover { outline-color: var(--hairline); }
.compare .picks button[aria-pressed="true"] { outline-color: var(--white); }
.compare .picks img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.compare figcaption, .steps figcaption, .crops figcaption {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--white-dim);
  max-width: 62ch;
}

/* the window going through a roll */
.steps .sheet { position: relative; padding: 3.1% 2.8%; transform: rotate(var(--rest, -0.4deg)); }
.steps .sheet svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.steps .sheet svg path { fill: var(--white); }
.steps .stage { position: relative; aspect-ratio: 2560 / 1640; }
.steps .stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.steps .stage img.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .steps .stage img { transition: none; } }

/* close up: three pairs at the camera's own pixels */
.crops .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.crops .cmp { aspect-ratio: 1 / 1; }
.crops .print { padding: 4%; }
.crops .row p { margin: 8px 0 0; font-size: 12px; color: var(--white); }
@media (max-width: 600px) { .crops .row { grid-template-columns: 1fr; } }

/* No page grain over a photograph (Alex, 14 November 2026: "grain is fine i'm talking about the
   oddlots page grain specifically", "so people can see them clearly"). The grain canvases in
   oddlots.css sit at z-index 90 and 91 over the whole viewport. Each picture's print, the thumbnails
   and the demo's sheet sit at 92, so a photograph shows as the camera and the film made it, grain in
   the film included, and the rest of the page keeps the store's grain. It is the print that rises,
   not the picture inside it, because the print's tilt makes it a layer of its own that would hold
   the picture under the grain. .wrap has no z-index for the same reason (oddlots.css). */
.print, .compare .picks button, .steps .sheet { position: relative; z-index: 92; }
