/* The camera path is horizontal. Base styles also work without JavaScript. */
.steps.wrap {
  --timeline-gutter: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --slide-width: min(80vw, 1080px);
  --slide-gap: 6vw;
  --route-length: calc((var(--slide-width) + var(--slide-gap)) * 8);
  width: 100%;
  max-width: none;
  padding: 0;
}
.steps .timeline-viewport {
  padding-block: 40px;
  background: var(--navy);
}
.steps .timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-inline: var(--timeline-gutter);
  margin-bottom: 32px;
}
.steps .timeline-header h2 { max-width: 16ch; font-size: clamp(2rem, 3.4vw, 3rem); }
.steps .timeline-progress { display: flex; align-items: center; gap: 32px; flex-shrink: 0; }
.steps .timeline-chapters { display: flex; gap: 20px; font-size: .875rem; font-weight: 600; color: var(--dim); }
.steps .timeline-chapters span { transition: color 350ms var(--ease); }
.steps .timeline-chapters [aria-current] { color: var(--sleet); }
.steps .timeline-count { color: var(--muted); white-space: nowrap; }
.steps .timeline-scroller {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--timeline-gutter);
  scrollbar-width: none;
}
.steps .timeline-scroller::-webkit-scrollbar { display: none; }
.steps.is-live:not(.is-pinned) .timeline-scroller { height: var(--carousel-height, auto); }
.steps .path {
  display: flex;
  align-items: flex-start;
  gap: var(--slide-gap);
  width: max-content;
  margin: 0;
  padding: 0 calc(100vw - var(--slide-width) - var(--timeline-gutter)) 0 var(--timeline-gutter);
  list-style: none;
}
.steps .path::before, .steps .path::after {
  left: calc(var(--timeline-gutter) + 6px);
  top: 16px;
  bottom: auto;
  width: var(--route-length);
  height: 2px;
  background: #2B2C40;
  transform: none;
  transform-origin: left;
}
.steps .path::after { background: var(--cyan); transform: scaleX(var(--path-progress, 1)); }
.steps .path .stop {
  flex: 0 0 var(--slide-width);
  width: var(--slide-width);
  min-width: 0;
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  grid-template-rows: auto;
  gap: 20px 48px;
  align-content: center;
  align-items: center;
  padding: 56px 0 0;
  scroll-snap-align: start;
  transform-origin: 6px 17px;
  transition: opacity 350ms var(--ease), transform 350ms var(--ease);
}
.steps .path .stop:last-child { padding-bottom: 0; }
.steps .stop-text { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.steps .path .stop::before {
  top: 11px;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--dim);
  box-shadow: 0 0 0 4px var(--navy);
}
.steps .path .stop.is-reached::before {
  background: #fff;
  box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--cyan);
}
.steps .path .stop::after { display: none; }
.steps .path .stop-space {
  display: block;
  grid-column: 1;
  padding: 0;
  color: var(--cyan);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
}
/* Repeated chapter labels remain presentation only; the original labels stay intact. */
.steps .stop:nth-child(2) .stop-space::before,
.steps .stop:nth-child(3) .stop-space::before { content: 'Scene'; }
.steps .stop:nth-child(5) .stop-space::before,
.steps .stop:nth-child(6) .stop-space::before { content: 'Shoot'; }
.steps .stop:nth-child(8) .stop-space::before { content: 'Review'; }
.steps .path .stop-copy { grid-column: 1; min-width: 0; transition: none; }
.steps .path .stop-copy h3 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.steps .path .stop-copy p {
  max-width: 38ch;
  margin-top: 20px;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--muted);
}
.steps .path [data-demo] {
  position: relative;
  top: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 520px;
  align-self: center;
  justify-self: center;
  transform: none;
  opacity: 1;
  transition: none;
}
.steps .path .panel { padding: 28px; gap: 24px; border-radius: 20px; }
.steps .path .panel-quote { font-size: 1.625rem; line-height: 1.4; }
.steps .path .panel-render { max-width: 600px; padding: 16px; gap: 24px; }
.steps .path .render-controls { padding: 0 8px 8px; }
.steps .path .stop-wide .edit-pair {
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: 1fr;
  max-width: 600px;
  margin: 0;
  gap: 12px;
}
.steps .path.is-live .stop:not(.is-active) { opacity: .35; transform: scale(.96); }
.steps .path.is-live .stop:not(.is-active) .stop-copy,
.steps .path.is-live .stop:not(.is-active) [data-demo] { opacity: 1; transform: none; pointer-events: auto; }
.steps:not(.is-live) .upload-track span { transform: scaleX(1); }
.steps .timeline-controls {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-inline: var(--timeline-gutter);
}
.steps .timeline-controls[hidden] { display: none; }
.steps .timeline-controls button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--sleet);
  background: var(--deep);
  cursor: pointer;
}
.steps .timeline-controls button:hover:enabled { border-color: var(--cyan); }
.steps .timeline-controls button:disabled { opacity: .3; cursor: default; }
.steps .timeline-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Only the enhanced desktop version pins. No-JS always keeps native scrolling. */
@media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
  .steps.is-pinned { height: 720vh; }
  .steps.is-pinned .timeline-viewport {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding-block: clamp(40px, 7vh, 80px) 40px;
  }
  .steps.is-pinned .timeline-header { margin-bottom: 40px; }
  .steps.is-pinned .timeline-scroller { flex: 1; min-height: 0; overflow: hidden; scroll-snap-type: none; }
  .steps.is-pinned .path { height: 100%; will-change: transform; }
  .steps.is-pinned .path .stop { height: 100%; min-height: 0; padding-top: 68px; padding-bottom: 36px; }
  .steps.is-pinned .timeline-controls { display: none; }
}
@media (max-width: 960px) {
  .steps.wrap { --slide-width: 86vw; --slide-gap: 6vw; }
  .steps .timeline-viewport { padding-block: 40px; }
  .steps .timeline-header { align-items: start; flex-direction: column; gap: 24px; margin-bottom: 24px; }
  .steps .timeline-header h2 { max-width: 15ch; font-size: clamp(2rem, 5vw, 2.75rem); }
  .steps .timeline-progress { width: 100%; justify-content: space-between; gap: 16px; }
  .steps .timeline-chapters { gap: clamp(14px, 3vw, 24px); font-size: .8125rem; }
  .steps .timeline-count { font-size: .75rem; }
  .steps .path .stop {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    align-items: start;
    gap: 12px;
    padding: 48px 0 0;
  }
  .steps .path .stop:last-child { padding-bottom: 0; }
  .steps .stop-text { gap: 12px; }
  .steps .path .stop-copy h3 { font-size: clamp(1.875rem, 4.5vw, 2.5rem); }
  .steps .path .stop-copy p { font-size: 1rem; line-height: 1.55; margin-top: 14px; }
  .steps .path [data-demo], .steps .path .stop-wide .edit-pair {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    justify-self: start;
    margin-top: 16px;
  }
  .steps .path .panel { padding: 20px; gap: 18px; border-radius: 16px; }
  .steps .path .panel-quote { font-size: 1.25rem; }
  .steps .path .btn { font-size: .8125rem; padding: 7px 11px; }
  .steps .path .panel-render { padding: 12px; }
  .steps .path .render-controls { padding: 0; gap: 14px; }
  .steps .path .confirm { font-size: .75rem; gap: 8px; }
  .steps .path .data { font-size: .8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .steps .path::after { transform: scaleX(1); }
  .steps .path .stop::before {
    background: #fff;
    box-shadow: 0 0 0 4px var(--navy), 0 0 0 6px var(--cyan);
  }
  .steps .path.is-live .stop:not(.is-active) { opacity: 1; transform: none; }
  .steps .path .stop, .steps .timeline-chapters span { transition: none; }
}

/* Bigger, tighter slides on desktop: each step fills the screen and the next
   one follows close behind, so the path reads as one continuous move. */
@media (min-width: 961px) {
  .steps.wrap { --slide-width: min(88vw, 1360px); --slide-gap: 3vw; }
  .steps .path .stop { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px clamp(40px, 5vw, 88px); }
  .steps .path .stop-copy h3 { font-size: clamp(2.5rem, 4.2vw, 4rem); letter-spacing: -.04em; line-height: 1.02; }
  .steps .path .stop-copy p { max-width: 34ch; font-size: clamp(1.1875rem, 1.45vw, 1.375rem); margin-top: 24px; }
  .steps .path .stop-space { font-size: 1rem; }
  .steps .path [data-demo] { max-width: 760px; justify-self: stretch; }
  .steps .path .panel { zoom: 1.3; max-width: 560px; justify-self: center; }
  .steps .path .panel-render { zoom: 1.15; max-width: 660px; }
  .steps .path .stop-wide .edit-pair { max-width: 780px; justify-self: stretch; }
  .steps .path.is-live .stop:not(.is-active) { opacity: .45; transform: scale(.98); }
}
@media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
  .steps.is-pinned { height: 600vh; }
  .steps.is-pinned .timeline-viewport { padding-block: clamp(24px, 4vh, 48px) 16px; }
  .steps.is-pinned .timeline-header { margin-bottom: 16px; }
  .steps.is-pinned .path .stop { padding-top: 48px; padding-bottom: 8px; }
}
