/* fcc-art page-local styles.
 *
 * Most of the look (gallery-mosaic, gallery-cell, gallery-bar,
 * gallery-rows, sec-mast, sec-meta-strip, sec-subnav, sec-head, sec-body,
 * sec-footer) comes from the sitewide bundle:
 *
 *   /shared/fcc-archetypes.css
 *   /shared/fcc-sections.css
 *
 * Both are injected sitewide via nginx sub_filter. This stylesheet just
 * carries the page-specific overrides for the section accent, <img>
 * handling, and the "load more" button.
 */

:root {
  --art-accent: #e8788b;
}

html[data-section="art"] {
  --accent: var(--art-accent);
  --accent-2: #f49bab;
  --accent-wash: color-mix(in srgb, var(--art-accent) 14%, transparent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  position: static;
  display: inline-block;
  padding: 8px 12px;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--rule);
  z-index: 10;
}

.gallery-bar .chip {
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  font-weight: inherit;
  appearance: none;
  border-radius: 0;
}
.gallery-bar .chip:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.gallery-bar .chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery-cell {
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, background-color 120ms ease;
}
.gallery-cell:hover {
  background: var(--paper-3);
}
.gallery-cell:hover .img img {
  transform: scale(1.02);
}
.gallery-cell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gallery-cell .img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* For paintings/prints, "contain" preserves the canvas frame better than
   * "cover" — but for the gallery-mosaic visual rhythm we still want cells
   * filled. Paintings show off best with object-position: center top so the
   * subject (usually upper-middle of the canvas) survives the crop. */
  object-fit: cover;
  object-position: center top;
  display: block;
  background: var(--paper-2);
  transition: transform 600ms ease;
}
.gallery-cell .img::after { z-index: 2; }
.gallery-cell .caption { z-index: 3; }

.gallery-rows .row {
  text-decoration: none;
  color: inherit;
  transition: background-color 120ms ease;
  padding-left: 4px;
  padding-right: 4px;
  margin-left: -4px;
  margin-right: -4px;
}
.gallery-rows .row:hover {
  background: var(--paper-2);
}
.gallery-rows .row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gallery-rows .row .thumb {
  position: relative;
  overflow: hidden;
}
.gallery-rows .row .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-mosaic[aria-busy="true"] .gallery-cell .img {
  animation: artSkelPulse 1.8s ease-in-out infinite;
}
@keyframes artSkelPulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.9; }
}

.loadmore-wrap {
  display: flex;
  justify-content: center;
  margin: 40px 0 16px;
}
.loadmore-btn {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 12px 22px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}
.loadmore-btn:hover,
.loadmore-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.sec-meta-strip .col .v .accent {
  color: var(--accent);
  font-weight: 600;
}

.gallery-empty {
  padding: 48px 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-3);
}

/* Art-specific: byline-as-attribution. Painters' names are long; the
 * caption needs to squeeze a bit. */
.gallery-cell .caption .title {
  font-size: 13px;
}
