/* GALLERY ITEMS
   Photo tiles shared by the gallery highlights page and the home page hero.
   Uses .container from 01-reset-base for margins */

.gallery-item { cursor: pointer; min-width: 0; }
.gallery-item--wide { grid-column: 1 / -1; }

.gallery-item .image-wrap {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--accent-pale);
}

.gallery-item img,
.gallery-card__cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: var(--img-transition);
  filter: var(--img-filter);
}

/* Wide hero: cinematic crop.
   object-position controls which part of the photo shows —
   adjust per image if needed (e.g. "center bottom" for ground-level shots). */
.gallery-item--wide .image-wrap {
  aspect-ratio: 21/9;
  overflow: hidden;
}

.gallery-item--wide img {
  height: 100%;
  object-position: center center;
  filter: none;
}

.gallery-item:hover img {
  transform: var(--img-hover-scale);
  filter: saturate(1);
}

.gallery-item figcaption {
  padding-top: 0.5rem;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink-light);
}
/* GALLERY DETAIL GRID (highlights page) */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding-bottom: calc(var(--gap) * 3);
  align-items: start;
}

/* GALLERY INDEX — CARDS (a .grid) */
.gallery-cards {
  padding-top: 1.5rem;
  padding-bottom: calc(var(--gap) * 4);
}

.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.gallery-card__cover {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--accent-pale);
}

.gallery-card:hover .gallery-card__cover img {
  transform: var(--img-hover-scale);
  filter: saturate(1);
}

.gallery-card__count,
.gallery-card__service {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  font-family: var(--font-body);
  font-weight: 400;
  background: rgba(28, 25, 22, 0.7);
  color: #f5f3ee;
  padding: 0.2rem 0.55rem;
  border-radius: 1px;
  backdrop-filter: blur(4px);
}

.gallery-card__info { --stack-gap: 0.35rem; }

.gallery-card__info h3 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 400;
  line-height: 1.2;
}

.gallery-card__info h3 a { color: var(--ink); transition: color 0.2s; }
.gallery-card__info h3 a:hover { color: var(--accent); }

.gallery-card__desc {
  font-size: 0.925rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-mid);
}

.gallery-card__link {
  font-weight: 400;
  color: var(--ink-mid);
  transition: color 0.2s;
}
.gallery-card__link:hover { color: var(--accent); }

.gallery-index {
  padding-top: 1.25rem;
}

.gallery-index + .gallery-index {
  padding-top: 0;
}

.gallery-index--external {
  margin-top: 0.5rem;
}

.gallery-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.gallery-section-head__eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink-light);
}

.gallery-section-head__note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-light);
}

.gallery-index .gallery-cards {
  padding-top: 1.25rem;
}

.gallery-index--external .gallery-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--bg) 10%, transparent),
    transparent 35%
  );
  pointer-events: none;
}

@media (max-width: 720px) {
  .gallery-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding-top: 1rem;
  }

  .gallery-section-head__note {
    font-size: 0.78rem;
  }

  .gallery-index .gallery-cards {
    padding-top: 1rem;
  }
}
/* GALLERY IMAGE PAGE */
.gallery-image-page {
  padding-top: var(--space-2xl);
  padding-bottom: calc(var(--gap) * 4);
}

.gallery-image-page__figure {
  margin: 0 0 var(--space-md);
  overflow: hidden;
  background: var(--accent-pale);
}

.gallery-image-page__info {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 52ch;
}

.gallery-image-page__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
}

.gallery-image-page__text {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-mid);
  margin-top: 0.5rem;
}

.gallery-image-page__back { margin-top: 0.5rem; }

/* EXIF DATA BLOCK */
.gallery-image-page__exif {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
}

.exif-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}

.exif-row:first-child { border-top: 1px solid var(--border); }

.exif-row dt {
  font-weight: 400;
  color: var(--ink-light);
  white-space: nowrap;
  min-width: 5rem;
  flex-shrink: 0;
}

.exif-row dd {
  font-weight: 300;
  color: var(--ink-mid);
}
