/* 页面后段 · 善诚卡点品牌短片（chroma v2 · 2026-10-17）
 * 位置在实验室之后、页脚之前，作为整页的收尾；按需播放，不与首屏影片争主次。
 * 电脑：左栏文案 + 右栏 16:9 画框；竖屏 / 手机：单栏，9:16 画框居中，高度不超过视口 76%。
 * 未播放前是排版封面（四章名），不加载任何大图或影片；画框在两种主题下都是墨色“屏幕”，边框与留白随主题。 */

.brand-reel {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.5fr);
  gap: clamp(28px, 4.5vw, 72px);
  align-items: center;
  scroll-margin-top: calc(var(--hero-header-h, 82px) + 16px);
}
.brand-reel__intro { min-width: 0; margin: 0; }
.brand-reel__intro .section-kicker { margin: 0 0 16px; }
.brand-reel__intro h2 { margin: 0; }
/* 标题第二行只在 <wbr> 词组处换行，不留单字 */
.brand-reel__intro h2 span { word-break: keep-all; overflow-wrap: anywhere; }
.brand-reel__lead { max-width: 26em; margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.brand-reel__credit { max-width: 32em; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.brand-reel__credit a { display: inline-flex; align-items: center; min-height: 32px; color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.brand-reel__credit a:is(:hover, :focus-visible) { color: var(--text); text-decoration-color: currentColor; }
.brand-reel__credit a:focus-visible { outline: 2px solid var(--zhu); outline-offset: 2px; }

/* ---------- 画框 ---------- */
.brand-reel__frame {
  --reel-r: 1.7778;
  position: relative;
  width: 100%;
  aspect-ratio: var(--reel-r);
  margin: 0;
  overflow: hidden;
  container-type: inline-size;
  border: 1px solid var(--line);
  background: #1F1C18;
  isolation: isolate;
}
@media (orientation: portrait) { .brand-reel__frame { --reel-r: .5625; } }
.brand-reel__frame[data-orient="landscape"] { --reel-r: 1.7778; }
.brand-reel__frame[data-orient="portrait"] { --reel-r: .5625; }
.brand-reel__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }

/* 排版封面：只在未播放 / 出错时出现 */
.brand-reel__cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: clamp(16px, 4cqi, 40px);
  color: #F2EDE4;
  background:
    linear-gradient(180deg, rgba(31, 28, 24, 0) 40%, rgba(31, 28, 24, .55)),
    radial-gradient(120% 90% at 78% 12%, #3A342C 0%, #1F1C18 62%);
  pointer-events: none;
}
.brand-reel__frame:not([data-state="idle"]):not([data-state="error"]) .brand-reel__cover { display: none; }
.brand-reel__cover-top { display: flex; justify-content: space-between; gap: 12px; color: #B5AC9F; font-size: 11px; letter-spacing: .14em; }
.brand-reel__chapters { display: flex; flex-wrap: wrap; align-content: center; gap: 6px clamp(18px, 4cqi, 44px); margin: 0; padding: 0; list-style: none; }
.brand-reel__chapters li { display: grid; gap: 4px; }
.brand-reel__chapters small { color: #C4A678; font-size: 11px; letter-spacing: .12em; }
.brand-reel__chapters b { font-family: var(--serif); font-size: clamp(22px, 6.4cqi, 54px); font-weight: 600; line-height: 1.1; }
.brand-reel__frame[data-orient="portrait"] .brand-reel__chapters { flex-direction: column; align-content: flex-start; justify-content: center; }
.brand-reel__frame[data-orient="portrait"] .brand-reel__chapters b { font-size: clamp(30px, 13cqi, 60px); }

/* 主按钮：未播放 / 播完 / 出错时出现在画框右下角，不遮章名与落版 Logo（播放中由右下角控件接管） */
.brand-reel__start {
  position: absolute;
  z-index: 3;
  right: clamp(12px, 4cqi, 40px);
  bottom: clamp(12px, 4cqi, 40px);
  display: inline-grid;
  justify-items: center;
  gap: 2px;
  min-width: 132px;
  min-height: 56px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  color: #1F1C18;
  background: #F2EDE4;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  transition: background-color .15s ease;
}
.brand-reel__start[hidden] { display: none; }
.brand-reel__start span { font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.brand-reel__start span::before { content: "▶"; margin-right: 8px; font-size: 11px; vertical-align: 2px; }
.brand-reel__start small { color: #6B6358; font-size: 11px; }
.brand-reel__start small:empty { display: none; }
.brand-reel__start:hover { background: #fff; }
.brand-reel__start:focus-visible { outline: 2px solid #F2EDE4; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(31, 28, 24, .85); }

/* 播放中的控件：右下角胶囊，与首屏一致 */
.brand-reel__controls {
  position: absolute;
  z-index: 2;
  right: clamp(8px, 2cqi, 20px);
  bottom: clamp(8px, 2cqi, 20px);
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  color: #F2EDE4;
  background: rgba(31, 28, 24, .74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.brand-reel__controls[hidden] { display: none; }
.brand-reel__controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.brand-reel__controls button:hover { background: rgba(242, 237, 228, .14); }
.brand-reel__controls button:focus-visible { outline: 2px solid #F2EDE4; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(31, 28, 24, .85); }
@container (max-width: 360px) {
  .brand-reel__controls button { padding-inline: 8px; font-size: 12px; }
}
.brand-reel__status {
  position: absolute;
  z-index: 3;
  top: clamp(8px, 2cqi, 20px);
  left: clamp(8px, 2cqi, 20px);
  max-width: calc(100% - 2 * clamp(8px, 2cqi, 20px));
  margin: 0;
  padding: 8px 14px;
  border-radius: 18px;
  color: #F2EDE4;
  background: rgba(31, 28, 24, .8);
  font-size: 13px;
  line-height: 1.6;
}
.brand-reel__status:empty { display: none; }
.brand-reel__status a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.brand-reel__noscript { margin: 12px 0 0; color: var(--muted); font-size: 13px; }

/* 竖屏 / 手机：单栏，竖版画框居中且不超过视口 76% 高 */
@media (max-width: 900px), (orientation: portrait) {
  .brand-reel { grid-template-columns: minmax(0, 1fr); }
  .brand-reel__frame { justify-self: center; }
  .brand-reel__frame[data-orient="portrait"] { width: min(100%, calc(76vh * .5625)); width: min(100%, calc(76svh * .5625)); }
  /* 横屏手机：横版画框不超过视口 82% 高 */
  .brand-reel__frame[data-orient="landscape"] { width: min(100%, calc(82vh * 1.7778)); width: min(100%, calc(82svh * 1.7778)); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-reel__start, .brand-reel__controls button { transition: none; }
}
