/* Project tiles: keep the arrow legible over both light and dark photos. */
.gallery .gallery-item > span > i {
  background-color: rgba(16, 24, 32, .85);
  color: var(--white, #fff);
  border-color: var(--white, #fff);
}

.gallery .gallery-item:is(:hover, :focus-visible) > span > i {
  background-color: var(--tan, #B07A4A);
  border-color: var(--tan, #B07A4A);
  color: var(--tan-ink, #101820);
  box-shadow: 0 0 0 2px rgba(247, 244, 239, .8),
    0 0 16px 4px rgba(176, 122, 74, .8);
}

/* The viewer arrows are independent buttons, not part of the tile link. */
.lightbox .lightbox-arrow:not(:disabled):is(:hover, :focus-visible) {
  background-color: var(--tan, #B07A4A);
  border-color: var(--tan, #B07A4A);
  color: var(--tan-ink, #101820);
  box-shadow: 0 0 0 2px rgba(247, 244, 239, .8),
    0 0 16px 4px rgba(176, 122, 74, .8);
}

/* Match the header's real 20px masked marks and its color/lift interaction.
   The larger transparent links provide 44px targets without visible boxes. */
.footer .footer-social {
  gap: 0;
}

.footer .footer-social .footer-facebook {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tan, #B07A4A);
  transition: color .22s ease, transform .22s ease;
}

.footer .footer-social .footer-facebook > .social-mark {
  width: 20px;
  height: 20px;
}

.footer .footer-social .footer-facebook:hover {
  color: var(--off-white, #F7F4EF);
  transform: translateY(-2px);
}

.footer .footer-social .footer-facebook:focus-visible {
  color: var(--off-white, #F7F4EF);
}

@media (prefers-reduced-motion: no-preference) {
  .gallery .gallery-item > span > i,
  .lightbox .lightbox-arrow {
    transition: color .22s ease, background-color .22s ease,
      border-color .22s ease, box-shadow .22s ease;
  }

  /* The legacy reveal rule cancels transitions inside focused sections.
     Restore the header-matching color transition on footer links only. */
  html.js .footer-main.reveal:focus-within .footer-social .footer-facebook {
    transition: color .22s ease, transform .22s ease !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer .footer-social .footer-facebook {
    transition: none;
  }

  .footer .footer-social .footer-facebook:hover {
    transform: none;
  }
}

/* Background images and shadows can be removed in high-contrast mode. */
@media (forced-colors: active) {
  .gallery .gallery-item > span > i,
  .lightbox .lightbox-arrow {
    background-color: Canvas;
    border-color: CanvasText;
    color: CanvasText;
  }

  .gallery .gallery-item:is(:hover, :focus-visible) > span > i,
  .lightbox .lightbox-arrow:not(:disabled):is(:hover, :focus-visible) {
    background-color: Highlight;
    border-color: HighlightText;
    color: HighlightText;
  }
}
