@font-face {
  font-family: 'Brother Signature';
  src: url('assets/brother-signature.otf') format('opentype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Two overlapping rows move continuously at the same speed. */
.community-section { display: block; }
.location-block { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(40px, 7vw, 110px); }
.location-block .location-card { margin-top: 0; }
.artist-section { padding: 90px 0 44px; border-top: 1px solid var(--line); overflow: hidden; }
.artist-section h2 { font-size: clamp(36px, 4.3vw, 62px); line-height: 1.08; letter-spacing: -.05em; }
.floating-gallery { position: relative; width: 100%; margin-top: 52px; isolation: isolate; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.floating-stack { --card-width: clamp(190px, 17vw, 260px); --overlap: clamp(30px, 3vw, 48px); padding-block: 4px 18px; }
.polaroid-lane { position: relative; overflow: hidden; padding-block: 52px; }
.polaroid-lane + .polaroid-lane { margin-top: -68px; }
.polaroid-lane:hover, .polaroid-lane:focus-within { z-index: 2; }
.polaroid-track { display: flex; width: max-content; position: relative; animation: polaroid-travel var(--travel-duration, 60s) linear infinite; will-change: transform; }
.polaroid-group { display: flex; flex: none; }
.polaroid-lane:has(.floating-card:focus-visible) .polaroid-track { animation: none; transform: translateX(var(--focus-offset, 0px)); }
@keyframes polaroid-travel {
  from { transform: translateX(var(--lane-offset, 0px)); }
  to { transform: translateX(calc(var(--lane-offset, 0px) - var(--travel-distance, 1500px))); }
}
.floating-card { position: relative; flex: 0 0 var(--card-width); width: var(--card-width); margin-right: calc(-1 * var(--overlap)); z-index: 0; outline: none; }
.floating-motion { width: 100%; animation: polaroid-sway 7s ease-in-out infinite; will-change: transform; }
.floating-print { position: relative; width: 100%; margin: 0; transform: rotate(var(--rotation)); transition: transform 350ms cubic-bezier(.2,.7,.2,1), filter 350ms; transform-origin: 50% 50%; }
.floating-card:focus-visible { z-index: 10; }
.floating-card:focus-visible .floating-print { transform: translateY(-12px) rotate(0deg) scale(1.14); filter: drop-shadow(0 24px 18px #0009); outline: 2px solid #f12d36; outline-offset: 6px; }
@media (hover: hover) and (pointer: fine) {
  .floating-card:hover { z-index: 10; }
  .floating-card:hover .floating-print { transform: translateY(-12px) rotate(0deg) scale(1.14); filter: drop-shadow(0 24px 18px #0009); }
}
.floating-paper {
  position: relative;
  padding: 5.2% 5.2% 18%;
  border-radius: 1px 2px 3px 1px;
  background: #e8e6dd;
  box-shadow: 0 1px 0 #fffc inset, 1px 0 0 #fff8 inset,
    -1px -2px 0 #b2afa5 inset, 0 2px 3px #0005, 0 22px 32px #0009;
  transform: translateZ(.1px);
}
.floating-paper::before,
.floating-paper::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}
.floating-paper::before {
  background: repeating-radial-gradient(circle at 16% 21%, #463c2210 0 .4px, transparent .7px 2.5px);
  opacity: .38;
  mix-blend-mode: multiply;
}
.floating-paper::after {
  background: linear-gradient(118deg, #fff3, transparent 38%, #0b07080d 72%, #fff1);
  box-shadow: 0 0 14px #fff2 inset;
  opacity: .4;
}
.floating-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #2a2520;
  box-shadow: 0 0 0 1px #39302618, 0 1px 2px #0003 inset;
}
.floating-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.floating-photo-image.floating-photo-crop {
  position: absolute;
  height: auto;
  object-fit: initial;
}
.floating-caption {
  position: absolute;
  left: 5.2%;
  right: 5.2%;
  bottom: 2.3%;
  height: 10.5%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #302e29;
  font: 400 clamp(27px, 3vw, 34px)/1 'Brother Signature', Caveat, cursive;
  font-synthesis: none;
  letter-spacing: 0;
  white-space: nowrap;
  text-align: center;
  transform: translateZ(.2px) rotate(-2deg);
  pointer-events: none;
}
.floating-caption[hidden] { display: none; }
.floating-card:nth-child(even) .floating-caption { transform: translateZ(.2px) rotate(1deg); }

.floating-gallery[data-paused="true"] .floating-motion, .floating-gallery[data-paused="true"] .polaroid-track { animation-play-state: paused; }
@keyframes polaroid-sway {
  0%, 100% { transform: translate3d(0, 8px, 0) rotate(-1deg); }
  50% { transform: translate3d(0, -8px, 0) rotate(1deg); }
}
@media (max-width: 1000px) {
  .artist-section { padding-top: 70px; }
  .location-block { grid-template-columns: .8fr 1.2fr; gap: 32px; }
  .floating-gallery { margin-top: 36px; }
}
@media (max-width: 600px) {
  .community-section { padding-bottom: 60px; }
  .location-block { display: block; }
  .location-block .location-card { margin-top: 28px; }
  .artist-section { padding: 58px 0 22px; }
  .artist-section h2 { font-size: clamp(33px, 8.6vw, 44px); }
  .floating-gallery { margin-top: 26px; }
  .floating-stack { --card-width: 186px; --overlap: 32px; padding-bottom: 0; }
  .polaroid-lane { padding-block: 42px; }
  .polaroid-lane + .polaroid-lane { margin-top: -50px; }
  .floating-caption { font-size: clamp(24px, 6.5vw, 32px); }
}
.floating-gallery[data-reduced-motion="true"] .floating-motion,
.floating-gallery[data-reduced-motion="true"] .polaroid-track { animation: none; transform: none; will-change: auto; }
.floating-gallery[data-reduced-motion="true"] .polaroid-lane { overflow-x: auto; scrollbar-width: thin; }
.floating-gallery[data-reduced-motion="true"] .polaroid-group[aria-hidden="true"] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .floating-print { transition: none; }
}
