/* Bygonepath Labs — Continuous Camera-Transit & Living Shan Shui Handscroll */
:root {
  --bmh-paper: #060b14;
  --bmh-surface: #0c1728;
  --bmh-parchment: #f8fafc;
  --bmh-secondary: #cbd5e1;
  --bmh-gold: #d4af37;
  --bmh-emerald: #00e5bf;
  --bmh-cyan: #38bdf8;
  --bmh-display: "Merriweather", Georgia, serif;
  --bmh-sans: "Inter", system-ui, sans-serif;
}

.bmh-root {
  position: relative;
  width: 100%;
  background: var(--bmh-paper);
  user-select: none;
}

.bmh-sticky {
  position: sticky;
  top: 64px;
  width: 100%;
  height: calc(100vh - 64px);
  overflow: hidden;
  background: var(--bmh-paper);
  z-index: 10;
}

.bmh-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: var(--bmh-paper);
}

/* Soft storybook proscenium vignette around the stage edges */
.bmh-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  box-shadow: inset 0 0 85px rgba(4, 8, 16, 0.72);
  background:
    linear-gradient(180deg, rgba(6, 11, 20, 0.36) 0%, transparent 12%, transparent 86%, rgba(6, 11, 20, 0.82) 100%);
}

/* Primary High-DPI Continuous Camera & Living Animation Canvas */
.bmh-stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
  pointer-events: none;
}

/* Reduced-motion / fallback DOM layer when canvas images are still loading */
.bmh-fallback-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.bmh-shot-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
}

/* Minimal top-right Skip pill */
.bmh-hud-top {
  position: absolute;
  top: 18px;
  right: clamp(20px, 3.5vw, 44px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.bmh-skip-link {
  pointer-events: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.68);
  border: 1px solid rgba(212, 175, 55, 0.38);
  backdrop-filter: blur(8px);
  font-family: var(--bmh-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(248, 250, 252, 0.9);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.bmh-skip-link:hover {
  border-color: #fde047;
  color: #fde047;
  background: rgba(12, 22, 38, 0.92);
}

.bmh-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 25;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bmh-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--bmh-cyan), var(--bmh-emerald), #fde047, var(--bmh-gold));
  transform: scaleX(0);
  transform-origin: left;
}

/* Clean, compact storybook caption card */
.bmh-copy-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.bmh-copy {
  --bmh-accent: var(--bmh-gold);
  position: absolute;
  top: 50%;
  width: min(380px, calc(100vw - 48px));
  padding: 24px 26px;
  border-left: 3px solid var(--bmh-accent);
  border-top: 1px solid rgba(56, 189, 248, 0.34);
  border-right: 1px solid rgba(212, 175, 55, 0.24);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 4px 14px 14px 4px;
  background: linear-gradient(145deg, rgba(8, 17, 32, 0.86) 0%, rgba(12, 25, 44, 0.78) 100%);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.68),
    0 0 28px rgba(14, 165, 233, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: var(--bmh-parchment);
  opacity: 0;
  will-change: opacity, transform;
  box-sizing: border-box;
}

.bmh-copy[data-position="left"] {
  left: clamp(24px, 4.5vw, 64px);
}

.bmh-copy[data-position="right"] {
  right: clamp(56px, 6vw, 96px);
}

.bmh-copy__title {
  margin: 0 !important;
  font-family: var(--bmh-display);
  font-size: clamp(1.35rem, 1.85vw, 1.68rem) !important;
  font-weight: 700 !important;
  line-height: 1.22 !important;
  color: #ffffff !important;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.bmh-shimmer {
  background: linear-gradient(120deg, #38bdf8 0%, #00e5bf 26%, #fde047 54%, #d4af37 76%, #38bdf8 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: bmhBlueGoldShimmer 6s linear infinite;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.24));
}

@keyframes bmhBlueGoldShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

.bmh-copy__body {
  margin-top: 12px;
  font-family: var(--bmh-sans);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--bmh-secondary);
}

.bmh-copy__body p {
  margin: 0 0 0.5em !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.bmh-copy__body p:last-child {
  margin-bottom: 0 !important;
}

.bmh-copy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.bmh-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-family: var(--bmh-sans);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-position 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.16s cubic-bezier(0.22, 1, 0.36, 1), color 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
}

.bmh-cta--primary {
  background: linear-gradient(135deg, #fde047 0%, #d4af37 52%, #00e5bf 100%);
  background-size: 160% 160%;
  color: #060b14;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.bmh-cta--primary:hover {
  background-position: 100% 50%;
  color: #060b14;
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.42), 0 0 16px rgba(212, 175, 55, 0.45);
}

.bmh-cta--ghost {
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
  border: 1px solid rgba(212, 175, 55, 0.42);
}

.bmh-cta--ghost:hover {
  border-color: #fde047;
  color: #fde047;
}

/* Pure, wordless geometric dots on the right rail */
.bmh-route {
  position: absolute;
  right: clamp(16px, 2vw, 28px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bmh-route__item {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.45);
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  transition: height 0.28s ease, background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.bmh-route__item:hover {
  border-color: #fde047;
  background: rgba(212, 175, 55, 0.5);
}

.bmh-route__item.is-active {
  height: 24px;
  background: linear-gradient(180deg, #38bdf8 0%, #00e5bf 45%, #fde047 100%);
  border-color: #fde047;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.55);
}

@media (max-width: 768px) {
  .bmh-copy,
  .bmh-copy[data-position] {
    top: auto;
    bottom: 24px;
    left: 16px;
    right: 16px;
    width: auto;
    margin: 0;
    padding: 16px 18px;
  }
  .bmh-route {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bmh-shimmer {
    animation: none !important;
  }
}
