/*
 * FLASH EDITORIAL / V8
 * Clean color-only response: firm blacks, luminous mids, slightly cool flash whites.
 * Studio sources get a brighter curve; older flash sources get a restrained green/warm correction.
 * No texture, blur, glow, halo, lifted matte blacks, resampling, or moving photo overlays.
 * QA: hero skin + hoodie detail; portrait hands + black shirt; outdoor plaque text;
 *     early white shirt + crew faces. Inspect desktop/mobile at normal scale, and hover the gallery.
 */
:root {
  --photo-editorial: contrast(1.18) brightness(1.035) saturate(1.035);
  --photo-studio: contrast(1.15) brightness(1.06) saturate(.98);
  --photo-archive: contrast(1.14) brightness(1.025) saturate(1.015);
}

@supports (filter: url('#flash-editorial-v8')) {
  :root {
    --photo-editorial: url('#flash-editorial-v8');
    --photo-studio: url('#flash-studio-v8');
    --photo-archive: url('#flash-archive-v8');
  }
}

.hero-photo,
.story-main,
.story-secondary,
.photo-grade img,
.gallery-frame img,
.gallery-frame:hover img,
.impact-photo img,
.photo-ribbon img {
  filter: var(--photo-grade, var(--photo-editorial)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* The teal-lit studio photos are already dark and intensely colored. */
.story-main,
.impact-photo img,
.gallery-frame img[src$="studio.webp"] {
  --photo-grade: var(--photo-studio);
}

/* White balance the older flash sources rather than tinting the whole gallery. */
.gallery-frame img[src$="early-small.webp"],
.gallery-frame img[src$="crew-small.webp"],
.gallery-frame img[src$="desk.webp"] {
  --photo-grade: var(--photo-archive);
}

/* Cover art, institutional marks, and the illustrated awards keep their native colors. */
.credit-art img,
.credit-card:hover img,
.catalog-track img,
.record-disc img {
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.hero::after {
  background: none;
  opacity: 0;
  mix-blend-mode: normal;
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.photo-grade,
.impact-photo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Preserve the approved photo-frame sizes and overlap. */
.story-main-frame {
  width: 77%;
  height: 84%;
  border-radius: 30px;
}

.story-main-frame .story-main {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.story-secondary-frame {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 47%;
  height: 45%;
  border-radius: 23px;
  border: 8px solid var(--bg);
  transform: rotate(6deg);
  box-shadow: 0 16px 40px #0005;
}

.story-secondary-frame .story-secondary {
  position: static;
  right: auto;
  bottom: auto;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  transform: none;
  box-shadow: none;
}

.photo-grade::before,
.gallery-frame::before,
.impact-photo::before {
  content: none;
  background: none;
  mix-blend-mode: normal;
  opacity: 0;
  filter: none;
}

.photo-grade::after,
.gallery-frame::after,
.impact-photo::after {
  content: none;
  background: none;
  mix-blend-mode: normal;
  filter: none;
  opacity: 0;
}

/* Photo surfaces keep their perimeter rims, without any texture or full-face gloss. */
.photo-grade > .glass-shell .glass-texture,
.photo-grade > .glass-shell .glass-soft-light,
.gallery-frame > .glass-shell .glass-texture,
.gallery-frame > .glass-shell .glass-soft-light,
.hero > .glass-shell .glass-texture,
.hero > .glass-shell .glass-soft-light {
  display: none !important;
  background: none !important;
}

@media (max-width: 760px) {
  .story-main-frame {
    border-radius: 24px;
  }

  .story-secondary-frame {
    border-radius: 19px;
    border-width: 6px;
  }
}
