/* Photo rows: three rows of photographs drifting sideways, the middle row
   running the other way. Taken from the DUNK homepage gallery and made
   self-contained so it can be dropped into any page here without Tailwind.

   Markup, one block per row (the second set is an exact copy, hidden from
   screen readers, which is what makes the loop seamless):

   <section class="photo-rows" role="img" aria-label="What the photos show">
     <div class="photo-rows__row">
       <div class="photo-rows__track">
         <div class="photo-rows__set"> <img ...> x6 </div>
         <div class="photo-rows__set" aria-hidden="true"> same six </div>
       </div>
     </div>
     ...
   </section>

   The track travels exactly one set's width and starts again. One set has to
   be wider than the screen or a gap shows before the loop restarts: six
   photos at the sizes below come to 1,720px at 1440px wide and 2,000px at
   1920px, so six a row is the minimum.

   Speed matches DUNK's, about 32px a second, so the durations scale with the
   number of photos in a row. Change the count and change the duration with it.

   The file name carries a version (photo-rows.v1.css) because netlify.toml caches /css/* for a
   year. Any change to this file needs a new name and the <link> updated. */

.photo-rows{
  --pr-gap:clamp(.5rem,1vw,.9rem);
  display:grid;
  gap:var(--pr-gap);
  overflow:hidden;
  /* the page ground above and below, then the fade at each side */
  padding:0 0 3rem;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 6%,#000 94%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 6%,#000 94%,transparent 100%);
}
/* The membership block above ends in 96px of padding at every width, and the
   questions block below starts with 48px, then 80px, then 96px. This evens
   out the space under the photos so it matches the space above them. */
@media (min-width:768px){ .photo-rows{padding-bottom:1rem;} }
@media (min-width:1024px){ .photo-rows{padding-bottom:0;} }

.photo-rows__row{overflow:hidden;}
.photo-rows__track{display:flex;width:max-content;gap:var(--pr-gap);}
.photo-rows__set{display:flex;flex:0 0 auto;gap:var(--pr-gap);}
.photo-rows__set img{
  flex:0 0 auto;
  width:clamp(12rem,19vw,20rem);height:auto;
  aspect-ratio:3 / 2;object-fit:cover;
  border-radius:.9rem;
  background:#e5e7eb;
  box-shadow:0 1px 3px rgba(0,0,0,.08),0 10px 26px rgba(0,0,0,.1);
}

@keyframes photoRowsLeft{
  from{transform:translate3d(0,0,0);}
  to{transform:translate3d(calc(-50% - (clamp(.5rem,1vw,.9rem) / 2)),0,0);}
}
@keyframes photoRowsRight{
  from{transform:translate3d(calc(-50% - (clamp(.5rem,1vw,.9rem) / 2)),0,0);}
  to{transform:translate3d(0,0,0);}
}
.photo-rows__row:nth-child(1) .photo-rows__track{animation:photoRowsLeft 54s linear infinite;}
.photo-rows__row:nth-child(2) .photo-rows__track{animation:photoRowsRight 61s linear infinite;}
.photo-rows__row:nth-child(3) .photo-rows__track{animation:photoRowsLeft 68s linear infinite;}

@media (prefers-reduced-motion:reduce){
  .photo-rows__track{animation:none!important;}
}
