/* Home · Retouch (from variants/retouch-e, integrated 2026-11-10): side by side, with a vertical timeline that follows the demo.
   Builds on css/home-edit-retouch.css (.cx, .rd__stage / __bar / __source / __tag / __cursor, .c-glass,
   .c-seg, .c-kbd). Layout as the Edit section's blocks (css/home-edit.css): photo 1.55 : text 1.
   retouch-e.js sets on each step: aria-current (in progress), .is-done, --p (rail fill 0…1), --pt (its time). */

.rde { overflow-x: clip; }

/* ---------- Photo left; heading, then the timeline, right ---------- */
.rde__block {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  grid-template-areas: "visual head" "visual side";
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 5vw, 84px);
  max-width: 1280px;
  margin: 0 auto;
}
.rde__visual { grid-area: visual; align-self: start; min-width: 0; }
.rde__head { grid-area: head; align-self: start; max-width: 460px; }   /* the heading starts on the photo's top edge */
.rde__side { grid-area: side; align-self: start; max-width: 460px; }

/* ---------- Heading ---------- */
.rde__head .hud-label { margin: 0; }
.rde__head h2 {
  margin: 14px 0 0;
  font-size: clamp(32px, 3.4vw, 48px);
  letter-spacing: -0.03em; line-height: 1.06; text-wrap: balance;
  padding-bottom: .12em; margin-bottom: -.12em;       /* background-clip: text would cut the descenders */
  background: linear-gradient(180deg, #ffffff 30%, #aab5b0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rde__lede { margin: 16px 0 0; color: var(--muted); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.5; text-wrap: pretty; }

/* ---------- The timeline ---------- */
.rde__steps { --node: 30px; margin: 30px 0 0; padding: 0; list-style: none; }
.rde__steps li {
  position: relative;
  padding: 3px 0 24px calc(var(--node) + 18px);
  color: var(--faint);
  transition: color .35s;
}
.rde__steps li:last-child { padding-bottom: 0; }

/* The rail from this node down to the next one: a faint track, and the fill the demo draws down it. */
.rde__steps li::before,
.rde__steps li::after {
  content: ""; position: absolute;
  left: calc(var(--node) / 2 - 1px); top: calc(var(--node) + 6px); bottom: 6px;
  width: 2px; border-radius: 1px;
}
.rde__steps li::before { background: #ffffff17; }
.rde__steps li::after {
  background: linear-gradient(180deg, #f1f4f2e6, #f1f4f2);
  box-shadow: 0 0 10px #ffffff40;
  transform: scaleY(var(--p, 0)); transform-origin: top;
  transition: transform var(--pt, .4s) linear;
}
/* The last step's rail runs down its text to the end of the stroke. */
.rde__steps li:last-child::before, .rde__steps li:last-child::after { bottom: -2px; }

/* Numbered nodes, as the stacking timeline's: ring while waiting, lit when reached. */
.rde__node {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: var(--node); height: var(--node);
  border-radius: 50%;
  border: 1px solid #ffffff2e;
  background: #121413;
  box-shadow: inset 0 1px 0 #ffffff14;
  color: var(--muted); font: 600 13px var(--font); font-variant-numeric: tabular-nums;
  transition: background .35s, color .35s, border-color .35s, box-shadow .35s;
}
.rde__steps li[aria-current="step"] .rde__node {
  border-color: #ffffff8c; color: var(--text);
  box-shadow: 0 0 0 4px #ffffff12, 0 0 18px #ffffff2e;
}
.rde__steps li.is-done .rde__node {
  background: #f1f4f2; color: #0b0c0c; border-color: transparent;
  box-shadow: 0 0 0 4px #ffffff0f, 0 0 18px #ffffff26;
}

.rde__steps b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; line-height: 24px; }
.rde__steps p { margin: 5px 0 0; font-size: 14.5px; line-height: 1.5; }
.rde__steps li[aria-current="step"] { color: var(--text); }
.rde__steps li[aria-current="step"] p { color: var(--muted); }
.rde__steps li.is-done { color: var(--muted); }
.rde__steps .c-kbd { vertical-align: 1px; margin: 0 1px; }

.rde__note {
  margin: 26px 0 0; padding-top: 16px;
  border-top: 1px solid #ffffff14;
  color: var(--faint); font-size: 13.5px; line-height: 1.5;
}

/* ---------- Narrower: one column; heading, photo, then the timeline under it ---------- */
@media (max-width: 1059px) {
  .rde__block {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "visual" "side";
    grid-template-rows: none;
    row-gap: 28px;
    max-width: 760px;
  }
  .rde__head, .rde__side { max-width: 600px; }
  .rde__steps { margin-top: 0; }
}

@media (max-width: 640px) {
  .rde__steps { --node: 26px; }
  .rde__steps li { padding-left: calc(var(--node) + 14px); padding-bottom: 20px; }
  .rde__steps b { font-size: 15px; line-height: 22px; }
  .rde__steps p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .rde__steps li, .rde__steps li::after, .rde__node { transition: none; }
}
