/* 个人介绍短片（2026-10-11，与 Fable 讨论定稿）：首页「我是谁」之后一节 + /about/ 顶部共用。
   页内是静音循环预告卡；点开原地放大成影院模式（手机全屏竖版）。交互在 reel.js。 */

/* ---------- 页内卡片 ---------- */
.reel { padding: 6vh var(--gutter, 24px) 18vh; }
.reel.reel-inline { padding: 0; margin: 32px 0 44px; }
.reel-head { max-width: 1200px; margin: 0 auto 28px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.reel-head h2 { font-size: clamp(30px, 4.4vw, 64px); line-height: 1.1; }
.reel-head .mono-label { color: var(--lime); }
.reel-card {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  width: min(1200px, 100%); margin: 0 auto; aspect-ratio: 2 / 1;
  border-radius: 12px; border: 1px solid var(--line-2); background: #000;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
  text-decoration: none; color: inherit;
}
.reel-card img, .reel-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-card video { opacity: 0; transition: opacity .5s ease; }
.reel-card video.is-playing { opacity: 1; }
.reel-play {
  position: absolute; z-index: 2; left: 20px; bottom: 20px;
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--lime); color: #0d0d0d; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .04em;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1), box-shadow .3s ease;
}
.reel-play i { font-style: normal; font-size: 12px; }
.reel-card:hover .reel-play, .reel-card:focus-visible .reel-play { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(198, 243, 107, .2); }
/* 进入视口时轻轻放大到位（reel.js 加 .is-in） */
.js .reel-card { transform: scale(.92); border-radius: 24px; transition: transform .9s cubic-bezier(.22, .61, .36, 1), border-radius .9s ease; }
.js .reel-card.is-in { transform: none; border-radius: 12px; }

/* 首屏入口 */
.reel-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid var(--lime); color: var(--lime); background: rgba(18, 18, 18, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-decoration: none;
  transition: background-color .25s ease, color .25s ease;
}
.reel-chip i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--lime); color: #0d0d0d; font-style: normal; font-size: 9px; }
.reel-chip:hover, .reel-chip:focus-visible { background: var(--lime); color: #0d0d0d; }

/* ---------- 影院模式 ---------- */
.reel-stage { position: fixed; inset: 0; z-index: 300; }
.reel-stage[hidden] { display: none; }
.reel-backdrop { position: absolute; inset: 0; background: rgba(8, 8, 8, .9); opacity: 0; transition: opacity .45s ease; }
.reel-stage.is-open .reel-backdrop { opacity: 1; }
.reel-frame {
  position: absolute; left: 50%; top: 50%;
  width: min(90vw, 180vh); aspect-ratio: 2 / 1; translate: -50% -50%;
  border-radius: 12px; overflow: hidden; background: #000; transform-origin: 0 0;
  box-shadow: 0 50px 120px rgba(0, 0, 0, .7);
}
.reel-frame.is-animating { transition: transform .6s cubic-bezier(.65, 0, .35, 1), opacity .45s ease; }
.reel-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.reel-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .12); }
.reel-progress i { display: block; height: 100%; background: var(--lime); transform-origin: 0 50%; transform: scaleX(0); }
.reel-ui { position: absolute; right: 14px; top: 14px; display: flex; gap: 10px; opacity: 0; transition: opacity .3s ease .3s; }
.reel-stage.is-open .reel-ui { opacity: 1; }
.reel-ui button {
  height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(235, 235, 232, .35); background: rgba(18, 18, 18, .72); color: var(--text-hi);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 700 13px/1 var(--font-body); letter-spacing: .04em;
}
.reel-ui button:hover, .reel-ui button:focus-visible { border-color: var(--lime); color: var(--lime); }
.reel-sound[aria-pressed="true"] { border-color: var(--lime); color: var(--lime); }
.reel-close { font-size: 18px !important; padding: 0 !important; }

/* 播完：停在「懂法，也懂 AI」那一帧，叠三个按钮 */
.reel-end {
  position: absolute; left: 0; right: 0; bottom: 9%;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 0 16px;
}
.reel-end[hidden] { display: none; }
.reel-end > * {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(18, 18, 18, .8); color: var(--text-hi);
  font: 700 14px/1 var(--font-body); text-decoration: none; letter-spacing: .04em;
  animation: reel-end-in .5s cubic-bezier(.22, .61, .36, 1) both; animation-delay: calc(var(--i, 0) * 80ms);
}
.reel-end > :first-child { background: var(--lime); border-color: var(--lime); color: #0d0d0d; }
.reel-end > :not(:first-child):hover, .reel-end > :not(:first-child):focus-visible { border-color: var(--lime); color: var(--lime); }
@keyframes reel-end-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 手机：全屏竖版 */
@media (max-width: 767px) {
  .reel { padding: 4vh 16px 12vh; }
  .reel-play { left: 10px; bottom: 10px; height: 32px; padding: 0 12px 0 10px; gap: 6px; font-size: 12.5px; }
  .reel-frame { inset: 0; left: 0; top: 0; width: 100%; height: 100%; aspect-ratio: auto; translate: none; border-radius: 0; box-shadow: none; }
  .reel-ui { top: max(14px, env(safe-area-inset-top)); }
  .reel-end { bottom: max(9%, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reel-card, .js .reel-card.is-in { transform: none; border-radius: 12px; transition: none; }
  .reel-frame.is-animating { transition: opacity .2s linear; }
  .reel-end > * { animation: none; }
}
