/* Rediall marketing site: the animated story drawings (scenes/rd.js) in the
   hero, in Modules and in How it works. The canvases are transparent and
   their colours follow the site theme, so a drawing sits straight on the
   page: once a scene has mounted (.is-scene), its frame drops the border,
   the dot grid and the corner brackets. The trace under a scene lights step
   by step with the story. Loads after art-motion.css. */

/* ---------- the drawing ---------- */

.rd {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.hero-art .rd {
  max-width: 600px;
}

.row-art .rd {
  max-width: none;
}

.rd canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- no boxes: the frames dissolve around a mounted scene ---------- */

.hero-art.is-scene,
.modules.is-story .modules-stage,
.module-art.is-scene {
  border-color: transparent;
  background: none;
}

.hero-art.is-scene::before,
.hero-art.is-scene::after,
.modules.is-story .modules-stage::before,
.modules.is-story .modules-stage::after,
.module-art.is-scene::before {
  display: none;
}

/* How it works: the drawing in the row's third column */
.row-art.is-scene {
  justify-self: end;
  width: min(100%, 420px);
}

/* ---------- the trace, lit by the story ---------- */

.is-scene .trace span {
  color: var(--muted);
  transition: color 200ms var(--ease);
}

.is-scene .trace span::before {
  background: none;
  box-shadow: inset 0 0 0 1px currentColor;
  transition: background-color 200ms var(--ease);
}

.is-scene .trace span.is-done {
  color: var(--text);
}

.is-scene .trace span.is-on {
  color: var(--ink);
}

.is-scene .trace span.is-on::before {
  background: var(--accent);
  box-shadow: none;
}
