/* ===== 渐入佳境 JRJJ Studio — 响应式交互样式 ===== */

html, body {
  margin: 0;
  padding: 0;
}
body {
  overflow-x: hidden;          /* 禁止横向拖动 / 横向滚动，位置固定 */
  background: #fff;
  font-family: 'Work Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 整页画布与固定头部都通过 JS 做 transform: scale 缩放，
   transform-origin 统一为左上角，保证缩放后两者始终对齐 */
#main-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  will-change: transform;
}
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  transform-origin: top left;
  will-change: transform;
  z-index: 9999;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* About & Contact 链接 */
#about-contact-link {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
#about-contact-link:hover { opacity: 0.55; }

/* ---- 视频 ---- */
#video-wrapper {
  background: #000;
  cursor: pointer;
}
#hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  z-index: 2;
  transition: opacity 0.3s ease;
}
#video-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.play-triangle {
  width: 0; height: 0;
  border-style: solid;
  border-width: 26px 0 26px 44px;
  border-color: transparent transparent transparent #fff;
  margin-left: 8px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}
#video-mute {
  position: absolute; right: 16px; bottom: 16px; z-index: 3;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff; font-size: 20px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
#video-mute:hover { background: rgba(0, 0, 0, 0.7); }

/* ---- 图片轮播轨道（保持原型稿原始布局：一张完整图 + 下一张露出）---- */
.carousel-track {
  position: absolute;
  top: 0; left: 0;
  height: 720px;
  display: flex;
  gap: 10px;
  will-change: transform;
  transition: transform 0.8s cubic-bezier(.25, .1, .25, 1);
  cursor: grab;
  touch-action: pan-y;          /* 触控：竖向滑动交给页面，横向交给轮播 */
}
.carousel-track.dragging {
  cursor: grabbing;
  transition: none !important;
}
.carousel-track img {
  flex: 0 0 1280px;            /* 与原型稿一致的单图尺寸 */
  width: 1280px;
  height: 720px;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* ---- Lightbox 全屏放大查看（追加在 body 下，不受画布缩放影响）---- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.lb-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}
.lb-prev { left: 28px; }
.lb-next { right: 28px; }
.lb-close {
  position: absolute;
  top: 24px; right: 28px;
  width: 44px; height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.lb-close:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #fff;
}
.lb-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Work Sans', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
}

/* ---- 联系方式：微信/ins 悬浮二维码 + 隐藏但占位保持间距 ---- */
.contact-col {
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: #FFFFFF;
}
.qr-trigger {
  cursor: pointer;
  display: inline-block;
  transition: opacity 0.2s ease;
}
.qr-trigger:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* 默认透明（无QR图片），有图片时通过 JS 加 has-qr class 显示 */
#social-links { transition: opacity 0.25s ease; }
#social-links .qr-trigger { opacity: 0; }
#social-links.has-qr .qr-trigger,
#social-links .qr-trigger.has-qr { opacity: 1; }

#qr-popup {
  position: fixed;
  z-index: 99999;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
}
