/* INSIGHT-FY1 · photo gallery and modal.
   Colour is tokens only; no literal anywhere in this file. */

.ig-section { margin-block: 56px 8px; }
.ig-heading {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(26px, 2.2vw, 32px);
  line-height: 1.22; color: var(--ink);
  max-width: 36ch; margin: 0 0 1.1em;
  padding-top: .7em;
}
.ig-heading::before {
  content: ""; display: block;
  width: 64px; height: 3px; margin-bottom: .55em;
  background: var(--rule-gold);
}

.ig-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.ig-item { margin: 0; }
.ig-figure { margin: 0; }

.ig-trigger {
  display: block; width: 100%; padding: 0;
  border: 0; background: var(--plum);
  border-radius: 8px;            /* = .btn and .ic-media */
  overflow: hidden; cursor: pointer;
  aspect-ratio: 4/3;             /* = .ic-media, so the page keeps one ratio */
}
.ig-trigger img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
/* Motion is an enhancement, never a requirement. */
@media (prefers-reduced-motion: reduce) { .ig-trigger img { transition: none; } }
.ig-trigger:hover img, .ig-trigger:focus-visible img { transform: scale(1.03); }
.ig-trigger:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.ig-caption { margin-top: 10px; display: grid; gap: 2px; }
.ig-person  { display: block; }
.ig-person + .ig-person { margin-top: 8px; }
.ig-name {
  display: block;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  color: var(--ink);
}
/* ⚠ The role line WRAPS. Two of these carry a title with two roles separated
   by a semicolon, and forcing them onto one line would either overflow or
   require abbreviating someone's job. */
.ig-role {
  display: block;
  font-family: var(--sans); font-size: 14px; line-height: 1.4;
  color: var(--on-page-soft);
  text-wrap: pretty;
}

/* ── The modal ───────────────────────────────────────────────────────── */
.ig-dialog {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%;
  background: transparent; color: var(--cream);
  overflow: hidden;
}
.ig-dialog::backdrop { background: color-mix(in srgb, var(--ink) 88%, transparent); }

.ig-dialog-inner {
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr auto;
  align-items: center; gap: 12px;
  padding: 24px clamp(12px, 4vw, 56px) 20px;
  box-sizing: border-box;
}
.ig-dialog-figure {
  grid-column: 2; grid-row: 1;
  margin: 0; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.ig-dialog-img {
  max-width: 100%; max-height: 72vh;
  width: auto; height: auto;
  object-fit: contain; border-radius: 8px;
}
.ig-dialog-caption { display: grid; gap: 2px; text-align: center; }
.ig-dialog-caption .ig-name { color: var(--cream); }
.ig-dialog-caption .ig-role { color: var(--on-dark-body); }

.ig-close, .ig-prev, .ig-next {
  background: var(--tint-on-dark); color: var(--cream);
  border: 1px solid var(--rule-on-dark); border-radius: 999px;
  width: 48px; height: 48px; font-size: 22px; line-height: 1;
  cursor: pointer; flex: none;
}
.ig-close:focus-visible, .ig-prev:focus-visible, .ig-next:focus-visible,
.ig-dialog-img:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.ig-prev { grid-column: 1; grid-row: 1; }
.ig-next { grid-column: 3; grid-row: 1; }
.ig-close { position: absolute; top: 18px; right: 18px; }
.ig-counter {
  grid-column: 1 / -1; grid-row: 2; margin: 0; text-align: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--on-dark-body);
}

/* ⚠ 390px IS A TARGET, NOT AN AFTERTHOUGHT. At that width the side buttons
   would eat the image, so they move below it and the grid collapses to one
   column. */
@media (max-width: 560px) {
  .ig-dialog-inner {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto;
    padding: 56px 12px 16px;
  }
  .ig-dialog-figure { grid-column: 1; grid-row: 1; }
  .ig-prev, .ig-next { grid-row: 2; width: 44px; height: 44px; }
  .ig-prev { grid-column: 1; justify-self: start; }
  .ig-next { grid-column: 1; justify-self: end; }
  .ig-counter { grid-row: 3; }
  .ig-dialog-img { max-height: 58vh; }
}
