/* Process: the section pins while a playhead moves through an 8-week project. */
.process { position: relative; height: 250vh; }

.process-sticky {
  position: sticky;
  top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem var(--gutter);
}

.editor {
  position: relative;
  padding: 1rem 1.25rem 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.editor-ruler {
  position: relative;
  height: 22px;
  margin-left: 7rem;
  font: 400 11px / 22px var(--font-mono);
  color: #a8a8ad;
}

.editor-ruler span { position: absolute; transform: translateX(-50%); }

.etrack {
  display: grid;
  grid-template-columns: 7rem 1fr;
  align-items: center;
  height: 64px;
  border-top: 1px solid #e6e6e9;
}

.etrack-label { font-size: 0.8rem; font-weight: 500; color: var(--color-muted); }
.etrack-lane { position: relative; height: 100%; }

.eclip {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: var(--l);
  width: calc(var(--wd) - 6px);
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  border-radius: 10px;
  background: #e7e7ea;
  color: #8e8e93;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 300ms ease, color 300ms ease, transform 300ms var(--ease);
}

.eclip.is-done { background: #d9d9dd; color: var(--color-ink-soft); }
.eclip.is-now { background: var(--holo); color: #000; transform: translateY(-2px); }
.etrack-main .eclip { font-size: 0.85rem; }
.etrack-main .eclip.is-now { background: var(--color-ink); color: #fff; }

.eplayhead {
  position: absolute;
  top: 2.4rem;
  bottom: 1rem;
  left: calc(1.25rem + 7rem + var(--ph, 0) * (100% - 2.5rem - 7rem));
  width: 2px;
  background: var(--color-danube);
  pointer-events: none;
}

.eplayhead::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -6px;
  width: 14px;
  height: 14px;
  border-radius: 4px 4px 8px 8px;
  background: var(--color-danube);
}

.step-detail { position: relative; margin: 2rem 0 0; padding: 0; min-height: 7.5rem; list-style: none; }

.step {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 1.5rem;
  align-items: start;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 350ms ease, transform 500ms var(--ease);
}

.step.is-active { opacity: 1; transform: none; }
.step-num { padding-top: 0.6rem; font: 500 0.85rem / 1 var(--font-mono); color: var(--color-muted); }
.step h3 { margin: 0 0 0.4rem; font-size: var(--text-h3); font-weight: 500; letter-spacing: -0.03em; }
.step p { margin: 0; max-width: 36rem; color: var(--color-body); font-size: var(--text-lg); }

/* The next section follows a pinned block, so it needs less top space. */
.process + .section { padding-top: clamp(3rem, 2rem + 3vw, 5rem); }

@media (max-width: 760px) {
  .process { height: 220vh; }
  .editor { padding: 0.75rem; }
  .editor-ruler { margin-left: 0; }
  .etrack { grid-template-columns: 1fr; height: 52px; }
  .etrack-label { display: none; }
  .eplayhead { top: 2.1rem; left: calc(0.75rem + var(--ph, 0) * (100% - 1.5rem)); }
  .eclip { padding: 0 0.4rem; font-size: 0.7rem; }
  /* Only the clip under the playhead keeps its label on small screens. */
  .eclip:not(.is-now) { color: transparent; }
  .step { grid-template-columns: 1fr; gap: 0.5rem; }
  .step-detail { min-height: 9.5rem; }
}
