/* ============================================================
   MORPH — секция «Логос», голосовые команды и правки
   на лету: показываем как сырая речь превращается в чистый
   текст с подсветкой правок.
   ============================================================ */

.morph {
  padding: clamp(56px, 7.5vw, 112px) 0;
  position: relative;
  border-top: 1px solid var(--line);
}

.morph-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 920px) { .morph-grid { grid-template-columns: 1fr; } }

.morph h2 em { color: var(--red-0); }
.morph .lead { margin-top: 24px; }

.morph-commands {
  margin-top: 32px;
  display: flex; flex-direction: column; gap: 10px;
}
.morph-cmd {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--ink-1);
  align-self: flex-start;
}
.morph-cmd .tag {
  color: var(--red-0);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}

/* ─── stage where morph happens ──────────────────── */
.morph-stage {
  position: relative;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  padding: clamp(20px, 2.4vw, 32px);
  box-shadow: var(--shadow-card);
}

.morph-stage .meta {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 18px;
}
.morph-stage .meta .step {
  color: var(--ink-0);
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  border-radius: 999px;
}
.morph-stage .meta .arrow {
  color: var(--red-0);
}

.morph-text {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--ink-1);
  min-height: 220px;
}
.morph-text del {
  text-decoration: line-through;
  text-decoration-color: rgba(251, 26, 38, 0.7);
  text-decoration-thickness: 2px;
  color: var(--ink-3);
  margin-right: 4px;
  transition: opacity .4s var(--ease-out);
}
.morph-text del.fade { opacity: 0; }
.morph-text .ins {
  background: var(--highlight-add);
  color: var(--ink-0);
  padding: 0 5px;
  border-radius: 5px;
  box-shadow: 0 0 0 1px var(--red-line) inset;
  animation: ins-pop .35s var(--ease-out);
}

/* ─── stages controls (для понимания этапа) ──── */
.morph-progress {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.morph-progress .seg {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.morph-progress .seg .fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--red-0), var(--red-1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease-out);
}
.morph-progress .seg.is-on .fill { transform: scaleX(1); }
.morph-progress .lbl {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 8px;
}
.morph-progress .seg.is-on + .lbl,
.morph-progress .is-on-label { color: var(--ink-0); }

.morph-step-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 8px;
}
.morph-step-grid .lbl {
  font-family: var(--ff-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); transition: color .25s;
}
.morph-step-grid .lbl.is-on { color: var(--ink-0); }
