/* ============================================================
   五量度 · 成功案例页（cases.html）Apple 流体视觉层
   作用域：body.ah.casespage —— 不改动全站其它页面
   依赖：home-apple.css（tokens / 首屏 / 按钮 / 玻璃卡 / 走马灯 / 深色带）
   设计原则：一单一图、图多字少、动效可中断、尊重减弱动效
   ============================================================ */

/* ---------- 通用补件：ghost 按钮基准（home-apple 只在深色带上定义过） ---------- */
.casespage .ah-btn--ghost {
  background: transparent; color: var(--ah-ink-2);
  border: 1px solid var(--ah-line); box-shadow: none;
}
.casespage .ah-btn--ghost:hover { color: var(--ah-brand-deep); border-color: rgba(22, 166, 199, .45); background: rgba(22, 166, 199, .06); }
.casespage .ah-btn--ghost span { font-weight: 700; transition: transform .45s var(--ah-spring); }
.casespage .ah-btn--ghost:hover span { transform: rotate(90deg); }
.casespage .ah-btn--ghost[disabled] { opacity: .45; pointer-events: none; }

/* ============ 首屏 ============ */
.casespage .ah-hero { padding-bottom: clamp(46px, 5.4vw, 74px); }
.casespage .ah-stage-photo { aspect-ratio: 16 / 10; }
.casespage .ah-stage-photo::after {
  background: linear-gradient(180deg, rgba(6, 26, 42, .10) 0%, rgba(6, 26, 42, 0) 38%, rgba(6, 26, 42, .58) 100%);
}

.cs-onair {
  position: absolute; z-index: 2; left: 14px; top: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(8, 26, 42, .52); color: #fff; font-size: 11.5px; font-weight: 600;
  letter-spacing: .04em;
  border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.cs-onair i {
  width: 6px; height: 6px; border-radius: 50%; background: #45e0c2;
  animation: csBlink 1.9s ease-in-out infinite;
}
@keyframes csBlink { 50% { opacity: .3; } }

.cs-stage-cap {
  position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 16px;
  display: flex; flex-direction: column; gap: 3px; color: #fff;
}
.cs-stage-cap b { font-size: 15px; letter-spacing: .01em; }
.cs-stage-cap span { font-size: 12px; color: rgba(255, 255, 255, .78); }

/* 浮动小图：右下角压边，制造层次 */
.cs-hero-mini {
  position: absolute; z-index: 4; right: -12px; top: -16px;
  width: 124px; margin: 0;
  border-radius: 18px; overflow: hidden;
  border: 4px solid #fff; background: #fff;
  box-shadow: 0 18px 40px rgba(9, 30, 50, .2);
  transform: rotate(3deg);
  transition: transform .6s var(--ah-spring);
}
.cs-hero-mini:hover { transform: rotate(0deg) scale(1.04); }
.cs-hero-mini img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.cs-hero-mini figcaption {
  padding: 5px 0 6px; text-align: center;
  font-size: 11px; font-weight: 600; color: var(--ah-ink-2); background: #fff;
}

/* 首屏「案例构成」：不压照片，落在照片下方（避免遮挡主体） */
.cs-cats-card {
  position: relative; margin: 14px 0 0; padding: 14px 16px 10px;
  border-radius: 18px; background: rgba(255, 255, 255, .92);
  border: 1px solid var(--ah-line-soft);
  box-shadow: 0 10px 30px rgba(9, 30, 50, .08);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.cs-cats-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cs-cats-head b { font-size: 13.5px; color: var(--ah-ink); }
.cs-cats-head span { font-size: 11.5px; color: var(--ah-ink-3); }
.cs-cats {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px;
}
.cs-cats li {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 6px 0 8px;
}
.cs-cats li b {
  flex: 0 0 22px; font-size: 13px; font-weight: 800; color: var(--ah-brand-deep);
  font-variant-numeric: tabular-nums;
}
.cs-cats li span { font-size: 12.5px; color: var(--ah-ink-2); }
.cs-cats li i {
  position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; width: 0;
  border-radius: 2px; background: linear-gradient(90deg, var(--ah-brand), #4ecdc4);
  transition: width .9s var(--ah-ease);
}
.cs-cats li i.play { width: var(--w); }

.cs-hero-note {
  display: flex; align-items: center; gap: 8px;
  margin-top: 18px; font-size: 12.5px; color: var(--ah-ink-3);
}
.cs-hero-note svg { flex: 0 0 16px; color: var(--ah-brand); }
.cs-hero-note b { color: var(--ah-ink-2); }

/* ============ 区段头（左对齐 + 右侧小注） ============ */
.cs-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.cs-sort-note {
  display: inline-flex; align-items: center; gap: 7px; margin: 0 0 6px;
  font-size: 12.5px; color: var(--ah-ink-3);
}
.cs-sort-note i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ah-brand);
  box-shadow: 0 0 0 4px rgba(22, 166, 199, .14);
}

/* ============ 精选三案 ============ */
.cs-pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cs-pick {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; background: #fff;
  border: 1px solid var(--ah-line); box-shadow: var(--ah-shadow-1);
  transition: transform .6s var(--ah-spring), box-shadow .5s;
}
.cs-pick:hover { transform: translateY(-8px); box-shadow: var(--ah-shadow-2); }
.cs-pick-pic { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #eef3f7; }
.cs-pick-pic img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 1.1s var(--ah-ease); }
.cs-pick:hover .cs-pick-pic img { transform: scale(1.05); }
.cs-pick-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 18px 20px 20px; }
.cs-pick-meta { font-size: 12px; font-weight: 600; color: var(--ah-brand-deep); letter-spacing: .02em; }
.cs-pick-body h3 {
  margin: 9px 0 0; font-size: 16.5px; line-height: 1.45; color: var(--ah-ink);
}
.cs-pick-body p {
  margin: 9px 0 0; flex: 1 1 auto;
  font-size: 13.5px; line-height: 1.75; color: var(--ah-ink-2);
}
.cs-go {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ah-brand-deep);
}
.cs-go i { font-style: normal; transition: transform .45s var(--ah-spring); }
.cs-pick:hover .cs-go i { transform: translateX(5px); }

.cs-all-link { margin: clamp(30px, 3.4vw, 44px) 0 0; text-align: center; }
.cs-all-link .ah-btn i { font-style: normal; transition: transform .45s var(--ah-spring); }
.cs-all-link .ah-btn:hover i { transform: translateX(4px); }

/* ============ 筛选标签 ============ */
.cs-filter {
  display: flex; flex-wrap: wrap; gap: 9px;
  margin: 0 0 clamp(22px, 2.6vw, 32px);
}
.cs-fchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ah-ink-2);
  background: #fff; border: 1px solid var(--ah-line);
  transition: transform .45s var(--ah-spring), background .3s, color .25s, border-color .3s, box-shadow .35s;
}
.cs-fchip b {
  font-size: 11.5px; font-weight: 700; color: var(--ah-ink-3);
  font-variant-numeric: tabular-nums;
}
.cs-fchip:hover { transform: translateY(-2px); border-color: rgba(22, 166, 199, .4); color: var(--ah-brand-deep); }
.cs-fchip:focus-visible { outline: 2px solid var(--ah-brand); outline-offset: 2px; }
.cs-fchip.is-on {
  background: linear-gradient(135deg, #1799b8, #0e7a96); color: #fff;
  border-color: transparent; box-shadow: 0 10px 24px rgba(14, 122, 150, .26);
}
.cs-fchip.is-on b { color: rgba(255, 255, 255, .82); }

/* ============ 案例网格 ============ */
.cs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 16px;
}
.cs-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 18px; background: #fff;
  border: 1px solid var(--ah-line); box-shadow: 0 1px 2px rgba(10, 30, 55, .035);
  transition: transform .55s var(--ah-spring), box-shadow .45s, opacity .3s;
  will-change: transform;
}
.cs-card:hover { transform: translateY(-5px); box-shadow: var(--ah-shadow-2); }
.cs-card:focus-visible { outline: 2px solid var(--ah-brand); outline-offset: 3px; }
.cs-card.is-hide { display: none; }
.cs-card-pic { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: #eef3f7; }
.cs-card-pic img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform 1s var(--ah-ease);
}
.cs-card:hover .cs-card-pic img { transform: scale(1.045); }

.cs-chip {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: #0a3f52; background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(9, 30, 50, .1);
}

.cs-card-body {
  position: relative; display: flex; flex-direction: column; flex: 1 1 auto;
  padding: 13px 15px 15px;
}
.cs-card-body h3 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin: 0; font-size: 14px; line-height: 1.55; font-weight: 600; color: var(--ah-ink);
  transition: color .25s;
}
.cs-card:hover .cs-card-body h3 { color: var(--ah-brand-deep); }
.cs-card-body > span { display: block; margin-top: 7px; font-size: 11.5px; color: var(--ah-ink-3); }
.cs-card-go {
  position: absolute; right: 15px; bottom: 14px;
  font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ah-brand-deep);
  opacity: 0; transform: translateX(-6px);
  transition: opacity .35s, transform .45s var(--ah-spring);
}
.cs-card:hover .cs-card-go { opacity: 1; transform: none; }

.cs-more-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: clamp(26px, 3vw, 38px) 0 0;
}
.cs-count { font-size: 12.5px; color: var(--ah-ink-3); font-variant-numeric: tabular-nums; }

.cs-archive-note {
  margin: clamp(26px, 3vw, 38px) 0 0; padding: 16px 18px;
  border-radius: 16px; background: var(--ah-paper-2);
  border: 1px dashed var(--ah-line);
  font-size: 13px; line-height: 1.8; color: var(--ah-ink-2);
}
.cs-archive-note a { font-weight: 700; color: var(--ah-brand-deep); border-bottom: 1px solid rgba(13, 111, 138, .3); }

/* ============ 客户分布 ============ */
.cs-regions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cs-region {
  position: relative; display: flex; flex-direction: column;
  padding: 20px 20px 18px; border-radius: 20px;
  background: #fff; border: 1px solid var(--ah-line-soft);
  box-shadow: 0 1px 2px rgba(10, 30, 55, .03);
  transition: transform .55s var(--ah-spring), box-shadow .45s, border-color .3s;
}
.cs-region:hover { transform: translateY(-4px); box-shadow: var(--ah-shadow-1); border-color: rgba(22, 166, 199, .3); }
.cs-region b { font-size: 17px; color: var(--ah-ink); letter-spacing: -.01em; }
.cs-region p { margin: 7px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ah-ink-3); }
.cs-region em { margin-top: 10px; font-size: 11.5px; font-style: normal; color: var(--ah-brand-deep); font-weight: 600; }
.cs-region-tag {
  position: absolute; right: 14px; top: 14px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: #0a3f52; background: rgba(22, 166, 199, .12);
  border: 1px solid rgba(22, 166, 199, .22);
}
.cs-region--main {
  background: linear-gradient(150deg, #0f4c66 0%, #0b3247 100%);
  border-color: transparent; box-shadow: 0 18px 44px rgba(11, 50, 71, .26);
}
.cs-region--main b { color: #fff; }
.cs-region--main p { color: rgba(220, 238, 246, .78); }
.cs-region--main em { color: #6ee0d4; }
.cs-region--main .cs-region-tag { color: #d8f5fb; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }

.cs-region-meter {
  display: block; margin-top: 12px; height: 3px; border-radius: 3px;
  background: var(--ah-line-soft); overflow: hidden;
}
.cs-region--main .cs-region-meter { background: rgba(255, 255, 255, .16); }
.cs-region-meter i {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--ah-brand), #4ecdc4);
  transition: width 1.1s var(--ah-ease) .12s;
}
.cs-region-meter i.play { width: var(--w); }

.cs-region-line {
  margin: clamp(20px, 2.4vw, 28px) 0 0; font-size: 12.5px; line-height: 1.85;
  color: var(--ah-ink-3); text-align: center;
}

/* ============ 现场掠影 ============ */
.cs-scene-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cs-scene {
  position: relative; margin: 0; overflow: hidden; border-radius: 20px;
  background: #dfe8ef; box-shadow: var(--ah-shadow-1);
}
.cs-scene img {
  display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2.15; object-fit: cover;
  transition: transform 1.2s var(--ah-ease), filter .5s;
}
.cs-scene:hover img { transform: scale(1.06); }
.cs-scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 26, 42, 0) 42%, rgba(6, 26, 42, .74) 100%);
}
.cs-scene figcaption {
  position: absolute; z-index: 2; left: 15px; right: 15px; bottom: 14px; color: #fff;
}
.cs-scene figcaption b { display: block; font-size: 14px; letter-spacing: .01em; }
.cs-scene figcaption span {
  display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.6;
  color: rgba(255, 255, 255, .8);
}

/* ============ 品牌带 ============ */
.cs-brands .ah-wall { margin-top: clamp(22px, 2.6vw, 34px); }
.cs-brands .ah-wall-note { margin-top: 22px; }
.cs-brands .ah-wall-note span { color: var(--ah-ink-3); }

/* ============ 型号案例库 ============ */
.cs-models {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(24px, 3vw, 48px); align-items: center;
  padding: clamp(28px, 3.4vw, 48px); border-radius: 28px;
  background:
    radial-gradient(680px 320px at 88% 8%, rgba(22, 166, 199, .13), transparent 62%),
    linear-gradient(150deg, #f7fbfd 0%, #eef5f9 100%);
  border: 1px solid var(--ah-line-soft);
  box-shadow: var(--ah-shadow-1);
}
.cs-models-body h2 { margin: 12px 0 0; font-size: clamp(22px, 2.5vw, 31px); line-height: 1.3; color: var(--ah-ink); }
.cs-models-body p { margin: 14px 0 0; font-size: 14px; line-height: 1.85; color: var(--ah-ink-2); }
.cs-models-body .ah-btn { margin-top: 22px; }
.cs-models-body .ah-btn i { font-style: normal; transition: transform .45s var(--ah-spring); }
.cs-models-body .ah-btn:hover i { transform: translateX(4px); }
.cs-models-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cs-models-nums > div {
  padding: 18px 8px; border-radius: 16px; text-align: center;
  background: #fff; border: 1px solid var(--ah-line-soft);
  transition: transform .5s var(--ah-spring), box-shadow .4s;
}
.cs-models-nums > div:hover { transform: translateY(-4px); box-shadow: var(--ah-shadow-1); }
.cs-models-nums b {
  display: block; font-size: clamp(19px, 2vw, 25px); font-weight: 800;
  color: var(--ah-brand-deep); font-variant-numeric: tabular-nums;
}
.cs-models-nums span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--ah-ink-3); }

/* ============ FAQ + 速览 ============ */
.cs-faq-wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 3vw, 44px); align-items: start;
}
.cs-faq summary i {
  margin-left: auto; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--ah-line); position: relative; background: #fff;
  transition: background .3s, border-color .3s, transform .5s var(--ah-spring);
}
.cs-faq summary i::before, .cs-faq summary i::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--ah-ink-2);
  transform: translate(-50%, -50%); transition: background .3s, transform .45s var(--ah-spring);
}
.cs-faq summary i::before { width: 9px; height: 1.5px; }
.cs-faq summary i::after { width: 1.5px; height: 9px; }
.cs-faq details[open] summary i { background: var(--ah-brand); border-color: var(--ah-brand); transform: rotate(90deg); }
.cs-faq details[open] summary i::before, .cs-faq details[open] summary i::after { background: #fff; }
.cs-faq details[open] summary i::after { transform: translate(-50%, -50%) scaleY(0); }
.cs-facts { margin-top: 0; background: #fff; border-color: var(--ah-line); box-shadow: 0 1px 2px rgba(10, 30, 55, .03); }
.cs-author { margin: 16px 0 0; font-size: 12px; line-height: 1.7; color: var(--ah-ink-3); }

/* ============ 深色 CTA 带 ============ */
.cs-cta-sec { padding-top: 0; }
.cs-band-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cs-cta-sec .ah-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .4); }
.cs-cta-sec .ah-btn--ghost:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .12); }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .cs-scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-grid { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
}
@media (max-width: 1023px) {
  .cs-pick-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-pick { flex-direction: row; align-items: stretch; }
  .cs-pick-pic { flex: 0 0 44%; aspect-ratio: auto; }
  .cs-regions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-models { grid-template-columns: minmax(0, 1fr); }
  .cs-faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .cs-hero-mini { width: 104px; right: -6px; top: -12px; }
}
@media (max-width: 767px) {
  .cs-pick { flex-direction: column; }
  .cs-pick-pic { flex: none; aspect-ratio: 16 / 10; }
  .cs-regions { grid-template-columns: minmax(0, 1fr); }
  .cs-scene-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cs-card { border-radius: 15px; }
  .cs-card-body { padding: 10px 11px 12px; }
  .cs-card-body h3 { font-size: 12.5px; -webkit-line-clamp: 3; }
  .cs-card-body > span { font-size: 10.5px; }
  .cs-card-go { display: none; }
  .cs-chip { font-size: 10.5px; padding: 3px 8px; left: 7px; top: 7px; }
  .cs-models-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-models-nums b { font-size: 18px; }
  .cs-hero-mini { display: none; }
  .cs-cats-card { padding: 12px 13px 8px; }
  .cs-cats li span { font-size: 11.5px; }
  .cs-head-row { align-items: flex-start; }
  .cs-filter { gap: 7px; }
  .cs-fchip { padding: 8px 13px; font-size: 12.5px; }
  .cs-band-acts .ah-btn { flex: 1 1 40%; justify-content: center; }
}
@media (max-width: 400px) {
  .cs-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ============ 无障碍：减弱动效 ============ */
@media (prefers-reduced-motion: reduce) {
  .casespage .ah-stage-in,
  .cs-hero-mini,
  .cs-region-meter i,
  .cs-cats li i,
  .cs-card-pic img,
  .cs-scene img,
  .cs-pick-pic img { transition: none !important; transform: none !important; animation: none !important; }
  .casespage .ah-stage-in { transform: none !important; }
  .cs-region-meter i,
  .cs-cats li i { width: var(--w); }
}
