/* Master content spacing: the homepage Time-lapse Showreel uses 15px. */
:root {
  --site-content-gap: 15px;
  --site-caption-gap: 10px;
  --site-gold: #FFCC00;
  color-scheme: only light;
}

/* Give each title one owner for its outside spacing. */
html body :is(h2, h3, h4).gold-heading,
html body :is(h2, h3, h4).rhythm-title,
html body .rhythm-heading-row {
  margin-block: var(--site-content-gap) !important;
}
html body .rhythm-heading-row { padding-block: 0 !important; }
html body .rhythm-heading-row :is(h2, h3, h4).rhythm-title,
html body .rhythm-heading-row > a {
  margin-block: 0 !important;
}
html body .rhythm-section {
  margin-block: 0 !important;
  padding-block: 0 !important;
}

/* Block photographs avoid the extra baseline space of inline images. */
html body img.rhythm-photo[src] {
  display: block;
  margin-block: var(--site-content-gap) !important;
  margin-inline: auto;
}
html body .rhythm-photo-unit,
html body .rhythm-caption-group {
  margin-block: var(--site-content-gap) !important;
}
html body a.rhythm-photo-unit {
  display: block !important;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}
html body .rhythm-photo-unit {
  padding-block: 0 !important;
  line-height: 0;
}
html body .rhythm-photo-unit img.rhythm-photo,
html body .rhythm-photo-inner {
  margin-block: 0 !important;
}
html body .rhythm-photo-inner { display: block; }
html body .rhythm-photo-unit :is(.rhythm-photo, .rhythm-photo-inner) + :is(.rhythm-photo, .rhythm-photo-inner) {
  margin-top: var(--site-content-gap) !important;
}

/* Caption cards keep their existing internal spacing. */
html body .rhythm-gallery {
  margin-block: var(--site-content-gap) !important;
  padding-block: 0 !important;
  row-gap: var(--site-content-gap) !important;
}
html body .rhythm-gallery-item { padding-block: 0 !important; }
html body .gallery-grid.rhythm-gallery > img {
  margin-block: 0 !important;
}
html body .visual-menu.rhythm-gallery .project-item img {
  margin-block: 0 !important;
}
html body .visual-menu.rhythm-gallery .project-item h2.gold-heading {
  margin-top: var(--site-caption-gap) !important;
  margin-bottom: 0 !important;
}
@media (min-width: 601px) {
  html body .visual-menu.rhythm-gallery .project-item:nth-child(2) h2.gold-heading {
    margin-top: 17.5px !important;
  }
}
html body .portfolio-item:has(.portfolio-caption) img {
  margin-block: 0 !important;
}
/* Preserve the existing 27px gap on the historical camera-comparison captions. */
html body :is(.rhythm-caption-photo, .rhythm-photo-caption) { --site-caption-gap: 27px; }
html body img.rhythm-photo.rhythm-caption-photo { margin-bottom: var(--site-caption-gap) !important; }
html body .rhythm-photo-caption { margin-top: var(--site-caption-gap) !important; }

/* Existing column layouts use gap instead of accumulating child margins. */
html body .rhythm-flow { row-gap: var(--site-content-gap) !important; }
html body .rhythm-flow > img.rhythm-photo[src],
html body .rhythm-flow > :is(.rhythm-title, .rhythm-heading-row,
  .rhythm-photo, .rhythm-photo-unit, .rhythm-gallery, .rhythm-section, p, .awards-list) {
  margin-block: 0 !important;
}
html body .rhythm-spacer { display: none !important; }
html body :is(a:not([href]), span)[id]:empty,
html body a[name]:not([href]):empty {
  display: block;
  height: 0 !important;
  margin-block: 0 !important;
  padding-block: 0 !important;
}
html body .rhythm-flow > :is(a:not([href]), span)[id]:empty,
html body .rhythm-flow > a[name]:not([href]):empty {
  position: absolute;
}

/* Retain the authored bright gold in mobile light/dark modes and after taps. */
html { color-scheme: only light; }
html body :is(.gold-heading, .yellow-box, .cta-button, .btn-yellow,
  .theme-link-solid > span) {
  background-color: var(--site-gold) !important;
  background-image: linear-gradient(var(--site-gold), var(--site-gold)) !important;
  color: #000000 !important;
  opacity: 1 !important;
  forced-color-adjust: none;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: none) {
  html body :is(.gold-heading, .yellow-box, .cta-button, .btn-yellow,
    .theme-link-solid > span, .gold-heading-link) {
    filter: none !important;
  }
}
