/* Marvin product stage */
.marvin-stage { --ink: var(--color-ink); --accent: var(--color-accent); --muted: var(--color-muted); --line: var(--color-line); background: #fff; color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.marvin-stage .bs-track { position: relative; height: 420vh; }
.marvin-stage .bs-sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 4.5rem 1.5rem 1.5rem; box-sizing: border-box; }

.bs-captions { position: relative; min-height: 7.2rem; max-width: 1200px; width: 100%; margin: 0 auto; }
.bs-caption { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; pointer-events: none; }
.bs-caption.on { opacity: 1; transform: none; }
.bs-caption .kicker { margin-bottom: .2rem; }
.bs-caption .bs-name { font-size: 1.15rem; }
.bs-caption h2 { margin: .3rem 0 0; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.15; }
.bs-caption p { margin: .4rem 0 0; color: var(--muted); max-width: 36rem; }

.bs-viewport { position: relative; width: min(100%, 1200px, calc(64vh * 16 / 9)); margin: 0 auto; aspect-ratio: 16 / 9; touch-action: pan-y; }
.marvin-stage.can-drag .bs-viewport { cursor: grab; }
.marvin-stage.can-drag .bs-viewport:active { cursor: grabbing; }
.bs-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.bs-frame-tier { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.bs-frame-tier.on { opacity: 1; }
.bs-frame-tier:not([src]) { visibility: hidden; }
.bs-dot { transition: left .45s ease, top .45s ease; }
.bs-label { transition: top .45s ease; }
@media (prefers-reduced-motion: reduce) { .bs-frame-tier, .bs-dot, .bs-label { transition: none; } }
.bs-drag-hint { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); font-size: .8rem; color: var(--muted); transition: opacity .3s; }
.marvin-stage:not(.can-drag) .bs-drag-hint { opacity: 0; }

.bs-overlay { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; }
.marvin-stage.show-labels .bs-overlay { opacity: 1; }
.bs-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.bs-lines polyline { fill: none; stroke: #555a60; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.bs-dot { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); font-size: 0; }
.bs-label { position: absolute; transform: translateY(-50%); white-space: nowrap; line-height: 1.2; padding: .1rem .5rem; }
.bs-label-r { padding-left: .6rem; }
.bs-label-l { text-align: right; padding-right: .6rem; }
.bs-cat { display: block; font: 600 .72rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.bs-part { display: block; font-size: .9rem; color: var(--muted); }
.is-tiered .bs-part { color: var(--accent); font-weight: 600; }
.flash { animation: bs-flash 1.1s ease; }
@keyframes bs-flash { 0% { background: rgba(1,170,193,.18); } 100% { background: transparent; } }

.bs-tiers { max-width: 1200px; width: 100%; margin: .8rem auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; opacity: 0; transform: translateY(10px); transition: opacity .4s, transform .4s; pointer-events: none; }
.marvin-stage.show-tiers .bs-tiers { opacity: 1; transform: none; pointer-events: auto; }
.bs-tablist { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-control); padding: 3px; }
.bs-tab { border: 0; background: none; font: inherit; font-weight: 600; padding: .5rem 1.15rem; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); }
.bs-tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.bs-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bs-tier-blurb { flex: 1 1 18rem; margin: 0; color: var(--muted); }
.bs-cta { white-space: nowrap; }
.bs-proto-note { width: 100%; margin: 0; font-size: .75rem; color: var(--muted); }

.bs-legend { display: none; list-style: none; margin: .6rem auto 0; padding: 0; max-width: 1200px; width: 100%; columns: 2; column-gap: 1rem; font-size: .85rem; }
.bs-legend li { break-inside: avoid; display: grid; grid-template-columns: 1.4rem 1fr; margin-bottom: .35rem; }
.bs-legend li b { grid-row: span 2; color: var(--accent); }

/* Small screens: numbered dots on the image, parts listed below it. */
@media (max-width: 760px) {
  .marvin-stage .bs-sticky { padding-top: 4rem; justify-content: flex-start; }
  .bs-lines, .bs-label { display: none; }
  .bs-dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; font-size: .65rem; font-weight: 700; display: grid; place-items: center; background: var(--ink); color: #fff; border: 0; }
  .marvin-stage.show-labels .bs-legend { display: block; }
  .bs-tiers { margin-top: .5rem; }
  .bs-tier-blurb { font-size: .85rem; }
}

/* Reduced motion: no pinning, show the finished exploded view. */
.marvin-stage.is-static .bs-track { height: auto; }
.marvin-stage.is-static .bs-sticky { position: static; height: auto; }
.marvin-stage.is-static .bs-caption { position: static; display: none; }
.marvin-stage.is-static .bs-caption:last-child { display: block; opacity: 1; transform: none; }
.marvin-stage.is-static .bs-drag-hint { display: none; }