/* Photographs. Loaded after styles.css and errands.css. Static; only the existing .reveal fade applies. */

.photo-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--paper-2);
  aspect-ratio: var(--photo-ratio, 4 / 3);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-pos, 50% 50%);
}

/* Two columns: text left, photo right. Stacked on narrow screens, photo after the text. */
.photo-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.photo-split-text {
  min-width: 0;
}

.photo-split-text .section-heading {
  max-width: none;
}

.photo-split-media {
  --photo-ratio: 4 / 3;
}

@media (min-width: 900px) {
  .photo-split {
    grid-template-columns: minmax(0, 1fr) 40%;
    gap: 56px;
  }

  .photo-split-media {
    --photo-ratio: 5 / 6;
    max-height: 460px;
    width: 100%;
  }

  .photo-split-media--square {
    --photo-ratio: 1 / 1;
  }
}

/* Wide figure (coverage). */
.photo-wide {
  --photo-ratio: 16 / 9;
  margin: 28px 0 8px;
}

@media (min-width: 768px) {
  .photo-wide {
    --photo-ratio: 21 / 9;
  }
}

/* Photo across the top of a card, flush to its edges (card padding is 28px). */
.photo-card {
  overflow: hidden;
}

.photo-card-top {
  --photo-ratio: 16 / 10;
  margin: -28px -28px 22px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
}

/* Card without a photo: quiet outlined card, text centred vertically. */
.photo-card-quiet {
  justify-content: center;
  background: transparent;
}

/* Row of photo links (home errands section). */
.photo-link-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .photo-link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.photo-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.photo-link .photo-frame {
  --photo-ratio: 4 / 3;
}

.photo-link-label {
  display: block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.photo-link:hover .photo-link-label {
  color: var(--brand);
}
