/* v7 product shots exported from Figma (Website, Nov: "Artwork & Grpahics"), the source of truth for every
   product shot since 10 November. Each state of a shot is one 2x WebP of its Figma frame, lit stage included;
   js/v7/states.js crossfades them in order and holds on the last. With no script, or for a reader who asks
   for less motion, the last state is the one shown.

   On a phone a whole frame would shrink its text to a few pixels, so a shot names its focus, the part of the
   frame that tells the story (in the frame's own 1x pixels: --fx, --fy, --fw, --fh, of an --iw wide frame),
   and a phone shows that crop at a readable size instead. */

/* The page sheets give a demo panel a fixed height (.site[data-frame] .ptx__demo, 460px); an image shot sets its own
   height from its frame, so this outranks them */
.ptx__demo--image, .site[data-frame] .ptx__demo.ptx__demo--image { height: auto; padding: 0; background: none; }
.ptx__demo--image > .fshot { margin: 0; }
/* A panel's shot runs to the panel's square edges, so it has no corners of its own */
.ptx__demo > .fshot { border-radius: 0; }
/* Any shot that runs edge to edge in a square section (a stage between the rails, a report row) is square too: rounded
   corners against square edges read as a mistake (Johnny, 12 Nov). Only a shot floating inside its section keeps them */
.s-stage > .fshot, .rpv__demo > .fshot, .s-stage > .ashot, .rpv__demo > .ashot { border-radius: 0; }

.fshot { position: relative; display: grid; margin: 0; overflow: hidden; border-radius: 12px; aspect-ratio: var(--iw) / var(--ih); background: var(--bg-sunken); }
.fshot__state { grid-area: 1 / 1; display: block; width: 100%; height: auto; opacity: 0; transition: opacity 420ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.fshot__state:last-child { opacity: 1; }
/* A state can be a picture with a phone source (12 Nov): its image fills the state */
.fshot__state > img { display: block; width: 100%; height: auto; }
.fshot.is-live .fshot__state { opacity: 0; }
.fshot.is-live .fshot__state.is-on { opacity: 1; }

/* 31 Agent record (frames 270-3018 The record, 271-3026 One click into the file): a pull request's attestation,
   then the file one click opens, with the agent's lines and the review record */
.fshot--31 { --iw: 1072; --ih: 700; }
/* A state is a picture: a phone gets the state's own phone frame (400 wide, its text at nearly full size), not a
   crop, because the record's facts span the whole desktop frame. It sits on the sunken surface with its own edge.
   on Home figma-shots.css loads after home.css, so these rules name .fshot as well */
.fshot--31 .fshot__state > img { display: block; width: 100%; height: auto; }
@media (max-width: 560px) {
  .fshot.fshot--31 { display: grid; aspect-ratio: auto; padding: 16px; border-radius: 0; }
  .fshot.fshot--31 .fshot__state { position: static; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
}

/* 32 Attestation (frames 297-3034 Pull requests, 298-3130 One pull request opened): the Attestation page, then
   one click into a pull request's files. On a phone, the summary and the pull requests' names until it has its
   own phone frames */
.fshot--32 { --iw: 1270; --ih: 876; --fx: 316; --fy: 150; --fw: 452; --fh: 596; }

/* 36 Prove what agents wrote (Home, What we do tab 4), 37 Down to the file (Product: the files, then the code),
   40 Attestation across the org (Enterprise): focused cards on the lit stage (12 Nov). Until they have phone frames,
   a phone shows the whole frame rather than a crop */
/* 36 Prove what agents wrote (frames 371-4087, 371-4205, 12 Nov): the Attestation view, the flaws fixed in the turn then
   the pull requests already reviewed, drawn on the chat shots' geometry (an 867 x 678 stage, a 792 x 604 window at 37, 37)
   so it sits at their size in the tab column */
.fshot--36 { --iw: 867; --ih: 678; --fx: 0; --fy: 0; --fw: 867; --fh: 678; }
.fshot--37 { --iw: 1072; --ih: 475; --fx: 0; --fy: 0; --fw: 1072; --fh: 475; }
.fshot--40 { --iw: 1072; --ih: 528; --fx: 0; --fy: 0; --fw: 1072; --fh: 528; }

@media (max-width: 560px) {
  .fshot { aspect-ratio: var(--fw) / var(--fh); display: block; }
  .fshot__state { position: absolute; max-width: none; width: calc(100% * var(--iw) / var(--fw)); left: calc(-100% * var(--fx) / var(--fw)); top: calc(-100% * var(--fy) / var(--fh)); }
}
/* Phone frames (12 Nov): at 560px and below each of these shots serves its own phone image, a 400 wide frame with the
   card in one column, so its text reads at app size. The frame's measurements switch with it */
@media (max-width: 560px) {
  .fshot--36 { --iw: 400; --ih: 589; --fx: 0; --fy: 0; --fw: 400; --fh: 589; }
}

@media (prefers-color-scheme: dark) {
  .fshot__state { filter: invert(0.94) hue-rotate(180deg); }
  /* A shot that fills its band carries the light band (#f0f0f0) baked round its window, and the filter above turns
     that to #1d1d1d. The band takes the dark raised container (#1e1f1f, the nearest token), so the shot's stage runs
     the band's full width as it does in light, not as a lighter box on a darker band (Johnny, 12 Nov). Set as the
     token, so it outranks each page's band rule and the shot's own background follows */
  :is(.s-stage, .rpv__demo):has(> .fshot) { --bg-sunken: var(--lt-container-raised); }
}
