/* ==========================================================================
   案例页 —— 一屏一帧
   设计变量、字体、颜色沿用 styles.css 的 :root，这里只补案例页专用的
   ========================================================================== */

:root {
  --case-header-h: 76px;
  --z-viewer: 60;
}

/* 案例页关掉平滑滚动：这里一个分类跳转动辄跨十几帧，
   平滑滚动会一屏一屏滑过去，要好几秒才到。锚点跳转应该是瞬时定位。
   只影响程序化滚动（锚点 / scrollTo），滚轮翻页的吸附动画不受影响 */
html {
  scroll-behavior: auto;
}

/* 整屏吸附的开关跟主站同一套判断（styles.css 里的 981×700 门槛），
   这里只补上「一次滚动只走一帧」 */
@media (min-width: 981px) and (min-height: 700px) {
  .frame,
  .case-end {
    scroll-snap-stop: always;
  }
}

/* --- 顶栏 ---------------------------------------------------------------- */
.case-header {
  position: fixed;
  z-index: var(--z-header);
  top: 0;
  left: var(--rail);
  right: 0;
  height: var(--case-header-h);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 var(--gutter);
  background: linear-gradient(
    180deg,
    rgba(7, 10, 9, 0.95) 0%,
    rgba(7, 10, 9, 0.82) 68%,
    rgba(7, 10, 9, 0) 100%
  );
}

/* 返回作品屏（不是回首页第一屏），否则每看完一个案例都要重滚一遍 */
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  min-height: 38px;
  padding: 0 15px 0 12px;
  border: 1px solid rgba(232, 223, 207, 0.2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--paper-dim);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.case-back .icon {
  font-size: 15px;
  color: var(--orange-soft);
}

.case-back:hover {
  border-color: rgba(215, 101, 42, 0.7);
  background: rgba(215, 101, 42, 0.1);
  color: #fff;
}

.case-title {
  flex: none;
  font: 400 15px var(--serif);
  color: var(--paper);
  white-space: nowrap;
}

.case-title span {
  margin-left: 10px;
  font: 10px var(--mono);
  letter-spacing: 0.16em;
  color: var(--muted-soft);
}

/* 每个分类是独立一页，顶栏不挂分类导航，只留一个常驻的联系入口 */
.case-contact {
  flex: none;
  margin-left: auto;
  padding: 9px 4px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.case-contact:hover {
  color: var(--paper);
  border-bottom-color: var(--orange);
}

/* --- 左侧进度 ------------------------------------------------------------ */
.case-rail {
  position: fixed;
  z-index: var(--z-rail);
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 22px;
  background: rgba(7, 10, 9, 0.86);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.case-rail .rail-mark {
  color: var(--orange);
  font-size: 13px;
  line-height: 0;
}

.case-count {
  display: grid;
  justify-items: center;
  gap: 9px;
  font: 500 12px var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted-soft);
}

.case-count b {
  font-weight: 500;
  color: var(--orange-soft);
}

/* 进度条：高度由 JS 写入 --progress */
.case-count i {
  width: 1px;
  height: 78px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
}

.case-count i::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--progress, 0%);
  background: var(--orange);
  transition: height 0.3s;
}

.case-rail .rail-type {
  writing-mode: vertical-rl;
  font: 500 11px var(--mono);
  letter-spacing: 0.22em;
  color: var(--muted-soft);
}

/* --- 帧 ------------------------------------------------------------------
   作品集原始尺寸是 1280×720（16:9），这里不裁切、不拉伸，
   用 contain 完整陈列，四周留呼吸 —— 暗底衬浅色界面稿反而更立得住
   -------------------------------------------------------------------------- */
.frames {
  margin-left: var(--rail);
}

.frame {
  scroll-snap-align: start;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  padding: calc(var(--case-header-h) + 26px) var(--gutter) 34px;
}

.frame-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font: 11px var(--mono);
  letter-spacing: 0.14em;
  color: var(--muted-soft);
}

.frame-label b {
  font-weight: 500;
  color: var(--orange-soft);
}

.frame-label span {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
}

/* 图片用绝对定位铺满 .frame-shot 再 object-fit:contain。
   不能用 max-height:100% —— .frame-shot 的高度来自 flex:1，
   百分比在这种非确定高度上解析不可靠，图片会按宽度撑满、把底部顶出屏幕 */
.frame-shot {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
}

.frame-shot img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  border-radius: 4px;
}

/* 放大提示：hover 才出现，不干扰画面 */
.shot-zoom {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 223, 207, 0.26);
  border-radius: 8px;
  background: rgba(10, 13, 12, 0.62);
  color: var(--paper-dim);
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.25s, border-color 0.25s, color 0.25s;
}

.frame-shot:hover .shot-zoom,
.frame-shot:focus-visible .shot-zoom {
  opacity: 1;
}

.frame-shot:hover .shot-zoom {
  border-color: rgba(215, 101, 42, 0.75);
  color: #fff;
}

/* --- AI 生图：输入素材 = 生成结果 ----------------------------------------
   一屏一组。左边是喂进去的素材（服装 + 模特），右边是产出。
   这个结构本身就是论点：证明的是可控性，不是「我生成了好看的图」。
   所有图 3:4，高度由可用空间决定、宽度按比例推出来，
   所以每组图片数量可以不一样，布局不用改。
   -------------------------------------------------------------------------- */
/* 高度写死成 svh 的函数而不是 flex:1 —— 里面每一层都要用百分比和 aspect-ratio
   反推尺寸，父级高度必须是确定值，否则图片会退回原始宽度把容器撑爆 */
.combo {
  --combo-h: min(calc(100svh - 210px), 760px);
  flex: none;
  height: var(--combo-h);
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.6vw, 26px);
}

.combo-set {
  position: relative;
  height: 100%;
  display: grid;
  gap: 10px;
}

/* 各组的宽度由「高度 × 比例」推出来，所以每组放几张都不用改布局 */
.combo-set--wear {
  aspect-ratio: 3 / 12.4;
  grid-template-rows: repeat(3, 1fr);
}

/* 模特单张。容器保持满高，让「模特」这个小标题和左右两栏对齐，
   图片自己压到 66% —— 它是输入素材，不该比生成结果更抢眼 */
.combo-set--model {
  width: calc(var(--combo-h) * 0.66 * 0.75);
  align-content: center;
}

.combo-set--model img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
}

.combo-set--out {
  aspect-ratio: 3.1 / 4;
  grid-template-rows: repeat(2, 1fr);
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.combo-set img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  background: #12150f;
}

.combo-set--out img {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.is-zoomable {
  cursor: zoom-in;
  transition: transform 0.3s, box-shadow 0.3s;
}

.is-zoomable:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}

.combo-cap {
  position: absolute;
  top: -22px;
  left: 0;
  margin: 0;
  font: 10px var(--mono);
  letter-spacing: 0.2em;
  color: var(--muted-soft);
  white-space: nowrap;
}

.combo-set--out .combo-cap {
  color: var(--orange-soft);
}

.combo-op {
  flex: none;
  font: 300 26px var(--serif);
  color: var(--orange);
  line-height: 1;
}

/* --- 全部成果平铺 ---------------------------------------------------------
   和其他屏一样正常吸附停留，只是内容顶部对齐、允许比一屏更高——
   之前设成 scroll-snap-align:none 想让人「刷过去」，
   结果是这一屏在 mandatory 吸附下直接被跳过，滚一下就飞到下一屏，
   反而看不到内容，所以改回普通吸附
   -------------------------------------------------------------------------- */
.frame--flow {
  justify-content: flex-start;
  padding-bottom: 70px;
}

.tile-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
  gap: 12px;
}

.tile-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 4px;
  background: #12150f;
}

/* --- AI 视频：平视陈列式轮播 -------------------------------------------------
   每张仍严格按原始 9:16 视频比例展示；中间是主画面，两侧露出同尺寸的预览画面。
   用层叠、暗化和环境光制造陈列感，不用 rotateY 透视——画面始终是平视的。
   横向排布交给原生 scroll-snap，拖拽、滚轮和箭头会落在同一张正中的视频上。
   -------------------------------------------------------------------------- */
.clip-carousel {
  --slide-h: min(calc(100svh - 218px), 720px);
  --slide-w: calc(var(--slide-h) * 9 / 16);
  flex: none;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.carousel-arrow {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 223, 207, 0.28);
  border-radius: 50%;
  background: rgba(10, 13, 12, 0.55);
  color: var(--paper-dim);
  font-size: 19px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.2s;
}

.carousel-arrow:hover {
  border-color: var(--orange);
  color: #fff;
  background: rgba(215, 101, 42, 0.16);
  transform: translateY(-1px);
}

.carousel-viewport {
  flex: none;
  width: min(calc(var(--slide-w) + 260px), 92vw);
  height: var(--slide-h);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* 主画面四周轻微发光，给平面卡片补上参考图那种悬浮层次 */
  background:
    radial-gradient(ellipse at center, rgba(215, 101, 42, 0.13), transparent 58%),
    linear-gradient(90deg, rgba(10, 13, 12, 0.96), transparent 25%, transparent 75%, rgba(10, 13, 12, 0.96));
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  height: 100%;
  gap: 16px;
  /* 首尾留白，保证第一条、最后一条也能滚到视口正中，不会贴死在边上 */
  padding-inline: clamp(20px, calc((100vw - var(--slide-w)) / 2), 280px);
}

.clip {
  position: relative;
  flex: none;
  width: var(--slide-w);
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(232, 223, 207, 0.1);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
  opacity: 0.28;
  filter: saturate(0.52) brightness(0.58);
  transform: scale(0.92);
  transition: opacity 0.35s, filter 0.35s, transform 0.45s, border-color 0.35s, box-shadow 0.45s;
}

/* 相邻卡片与主画面保持同一平面，只通过尺寸、明暗和层级拉开主次。 */
.clip.is-prev {
  transform: scale(0.92) translateX(8px);
}

.clip.is-next {
  transform: scale(0.92) translateX(-8px);
}

/* 由 work.js 的 IntersectionObserver 判定「谁在视口正中」后打上这个类 */
.clip.is-active {
  transform: scale(1);
  opacity: 1;
  filter: none;
  border-color: rgba(232, 223, 207, 0.26);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.56), 0 0 48px rgba(215, 101, 42, 0.12);
}

.clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0d100e;
  cursor: pointer;
}

/* 每条视频右上角的声音开关。默认静音 —— 自动播放的硬性条件，
   切走或切到别条时会连同声音一起重置 */
.clip-sound {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 223, 207, 0.28);
  border-radius: 50%;
  background: rgba(10, 13, 12, 0.62);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.clip-sound:hover {
  border-color: rgba(215, 101, 42, 0.8);
  color: var(--paper);
}

.clip-sound .icon-on {
  display: none;
}

.clip-sound.is-on {
  border-color: var(--orange);
  background: rgba(105, 47, 23, 0.4);
  color: var(--orange-soft);
}

.clip-sound.is-on .icon-on {
  display: block;
}

.clip-sound.is-on .icon-off {
  display: none;
}

/* --- AI 页在窄屏改成纵向堆叠 ---------------------------------------------
   横向「服装 + 模特 = 结果」在手机上每格只有几十像素宽，没法看
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .combo {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 30px;
  }

  .combo-set {
    height: auto;
    aspect-ratio: auto;
    grid-template-rows: none;
  }

  .combo-set--wear {
    grid-template-columns: repeat(3, 1fr);
  }

  .combo-set--model {
    grid-template-columns: repeat(3, 1fr);
  }

  .combo-set--model img {
    grid-column: 2;
  }

  .combo-set--out {
    grid-template-columns: repeat(2, 1fr);
  }

  .combo-set img {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .combo-op {
    align-self: center;
  }

  /* 窄屏下 peek 边距不用留那么大，箭头也缩小一圈，给视频本体多留点空间 */
  .clip-carousel {
    gap: 6px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .carousel-viewport {
    width: min(calc(var(--slide-w) + 72px), 90vw);
  }

  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

/* --- 分类之间的分隔提示 -------------------------------------------------- */
.frame[data-first] .frame-label b {
  padding: 3px 9px;
  border-radius: 5px;
  background: rgba(215, 101, 42, 0.16);
  color: var(--orange-soft);
}

/* --- 结尾屏 -------------------------------------------------------------- */
.case-end {
  scroll-snap-align: start;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: calc(var(--case-header-h) + 26px) var(--gutter) 44px;
  background: radial-gradient(circle at 30% 20%, #1b1f1c 0, var(--ink) 58%);
}

.case-end h2 {
  margin: 0;
  font: 400 clamp(28px, 3.2vw, 44px) var(--serif);
}

.case-end p {
  margin: 0;
  max-width: 46ch;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.case-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(218, 142, 80, 0.62);
  border-radius: 12px;
  font-size: 14px;
  color: var(--paper);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.case-button .icon {
  font-size: 17px;
  color: var(--orange-soft);
}

.case-button:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  transform: translateY(-2px);
}

.case-button:hover .icon {
  color: #fff;
}

.case-button--ghost {
  border-color: rgba(232, 223, 207, 0.22);
  color: var(--paper-dim);
}

.case-button--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(232, 223, 207, 0.4);
  color: #fff;
  transform: translateY(-2px);
}

.case-button--ghost:hover .icon {
  color: var(--orange-soft);
}

/* --- 放大查看器 ----------------------------------------------------------
   1280×720 的稿子缩进一屏后字很小，桌面端点开看细节，
   手机端更是必需 —— 335px 宽的屏上一帧只有 188px 高，不放大根本读不了
   -------------------------------------------------------------------------- */
.viewer {
  position: fixed;
  z-index: var(--z-viewer);
  inset: 0;
  display: none;
  background: rgba(5, 7, 6, 0.96);
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pinch-zoom;
}

.viewer.is-open {
  display: block;
}

.viewer img {
  display: block;
  width: 1280px;
  max-width: none;
  margin: auto;
  padding: 60px 20px;
}

/* 竖图（AI 生图 3:4）按高度适配，否则 1280 宽会变成 1700 高，得来回滚 */
.viewer.is-portrait {
  display: none;
  place-items: center;
  overflow: hidden;
}

.viewer.is-portrait.is-open {
  display: grid;
}

.viewer.is-portrait img {
  width: auto;
  height: auto;
  max-width: min(92vw, 900px);
  max-height: calc(100svh - 80px);
  padding: 0;
  border-radius: 4px;
}

.viewer-close {
  position: fixed;
  z-index: 1;
  top: 18px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 223, 207, 0.24);
  border-radius: 50%;
  background: rgba(10, 13, 12, 0.75);
  color: var(--paper-dim);
  font-size: 20px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}

.viewer-close:hover {
  border-color: var(--orange);
  color: #fff;
}

.viewer-hint {
  position: fixed;
  left: 50%;
  bottom: 20px;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(233, 223, 207, 0.9);
  color: #2f2a24;
  font-size: 11.5px;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

body.viewer-open {
  overflow: hidden;
}

/* --- 响应式 -------------------------------------------------------------- */
@media (max-width: 980px) {
  .case-title {
    display: none;
  }
}

@media (max-width: 640px) {
  .case-rail {
    display: none;
  }

  .case-header {
    left: 0;
    gap: 14px;
    padding: 0 16px;
  }

  .case-back {
    padding: 0 11px;
    font-size: 12px;
  }

  .case-contact {
    padding: 9px 2px;
    font-size: 12px;
  }

  .frames {
    margin-left: 0;
  }

  /* 手机上一帧只有 ~190px 高，强制整屏毫无意义，改成自然排布 */
  .frame {
    min-height: 0;
    padding: 20px 16px;
  }

  .frame:first-child {
    padding-top: calc(var(--case-header-h) + 18px);
  }

  .frame-shot {
    flex: none;
    aspect-ratio: 16 / 9;
    cursor: default;
  }

  .frame-shot img {
    object-position: center;
  }

  .case-end {
    min-height: 0;
    padding: 40px 16px 56px;
  }

  .viewer img {
    padding: 56px 0;
  }
}

/* 手机上一帧只有 ~190px 高，再吸附整屏就全是空白，直接关掉 */
@media (max-width: 640px), (max-height: 560px) {
  .frame,
  .case-end {
    scroll-snap-align: none;
  }
}

/* --- AI 视频作品墙 ---------------------------------------------------------
   覆盖旧轮播布局：六条视频都在同一画面中，按原始 9:16 比例循环播放。
   不存在“当前项”，因此也没有切换、滑动或被裁掉的侧边预览。 */
.clip-grid {
  display: block;
  width: min(100%, 1560px);
  margin: 22px auto 0;
}

.clip-grid .carousel-viewport {
  width: 100%;
  height: auto;
  overflow: visible;
  background: none;
}

.clip-grid .carousel-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  height: auto;
  gap: clamp(8px, 1vw, 18px);
  padding: 0;
}

.clip-grid .clip,
.clip-grid .clip.is-prev,
.clip-grid .clip.is-next,
.clip-grid .clip.is-active {
  width: auto;
  height: auto;
  aspect-ratio: 9 / 16;
  opacity: 1;
  filter: none;
  transform: none;
  border-color: rgba(232, 223, 207, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.clip-grid .clip:hover {
  border-color: rgba(215, 101, 42, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(215, 101, 42, 0.1);
}

/* --- 影刀 RPA 自动化 ----------------------------------------------------- */
.rpa-frame {
  position: relative;
}

.rpa-showcase {
  position: relative;
  flex: none;
  width: min(78%, 1040px);
  height: min(54svh, 520px);
  margin: 22px auto 0;
  display: grid;
  place-items: center;
  overflow: visible;
  background: none;
}

.rpa-certificate {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  display: grid;
  place-items: center;
}

.rpa-certificate img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  transition: opacity 0.12s ease;
}

.rpa-certificate img.is-changing {
  opacity: 0;
}

.rpa-certificate p {
  position: absolute;
  left: 50%;
  bottom: 14px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(232, 223, 207, 0.15);
  border-radius: 999px;
  background: rgba(10, 13, 12, 0.72);
  color: var(--paper-dim);
  font-size: 12px;
  transform: translateX(-50%);
}

.rpa-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 223, 207, 0.3);
  border-radius: 50%;
  background: rgba(10, 13, 12, 0.72);
  color: var(--paper-dim);
  font-size: 24px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s;
}

.rpa-nav--prev { left: -76px; }
.rpa-nav--next { right: -76px; }

.rpa-nav:hover,
.rpa-nav:focus-visible {
  border-color: var(--orange);
  background: rgba(215, 101, 42, 0.15);
  color: #fff;
  outline: none;
  transform: translateY(-50%) scale(1.06);
}

@media (max-width: 980px) {
  .clip-grid .carousel-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .clip-grid {
    margin-top: 16px;
  }

  .clip-grid .carousel-track {
    gap: 8px;
  }

  .rpa-showcase {
    width: calc(100% - 96px);
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 16px;
  }

  .rpa-certificate {
    padding: 8px;
  }

  .rpa-certificate p {
    bottom: 10px;
    font-size: 11px;
  }

  .rpa-nav--prev { left: -52px; }
  .rpa-nav--next { right: -52px; }
}
