/* Showcase sections on video skill pages (markup: scripts/lib/skill-showcase.mjs).
   Tokens come from /css/brand.css; this file is linked only from pages that have a showcase. */

.sx { margin: 46px 0 0 }
.rz-main .sx h2 {
  font-family: var(--serif);
  font-size: clamp(25px, 2.7vw, 34px);
  font-weight: 400;
  letter-spacing: -.7px;
  line-height: 1.12;
  margin: 0 0 8px;
}
.rz-main .sx h3 { font-size: 15.5px; letter-spacing: -.1px; margin: 0 0 4px }
.sx-sub { font-size: 14px; color: #5d6457; line-height: 1.6; margin: 0 0 16px; max-width: 68ch }
.rz-main .sx-sub a { color: var(--clay); text-decoration: underline; text-underline-offset: 3px }
.sx video, .sx img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink) }
.sx button { font: inherit; color: inherit; cursor: pointer }
.sx button:focus-visible, .sx a:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px }

/* ---------- a row of live scenes under the page header ---------- */

.rz-main:has(.sx) .rz-detail-hero-video { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 40px }

.sx-lead { margin-top: 24px }
.sx-lead .sx-sub { max-width: none }
.sx-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px }
.sx-tile { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); color: var(--ink) }
.sx-tile:hover { border-color: var(--clay) }
.sx-tile span { display: block; padding: 7px 10px 8px; font-size: 12.5px; font-weight: 600 }

/* ---------- films ---------- */

.sx-films { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.sx-films figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card) }
.sx-films figcaption { display: grid; gap: 3px; padding: 10px 12px 12px; font-size: 13px; line-height: 1.5; color: #5d6457 }
.sx-films figcaption strong { font-size: 14.5px; color: var(--ink) }
.sx-facts { display: flex; gap: 6px; margin-top: 5px }
.sx-facts b, .sx-tags code, .sx-tags span, .sx-file span {
  font: 500 11.5px/1 var(--mono);
  color: var(--ink);
  background: var(--sage);
  border-radius: 5px;
  padding: 4px 6px;
}

/* ---------- look and colour ---------- */

.sx-looks { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start }
.sx-looks-frames { position: relative; padding: 0 9% 13% 0 }
.sx-looks-frames img { border-radius: 10px }
.sx-looks-frames img[data-sx-frame="ui"] {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 47%;
  border: 5px solid var(--paper);
  box-shadow: 0 14px 34px rgba(36, 59, 48, .22);
}
.rz-main .sx-looks-panel h3 { margin: 0 0 8px }
.sx-opts { display: grid; gap: 8px; margin-bottom: 20px }
.sx-opts button {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
}
.sx-opts button strong { font-size: 14px }
.sx-opts button span { font-size: 12.5px; color: var(--muted) }
.sx-opts button:hover { border-color: var(--clay) }
.sx-opts button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fbfaf3 }
.sx-opts button[aria-pressed="true"] span { color: #c9d2bd }
.sx-swatches { display: flex; gap: 10px; margin-bottom: 18px }
.sx-swatches button { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 3px solid var(--paper); background: var(--sw); box-shadow: 0 0 0 1px var(--line) }
.sx-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink) }
.sx-pre {
  margin: 0;
  padding: 13px 15px;
  border-radius: 9px;
  background: var(--ink);
  color: #eef1e2;
  font: 12.5px/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------- storyboard: five beats, in order ---------- */

.sx-beats { list-style: none; counter-reset: beat; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0 }
.sx-beats li { counter-increment: beat; border-top: 2px solid var(--ink); padding-top: 12px }
.sx-beats img { border-radius: 8px; margin-bottom: 10px }
.sx-beats h3::before { content: counter(beat) "  "; font: 500 13px/1 var(--mono); color: var(--clay); white-space: pre }
.sx-beats p { font-size: 13px; line-height: 1.5; color: #5d6457; margin: 0 0 6px }
.sx-beats .sx-count { font-size: 12px; color: var(--muted) }

/* ---------- scene library ---------- */

.sx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px }
.sx-tabs button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600 }
.sx-tabs button b { font: 500 11.5px/1 var(--mono); color: var(--muted); margin-left: 3px }
.sx-tabs button:hover { border-color: var(--clay) }
.sx-tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fbfaf3 }
.sx-tabs button[aria-pressed="true"] b { color: #c9d2bd }
.sx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px }
.sx-scene { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); scroll-margin-top: 90px }
.sx-scene[hidden], .sx-grid[data-collapsed] .sx-scene:nth-child(n+13) { display: none }
.sx-more { margin: 18px 0 0; text-align: center }
.sx-more button { padding: 10px 18px; border: 1px solid var(--ink); border-radius: 8px; background: var(--card); font-size: 13.5px; font-weight: 600 }
.sx-more button:hover { background: var(--ink); color: #fbfaf3 }
.sx-scene:target { border-color: var(--clay); box-shadow: 0 0 0 2px var(--clay) }
.rz-main .sx-scene h3 { margin: 11px 12px 3px }
.sx-scene p { font-size: 12.5px; line-height: 1.5; color: #5d6457; margin: 0 12px 9px }
.sx-tags { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 4px }
.sx-tags span { background: #eeeee2; color: var(--muted) }
.sx-tags span:empty { display: none }

/* ---------- how a film gets made ---------- */

.sx-how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 34px; align-items: start; margin-top: 16px }
.sx-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 18px }
.sx-steps li { counter-increment: step; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px }
.sx-steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sage);
  font: 500 13px/34px var(--mono);
  text-align: center;
}
.sx-steps p { font-size: 13.5px; line-height: 1.6; color: #5d6457; margin: 0 }
.sx-session { background: var(--ink); color: #eef1e2; border-radius: 12px; padding: 20px 22px 16px }
.sx-who { font-size: 12px; color: #c9d2bd; margin: 0 0 6px }
.sx-prompt { font: 13px/1.6 var(--mono); background: rgba(251, 250, 243, .08); border-radius: 8px; padding: 11px 13px; margin: 0 0 18px }
.sx-session table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 18px }
.sx-session th { text-align: left; font-size: 12px; font-weight: 500; color: #c9d2bd; padding: 0 8px 6px 0 }
.sx-session td { padding: 6px 8px 6px 0; border-top: 1px solid rgba(251, 250, 243, .14) }
.sx-session td:last-child, .sx-session th:last-child { text-align: right; padding-right: 0; font-family: var(--mono) }
.sx-file { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 12px }
.sx-file code { font: 500 14px/1 var(--mono); margin-right: 4px }
.sx-file span { background: rgba(251, 250, 243, .12); color: #eef1e2 }
.sx-session .sx-sub { color: #c9d2bd; font-size: 12.5px; margin: 0 }

@media (max-width: 1100px) {
  .sx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
}
@media (max-width: 980px) {
  .rz-main:has(.sx) .rz-detail-hero-video { grid-template-columns: 1fr }
  .rz-main:has(.sx) .rz-detail-cover { max-width: none }
  .sx-looks, .sx-how { grid-template-columns: 1fr }
  .sx-films { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sx-row, .sx-beats { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(210px, 42%); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px }
  .sx-row > *, .sx-beats > * { scroll-snap-align: start }
}
@media (max-width: 760px) {
  .sx { margin-top: 38px }
  .sx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .sx-films { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px }
  .sx-films > * { scroll-snap-align: start }
  .sx-row, .sx-beats { grid-auto-columns: minmax(200px, 66%) }
}
@media (max-width: 520px) {
  .sx-grid { grid-template-columns: 1fr }
}

/* ---------- the same clip in two shapes ---------- */

.sx-pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px }
.sx-pairs figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card) }
.sx-pair { display: grid; grid-template-columns: minmax(0, 3.16fr) minmax(0, 1fr); gap: 8px; padding: 8px; background: var(--paper); align-items: center }
.sx-pair video { border-radius: 6px }
.sx .sx-pair video.sx-tall { aspect-ratio: 9 / 16 }
.sx-pairs figcaption { display: grid; gap: 3px; padding: 10px 12px 12px; font-size: 13px; line-height: 1.5; color: #5d6457 }
.sx-pairs figcaption strong { font-size: 14.5px; color: var(--ink) }

/* ---------- two groups side by side ---------- */

.sx-rolls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px }
.sx-rolls article { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 12px 14px 14px }
.sx-roll-pics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px }
.sx-roll-pics img { border-radius: 6px }
.rz-main .sx-rolls h3 { font-size: 17px; margin: 0 0 4px }
.sx-rolls p { font-size: 14px; line-height: 1.6; color: #5d6457; margin: 0 0 8px }
.sx-rolls .sx-count { margin: 0; font-size: 12px; color: var(--muted) }

/* ---------- comparison table ---------- */

.sx-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card) }
.sx-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; min-width: 640px }
.sx-table th, .sx-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-top: 1px solid var(--line) }
.sx-table thead th { border-top: 0; font-size: 13px; color: #5d6457; font-weight: 600 }
.sx-table tbody th { font-weight: 600; color: var(--ink); width: 24% }
.sx-table td { color: #5d6457 }
.sx-table .sx-us { background: var(--sage); color: var(--ink) }
.sx-table thead .sx-us { font-weight: 700 }

@media (max-width: 860px) {
  .sx-pairs, .sx-rolls { grid-template-columns: 1fr }
}
