/* Screen gallery for product case studies. Added for the Quiet Pace restyle so
   the existing six captures keep the two-up reading order they were shot for.
   Every value is a brand token; nothing here overrides a reviewed rule. */

.screen-gallery {
  list-style: none;
  margin: var(--cc-space-8) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--cc-space-12);
}

.screen-gallery li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cc-space-4);
  margin: 0;
}

.screen-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--cc-space-4);
}

/* A restrained bezel: the screenshot reads as a device screen without the
   gradient-and-shadow treatment the dark pages deliberately dropped. */
/* A definite width, not fit-content: the frame must occupy its space before
   the screenshot decodes, or every gallery jumps on load. The image's own
   width/height attributes then reserve the height. */
.screen-frame {
  background: var(--cc-surface);
  border: 1px solid var(--cc-separator);
  padding: var(--cc-space-2);
  border-radius: var(--cc-radius-panel);
  display: block;
  width: 100%;
  margin-inline: auto;
}

.screen-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--cc-radius-card);
}

.screen-gallery--phone .screen-frame {
  max-width: 320px;
}

.screen-gallery figcaption {
  color: var(--cc-text-muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  max-width: 34ch;
}

/* Role / platforms / stack / status, carried over from the original case study. */
.case-facts {
  list-style: none;
  margin: var(--cc-space-8) 0 0;
  padding: var(--cc-space-6) 0 0;
  border-top: 1px solid var(--cc-separator);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--cc-space-6);
}

.case-facts dt,
.case-facts .fact-key {
  font-family: var(--cc-font-meta);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cc-text-muted);
}

.case-facts .fact-value {
  display: block;
  margin-top: var(--cc-space-2);
  color: var(--cc-text);
  font-size: 15px;
}

/* The studio-work index: one card per product, screenshot first. */
.work-cards {
  list-style: none;
  margin: var(--cc-space-8) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--cc-space-8);
}

.work-cards li {
  display: flex;
  flex-direction: column;
  gap: var(--cc-space-3);
  padding: var(--cc-space-6);
  background: var(--cc-surface);
  border: 1px solid var(--cc-separator);
  border-radius: var(--cc-radius-card);
}

.work-cards .screen-frame {
  align-self: center;
  max-width: 200px;
  border-radius: var(--cc-radius-card);
}

.work-cards .card-head {
  display: flex;
  align-items: center;
  gap: var(--cc-space-3);
  margin-top: var(--cc-space-2);
}

.work-cards .card-head img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.work-cards h3 {
  margin: 0;
  font-size: 19px;
}

.work-cards .card-meta {
  font-family: var(--cc-font-meta);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cc-text-muted);
  margin: 0;
}

.work-cards p {
  color: var(--cc-text-secondary);
  font-size: 15px;
  margin: 0;
}

.work-cards a {
  margin-top: auto;
  align-self: flex-start;
}

/* An outcome the client reported, kept visibly attributed to them rather than
   presented as a measurement of ours. */
.case-result {
  margin-top: var(--cc-space-6);
  padding-left: var(--cc-space-4);
  border-left: 1px solid var(--cc-separator);
}

/* Uppercased by the stylesheet, not by the markup, so the source keeps the
   sentence a person wrote and a reader can search for. */
.case-result .result-label {
  font: 400 12px/1.5 var(--cc-font-meta);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cc-text-secondary);
}

.case-result p {
  margin: var(--cc-space-2) 0 0;
  color: var(--cc-text);
  font-size: 16px;
}

/* Long-form policy and standards copy. */
.prose p {
  margin-top: var(--cc-space-4);
  color: var(--cc-text-secondary);
  max-width: 68ch;
}

.prose strong {
  color: var(--cc-text);
}

.prose ul {
  margin-top: var(--cc-space-4);
  padding-left: 20px;
  line-height: 1.9;
  color: var(--cc-text-secondary);
  max-width: 68ch;
}

.gallery-head {
  margin-top: var(--cc-space-16);
}

.gallery-head h2 {
  margin-top: var(--cc-space-3);
}

@media (max-width: 760px) {
  .screen-gallery {
    grid-template-columns: 1fr;
    gap: var(--cc-space-8);
  }

  .case-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* CLS reserve — phone screenshots are 640×1390/1391; hold the box before decode */
.screen-gallery--phone .screen-frame {
  aspect-ratio: 640 / 1391;
}
.screen-gallery--phone .screen-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.work-cards .screen-frame {
  aspect-ratio: 640 / 1391;
  overflow: hidden;
}
.work-cards .card__peek {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
