/* Frame it case study (staging page 588): page-level rules only, from the approved page design
   "RP Digital — Frame it case study" 1794456434-c10e (the helmet styles of Main.dc.html) and the media manifest.
   Everything else is the design system (system.css) and the theme's WordPress glue (site.css, inc/case-study.php,
   inc/frame-it.php). Nothing here restyles a shared component. The design's inline span, ratio and focal properties are
   set here by class: fi-half (6 + 6), fi-feature and fi-stack-col (8 + 4), fi-mark (3 + 3 + 3 + 3), fi-cameras and fi-aside
   (columns 1–8 and 10–12). The contact sheet (section 5) is the approved Frame it-only page exception. */

/* 1 · Opening image (CaseHero): the focal point recorded in the media manifest (§2.1). */
.fi-opener .pf-opener-frame { --pf-focus: 50% 64%; }

/* 2 · Spans. Identity squares and the documentary pair: 6 + 6, 4 + 4, stacked. */
.fi-half { --pf-s8: span 4; --pf-s12: span 6; }
/* The Art of Harmony: feature and stack, 8 + 4 and 5 + 3; on 4 columns the feature, then the stack's two frames side by side. */
.fi-feature { --pf-s8: 1 / span 5; --pf-s12: 1 / span 8; }
.fi-stack-col { --pf-s8: 6 / -1; --pf-s12: 9 / -1; }
/* The system's 4-column stack rule is a (max-width: 599px) query and its 8-column grid starts at (min-width: 600px), so a
   section frame between 599 and 600px wide (a 651px viewport) gets neither and the stack collapses. The system's own
   4-column rule, repeated for that gap only (an observation in tools/ds-register.md). */
@container pf-section (599px < width < 600px) {
  .fi-stack-col { contain: none; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .fi-stack-col > .pf-frame { aspect-ratio: 3 / 2; height: auto; }
}
/* Film-mark details: square frames, 3 + 3 + 3 + 3, four 2-column frames on 8, 2 + 2 on 4; captions under each, then the set caption. */
.fi-mark { --pf-s4: span 2; --pf-s8: span 2; --pf-s12: span 3; }
.fi-mark > .pf-frame { --pf-ratio: 1 / 1; }
.pf-sub.fi-marks { row-gap: 8px; }
/* Camera guide: the figure on columns 1–8, its text group on 10–12, bottom-aligned to the image; full width below 12 columns. */
.fi-cameras { --pf-s8: 1 / -1; --pf-s12: 1 / span 8; }
.fi-aside { --pf-s8: 1 / -1; --pf-s12: 10 / -1; display: flex; flex-direction: column; gap: 12px; align-self: end; }
.fi-aside > p { margin: 0; }

/* 3 · "Explore the publication": the heading with its caption beside it where they fit. */
.fi-explore-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.fi-explore-head > * { margin: 0; }

/* 4 · Contact sheet (approved page exception, Frame it only): 3 columns, 4 from 600px of section width, 6 from 1024px;
   the last row partly filled and left-aligned; no reordering. */
.fi-sheet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pf-space-s) var(--pf-grid-gap); }
@container pf-section (min-width: 600px) { .fi-sheet { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container pf-section (min-width: 1024px) { .fi-sheet { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.fi-sheet > li { margin: 0; min-width: 0; }
.fi-sheet-link { display: flex; flex-direction: column; gap: 8px; color: var(--pf-color-ink); text-decoration: none; cursor: zoom-in; }
.fi-sheet-cap { display: flex; flex-wrap: wrap; gap: 0 6px; min-width: 0; font-size: var(--pf-fs-caption); line-height: 1.45; color: var(--pf-color-ink-muted); transition: color var(--pf-duration-fast) var(--pf-ease-out); }
.fi-sheet-num { flex: none; color: var(--pf-color-ink); font-variant-numeric: tabular-nums; transition: color var(--pf-duration-fast) var(--pf-ease-out); }
.fi-sheet-label { min-width: 0; overflow-wrap: break-word; }
@media (hover: hover) {
  .fi-sheet-link:hover .fi-sheet-cap, .fi-sheet-link:hover .fi-sheet-num { color: var(--pf-color-accent); }
}
/* Below 600px of section width only the number shows; the link's accessible name always carries the full text.
   (Range syntax, so the 599–600px gap of the system's max-width queries doesn't apply here.) */
@container pf-section (width < 600px) {
  .fi-sheet-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .fi-sheet-cap, .fi-sheet-num { transition: none; }
}
