/* ===== Scroll Lab — 游侠云品牌滚动体验 ===== */
#scroll-lab {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.scroll-lab-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 80px;
  box-sizing: border-box;
}

.lab-panel {
  margin-bottom: 24px;
}

.lab-panel-head {
  padding: 32px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.lab-panel-head h3 {
  font-size: clamp(20px, 3.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 8px;
}

.lab-panel-head p {
  font-size: 14px;
  color: var(--text-secondary);
}

.lab-ph {
  background: linear-gradient(135deg, #e8e8e8 0%, #c8c8c8 50%, #dedede 100%);
}

.lab-ph--dark {
  background: linear-gradient(145deg, #2a2a2a 0%, #111 60%, #333 100%);
}

.lab-ph--accent {
  background: linear-gradient(145deg, #d4d4d4 0%, #f5f5f5 40%, #bbb 100%);
}

/* —— B/C: Full-bleed immersive panels —— */
.lab-panel-tear,
.lab-panel-zoom,
.lab-panel-film {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0;
}

.lab-panel-tear .lab-panel-head,
.lab-panel-zoom .lab-panel-head,
.lab-panel-film .lab-panel-head {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: clamp(16px, 4vw, 48px);
  box-sizing: border-box;
}

/* —— B: Tear —— */
.lab-panel-tear {
  overflow: visible;
}

.lab-tear-pin {
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  max-height: none;
  position: relative;
  background: linear-gradient(160deg, #f0f0f0 0%, #e0e0e0 100%);
}

.lab-tear-chrome {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  padding: 18px clamp(16px, 4vw, 40px);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 100%);
}

.lab-tear-chrome h3 {
  margin: 0 0 6px;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
}

.lab-tear-chrome p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.lab-tear-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0;
  border: none;
}

.lab-tear-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.lab-tear-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.lab-tear-top {
  z-index: 2;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
  will-change: clip-path;
}

/* —— C: Zoom —— */
.lab-zoom-pin {
  height: 100svh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
}

.lab-zoom-wrap {
  position: absolute;
  inset: 0;
  padding: 0;
  overflow: hidden;
}

.lab-zoom-frame {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  aspect-ratio: unset;
  background: #111;
}

.lab-zoom-media {
  width: 100%;
  height: 100%;
  will-change: transform;
  transform-origin: center center;
}

.lab-zoom-img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

/* —— D: Sticky 3D stack cards —— */
.lab-panel-stack {
  overflow: visible;
}

.lab-stack-pin {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 48px;
  overflow: visible;
}

.lab-stack-ui {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.lab-stack-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.lab-stack-progress-track {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.lab-stack-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: width 0.15s ease-out;
}

.lab-stack-progress-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sticky-card-section,
.lab-stack-viewport {
  position: relative;
  width: 100%;
  height: min(580px, 72vh);
  min-height: 420px;
  isolation: isolate;
}

.sticky-card-section .sticky-card,
.lab-stack-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.03),
    0 28px 70px rgba(0, 0, 0, 0.12);
  will-change: transform, opacity;
  transform-origin: 50% 100%;
}

.lab-stack-watermark {
  position: absolute;
  top: -12px;
  right: 16px;
  font-size: clamp(96px, 18vw, 160px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(0, 0, 0, 0.04);
  pointer-events: none;
  user-select: none;
}

.lab-stack-card.is-dark .lab-stack-watermark {
  color: rgba(255, 255, 255, 0.06);
}

.lab-stack-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 48px);
}

.lab-stack-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.lab-stack-copy h4 {
  font-size: clamp(24px, 4.2vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.lab-stack-copy p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: none;
}

.lab-stack-visual {
  position: relative;
  overflow: hidden;
  background: #f0f0f0;
}

.lab-stack-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.lab-stack-card.is-mid {
  background: #fafafa;
}

.lab-stack-card.is-dark {
  background: #111;
  border-color: #222;
  color: #fff;
}

.lab-stack-card.is-dark .lab-stack-tag,
.lab-stack-card.is-dark .lab-stack-copy p {
  color: rgba(255, 255, 255, 0.55);
}

.lab-stack-card.is-dark .lab-stack-copy h4 {
  color: #fff;
}

.lab-stack-card.is-accent {
  background: linear-gradient(145deg, #fff 0%, #f0f0f0 100%);
}

/* —— E: Canvas film scroll (image sequence) —— */
.lab-film-pin {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  background: #000;
  overflow: hidden;
}

.lab-film-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.lab-film-brand {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
}

.lab-film-brand-text {
  display: block;
  font-size: clamp(52px, 14vw, 128px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 12px 48px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(255, 255, 255, 0.08);
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
}

.lab-film-ui {
  position: absolute;
  left: clamp(16px, 4vw, 48px);
  bottom: clamp(20px, 4vh, 40px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.lab-film-badge {
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  backdrop-filter: blur(8px);
}

.lab-film-progress {
  padding: 8px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.lab-film-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lab-film-pin.is-ready .lab-film-loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lab-zoom-media,
  .lab-tear-top,
  .lab-stack-card {
    transform: none !important;
    clip-path: none !important;
    filter: none !important;
    opacity: 1 !important;
  }

  .lab-stack-viewport {
    height: auto !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .lab-stack-card {
    position: relative !important;
    inset: auto !important;
  }

  .lab-tear-top {
    opacity: 1;
    clip-path: none !important;
  }

  .lab-film-brand-text {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
  }

}

@media (max-width: 768px) {
  .scroll-lab-inner {
    padding: 0 16px 64px;
  }

  .lab-tear-pin {
    min-height: 88svh;
    height: 88svh;
    padding: 0;
  }

  .lab-tear-viewport {
    position: absolute;
    inset: 0;
    min-height: 100%;
  }

  .lab-zoom-pin {
    min-height: 88svh;
    height: 88svh;
  }

  .lab-panel-tear,
  .lab-panel-zoom,
  .lab-panel-film {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .lab-film-pin {
    min-height: 88svh;
    height: 88svh;
  }

  .lab-film-brand-text {
    font-size: clamp(40px, 16vw, 88px);
  }

  .lab-stack-pin {
    min-height: auto;
    padding: 32px 0;
  }

  .sticky-card-section,
  .lab-stack-viewport {
    height: auto !important;
    min-height: 0 !important;
    perspective: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .sticky-card-section .sticky-card,
  .lab-stack-card {
    position: relative !important;
    inset: auto !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(200px, 2fr);
    min-height: 360px;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform-origin: 50% 100%;
  }

  .lab-stack-visual {
    min-height: 200px;
  }

  .lab-stack-watermark {
    font-size: 72px;
    top: 8px;
    right: 12px;
  }

  .lab-stack-copy {
    padding: 24px 24px 12px;
  }

  .lab-stack-copy p {
    max-width: none;
  }
}
