/* The screenshot gallery on the landing and About pages: rows of phone
   screenshots that slide sideways, and a full-screen viewer to go through them
   one at a time. The markup is written by tests/shots/publish.py from
   gallery/shots.json; shots.js adds the arrows and the viewer. Without the
   script the rows still scroll and every picture has its caption. */
.shots { --shot-w: min(58vw, 14rem); margin: 0 0 2.75rem; }
.shots-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 .9rem;
}
.shots-head h3 { margin: 0; font-size: 1.15rem; font-weight: 650; color: #fff; letter-spacing: -.01em; }
.shots-head p { margin: .2rem 0 0; font-size: .9rem; line-height: 1.45; color: rgba(255, 255, 255, .66); }
.shots-nav { display: none; flex: none; gap: .5rem; }
.shots.is-live .shots-nav { display: flex; }
.shots-nav button,
.shots-view-bar button,
.shots-view-step {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .2s, border-color .2s, opacity .2s, transform .2s;
}
.shots-nav button:hover:not(:disabled),
.shots-view-bar button:hover,
.shots-view-step:hover:not(:disabled) { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); }
.shots-nav button:active:not(:disabled) { transform: scale(.94); }
.shots-nav button:disabled,
.shots-view-step:disabled { opacity: .28; cursor: default; }
.shots svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shots :is(button, .shots-strip):focus-visible { outline: 2px solid #8ab4ff; outline-offset: 3px; }

/* The row. It bleeds to the screen edge on a phone, so the next picture peeks in. */
.shots-strip {
  display: flex;
  gap: .9rem;
  margin: 0 -1.5rem;
  padding: .35rem 1.5rem 1.1rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding: 0 1.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shots-strip::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 var(--shot-w); margin: 0; scroll-snap-align: start; }
.shot-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 1.35rem;
  overflow: hidden;
  background: #14151a;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 40px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 780 / 1688; object-fit: cover; }
/* The description: over the foot of the picture on hover or keyboard focus. */
.shot-note {
  position: absolute;
  inset: auto 0 0;
  padding: 3.5rem .9rem .95rem;
  background: linear-gradient(to top, rgba(6, 7, 10, .94) 35%, rgba(6, 7, 10, 0));
  font-size: .8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .92);
  opacity: 0;
  transform: translateY(.5rem);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.shot figcaption { margin-top: .7rem; font-size: .85rem; font-weight: 650; line-height: 1.35; color: #fff; }
/* Where nothing hovers, the description sits under the title instead. */
.shot figcaption span { display: block; margin-top: .2rem; font-weight: 400; color: rgba(255, 255, 255, .66); }
@media (hover: hover) {
  .shot-open:hover, .shot-open:focus-visible { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .32), 0 26px 54px rgba(0, 0, 0, .6); }
  .shot-open:hover .shot-note, .shot-open:focus-visible .shot-note { opacity: 1; transform: none; }
  .shot figcaption span { display: none; }
}
/* How far along the row is. */
.shots-progress { display: none; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.shots.is-live .shots-progress { display: block; }
.shots-progress i { display: block; height: 100%; width: 100%; border-radius: 2px; background: rgba(255, 255, 255, .7); transform-origin: 0 50%; transform: scaleX(.2); }
@media (min-width: 46rem) {
  .shots { --shot-w: 13.5rem; }
  .shots-strip { margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; scroll-padding: 0 .5rem; -webkit-mask-image: linear-gradient(to right, transparent, #000 .5rem, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(to right, transparent, #000 .5rem, #000 calc(100% - 3rem), transparent); }
  .shot-open { border-radius: 1.1rem; }
}

/* The viewer: one picture at a time, swiped or stepped through. */
.shots-view {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 7, 10, .9);
  color: #fff;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
.shots-view::backdrop { background: rgba(6, 7, 10, .6); }
.shots-view[open] { display: flex; flex-direction: column; animation: shots-in .25s ease both; }
@keyframes shots-in { from { opacity: 0; } }
.shots-view-bar { display: flex; align-items: center; justify-content: space-between; flex: none; padding: max(.75rem, env(safe-area-inset-top)) 1rem .5rem; }
.shots-view-count { font-size: .85rem; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .7); }
.shots-view-count b { color: #fff; font-weight: 650; }
.shots-view-track {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: auto;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.shots-view-track::-webkit-scrollbar { display: none; }
.shots-view-slide { flex: 0 0 100%; display: grid; place-items: center; min-width: 0; padding: .25rem 1rem; scroll-snap-align: center; scroll-snap-stop: always; }
/* (The height is from the screen, less the bar and the caption: a percentage of the slide would not hold it.) */
.shots-view-slide img { display: block; max-width: 100%; max-height: calc(100vh - 11.5rem); max-height: calc(100dvh - 11.5rem); width: auto; height: auto; border-radius: 1.25rem; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 30px 80px rgba(0, 0, 0, .7); }
.shots-view-text { flex: none; min-height: 5.4rem; max-width: 34rem; margin: 0 auto; padding: .8rem 1.25rem max(1rem, env(safe-area-inset-bottom)); text-align: center; }
.shots-view-text strong { display: block; font-size: 1rem; font-weight: 650; }
.shots-view-text span { display: block; margin-top: .25rem; font-size: .9rem; line-height: 1.45; color: rgba(255, 255, 255, .72); }
.shots-view-step { position: absolute; top: 50%; margin-top: -1.5rem; width: 3rem; height: 3rem; }
.shots-view-step.is-prev { left: max(1rem, calc(50% - 22rem)); }
.shots-view-step.is-next { right: max(1rem, calc(50% - 22rem)); }
.shots-view svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shots-view button:focus-visible { outline: 2px solid #8ab4ff; outline-offset: 3px; }
/* On a phone the picture is swiped; the arrows would only cover it. */
@media (max-width: 45.99rem) { .shots-view-step { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .shot-open, .shot-note, .shots-nav button { transition: none; }
  .shots-view[open] { animation: none; }
}
