/* ============================================================
   gallery.css — 5 fixed photos, pinned straight to the wall at
   odd angles, no frame or caption — the photo is the whole card.
   Mixed horizontal/vertical shots keep their natural proportions
   so the wall reads like a real scattered collage.
   ============================================================ */

.gallery {
  padding: var(--space-6) 0;
}

.gallery__content {
  display: flex;
  flex-direction: column;
  max-width: var(--wide-width);
}

.gallery__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.gallery__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-5) var(--space-4);
  margin-top: var(--space-5);
  padding: var(--space-2);
}

.pinned-photo {
  position: relative;
  margin: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery__grid > .pinned-photo:nth-child(1) { transform: rotate(-3deg); }
.gallery__grid > .pinned-photo:nth-child(2) { transform: rotate(2deg); margin-top: 1.25rem; }
.gallery__grid > .pinned-photo:nth-child(3) { transform: rotate(-2deg); }
.gallery__grid > .pinned-photo:nth-child(4) { transform: rotate(3deg); margin-top: 0.75rem; }
.gallery__grid > .pinned-photo:nth-child(5) { transform: rotate(-1.5deg); }

.pinned-photo:hover,
.pinned-photo:focus-within {
  transform: rotate(0deg) scale(1.04);
  z-index: 1;
}

.pinned-photo__pin {
  position: absolute;
  top: -0.55rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.65), transparent 45%),
    var(--sun);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}
.gallery__grid > .pinned-photo:nth-child(2n) .pinned-photo__pin {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.65), transparent 45%),
    var(--sea);
}

.pinned-photo__media {
  display: block;
  width: auto;
  height: auto;
  max-width: min(20rem, 80vw);
  max-height: 20rem;
  box-shadow: 0 14px 28px -10px rgba(13, 16, 21, 0.4), 0 2px 6px rgba(13, 16, 21, 0.16);
}
.pinned-photo:hover .pinned-photo__media,
.pinned-photo:focus-within .pinned-photo__media {
  box-shadow: 0 18px 34px -8px rgba(13, 16, 21, 0.45), 0 3px 8px rgba(13, 16, 21, 0.2);
}
