/* fcc-photography page-local styles.
 *
 * The bulk of the look (gallery-mosaic, gallery-cell, gallery-bar,
 * gallery-rows, sec-mast, sec-meta-strip, sec-subnav, sec-head, sec-body,
 * sec-footer) is provided by:
 *
 *   /shared/fcc-archetypes.css
 *   /shared/fcc-sections.css
 *
 * Those bundles are injected sitewide via nginx sub_filter (see the
 * fcc.cc.nginx sub_filter line). This stylesheet only carries the
 * page-specific overrides — accent on .chip[aria-current], <img> handling
 * inside .gallery-cell .img, "load more" button, etc.
 */

:root {
  /* Section accent is also written by /shared/fcc-section-accent.js, but
   * declare the photography accent statically too so the page paints with
   * the right hue before any JS runs. */
  --photo-accent: #94a3b8;
}

html[data-section="photography"] {
  --accent: var(--photo-accent);
  --accent-2: #b3c0d0;
  --accent-wash: color-mix(in srgb, var(--photo-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;
}

/* Chip-bar buttons (designed as <span>, but we use <button> for keyboard /
 * a11y). Reset native button chrome so the .chip rules in fcc-archetypes.css
 * apply cleanly. */
.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 with a real <img> inside .img — make the photo cover the
 * radial-accent background, but keep the dashed inset visible as a frame
 * cue. The archetype CSS sets .img to absolute-inset + radial bg; we add
 * the <img> rule on top. */
.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%;
  object-fit: cover;
  display: block;
  transition: transform 600ms ease;
}
/* Dashed inset stays on top of the image, in front of the gradient. */
.gallery-cell .img::after {
  z-index: 2;
}
/* Caption gradient must sit ABOVE the image, otherwise the text is
 * unreadable. */
.gallery-cell .caption {
  z-index: 3;
}

/* Archive rows: real photo inside the thumb. */
.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;
}

/* Loading skeleton — the mosaic shows the radial-accent placeholder cells
 * (defined by archetypes.css) while items are still being fetched. Just
 * fade them slightly so the empty state reads as "still loading". */
.gallery-mosaic[aria-busy="true"]::before {
  content: "";
  position: absolute;
}
.gallery-mosaic[aria-busy="true"] .gallery-cell .img {
  animation: photoSkelPulse 1.8s ease-in-out infinite;
}
@keyframes photoSkelPulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 0.9; }
}

/* Load more button */
.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 stat value tweaks — make the "8 added" highlight pop with
 * the photo accent when the JS swaps the inner HTML. */
.sec-meta-strip .col .v .accent {
  color: var(--accent);
  font-weight: 600;
}

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