/* ============================================================
   fidelidade-tutorial.css — tutorial passo-a-passo de Fidelidade.
   Carregado DEPOIS de fidelidade-lp.css (reusa nav/hero/device/botões/
   features/cta). Aqui só o que é próprio do tutorial: passos numerados,
   trilha de progresso, navegação prev/next e o seletor de persona.
   Identidade Duomobi. Motion em assets/fidelidade-tutorial.js.
   ============================================================ */

/* Marca real Duomobi (cubos isométricos) — sobrepõe o quadrado placeholder do lp.css */
.lp-nav .brand .mark {
  width: 32px; height: 32px; display: block;
  background: none; box-shadow: none; border-radius: 0;
}

/* ── Seletor de persona (lojista ⇄ arquiteto) no topo ─────── */
.persona-switch {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--lp-card-line);
}
.persona-switch a {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 15px; border-radius: 999px;
  font: 600 12.5px/1 var(--duomobi-font-sans, 'Inter', sans-serif);
  color: var(--duomobi-fg-3, #6b7775); white-space: nowrap;
  transition: color 0.2s, background 0.25s var(--lp-ease);
}
.persona-switch a svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.persona-switch a:hover { color: var(--duomobi-fg-1, #e8eeec); }
.persona-switch a.on {
  color: #04140a;
  background: var(--duomobi-gradient, linear-gradient(105deg, #6ee7a3, #22c55e 52%, #15803d));
  box-shadow: 0 6px 18px -8px rgba(34, 197, 94, 0.6);
}

/* Pílula de persona no hero */
.hero-persona {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 auto 22px;
  padding: 7px 8px 7px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--lp-card-line);
  font: 600 13px/1 var(--duomobi-font-sans, 'Inter', sans-serif);
}
.hero-persona b { letter-spacing: -0.01em; }
.hero-persona .chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 13px; border-radius: 999px;
  font: 600 11px/1 var(--duomobi-font-mono, monospace); text-transform: uppercase; letter-spacing: 0.1em;
  color: #04140a; background: var(--duomobi-gradient, linear-gradient(105deg, #6ee7a3, #22c55e 52%, #15803d));
}
.hero-persona .chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Tutorial stage (passos pilotam a tela real) ──────────── */
.tut { position: relative; padding: clamp(60px, 9vh, 120px) clamp(18px, 4vw, 46px); scroll-margin-top: 80px; }
.tut-pin {
  max-width: var(--lp-max); margin: 0 auto;
  display: flex; flex-direction: column; gap: clamp(24px, 3.5vw, 38px);
}
.tut-grid {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
}

/* Coluna de passos: empilhados, só o ativo visível (igual painéis da LP) */
.tut-copy { position: relative; min-height: 420px; }
.tut-step {
  position: absolute; inset: 0; opacity: 0; transform: translateY(16px) scale(0.99);
  pointer-events: none; transition: opacity 0.5s var(--lp-ease), transform 0.5s var(--lp-ease);
  display: flex; flex-direction: column; justify-content: center;
}
.tut-step.active { opacity: 1; transform: none; pointer-events: auto; }
.tut-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.tut-n {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center;
  font: 800 16px/1 var(--duomobi-font-mono, monospace); color: #04140a;
  background: var(--duomobi-gradient, linear-gradient(135deg, #6ee7a3, #15803d));
  box-shadow: 0 10px 26px -10px rgba(34, 197, 94, 0.6);
}
.tut-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font: 600 11px/1 var(--duomobi-font-mono, monospace); text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--duomobi-accent-fg, #6ee7a3);
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--duomobi-accent-line, rgba(34, 197, 94, 0.22));
  background: var(--duomobi-accent-soft, rgba(34, 197, 94, 0.08));
}
.tut-tag svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.tut-step h2 { font-size: clamp(25px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; margin-bottom: 14px; }
.tut-step > p { font-size: clamp(14.5px, 1.5vw, 16.5px); line-height: 1.65; color: var(--duomobi-fg-2, #9aa6a3); margin-bottom: 22px; max-width: 44ch; }
.tut-do { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tut-do li {
  display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5;
  color: var(--duomobi-fg-1, #e8eeec);
}
.tut-do li .mk {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; margin-top: 1px;
  display: grid; place-items: center;
  background: var(--duomobi-accent-soft, rgba(34, 197, 94, 0.1)); border: 1px solid var(--duomobi-accent-line, rgba(34, 197, 94, 0.22));
}
.tut-do li .mk svg { width: 13px; height: 13px; stroke: var(--duomobi-accent, #22c55e); fill: none; stroke-width: 2.6; }
.tut-do li b { color: #fff; font-weight: 600; }

/* Device: reusa .device/.device-bar/.device-screen/.veil da LP.
   No portal do arquiteto a altura é fixa (rola por dentro p/ revelar seções). */
.tut[data-persona="arquiteto"] .device-screen { height: clamp(460px, 72vh, 720px); }

/* ── Tela real em ESCALA (lojista) ──────────────────────────
   O console é desktop (~1024px). Renderizar 1:1 numa coluna estreita espreme
   as tabelas (6 colunas quebram). Solução: renderizar em largura lógica fixa
   (--embed-w) e reduzir proporcional (--embed-scale) — miniatura fiel do
   desktop, layout idêntico ao sistema. Vars calculadas em fidelidade-tutorial.js. */
.tut[data-persona="lojista"] .device-screen { overflow: hidden; }
.tut[data-persona="lojista"] .device-screen iframe {
  position: absolute; top: 0; left: 0;
  width: var(--embed-w, 1024px); height: 100%;
  transform: scale(var(--embed-scale, 1)); transform-origin: top left;
  z-index: 1;
}
.tut[data-persona="lojista"] .device-screen .veil { z-index: 2; }

/* ── Trilha de progresso + navegação ──────────────────────── */
.tut-bar { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); flex-wrap: wrap; }
.tut-rail { display: flex; gap: clamp(8px, 1.4vw, 16px); flex: 1 1 auto; align-items: flex-start; flex-wrap: wrap; min-width: 0; }
.tut-rail button {
  flex: 1 1 0; min-width: 78px; max-width: 200px;
  display: flex; flex-direction: column; gap: 9px;
  background: transparent; border: 0; cursor: pointer; padding: 0; text-align: left;
}
.tut-rail button .seg {
  position: relative; height: 4px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.12); overflow: hidden;
  transition: box-shadow 0.3s var(--lp-ease);
}
.tut-rail button .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--duomobi-gradient, linear-gradient(90deg, #6ee7a3, #22c55e)); border-radius: 3px;
}
.tut-rail button.active .seg { box-shadow: 0 0 16px rgba(34, 197, 94, 0.5); }
.tut-rail button.done .seg { background: rgba(34, 197, 94, 0.28); }
.tut-rail button .lbl {
  font: 600 10.5px/1.2 var(--duomobi-font-mono, monospace); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--duomobi-fg-3, #6b7775); transition: color 0.3s var(--lp-ease);
}
.tut-rail button:hover .lbl { color: var(--duomobi-fg-2, #9aa6a3); }
.tut-rail button.active .lbl { color: var(--duomobi-accent-fg, #6ee7a3); }

.tut-nav { display: inline-flex; align-items: center; gap: 12px; }
.tut-count {
  font: 700 12.5px/1 var(--duomobi-font-mono, monospace); letter-spacing: 0.12em;
  color: var(--duomobi-fg-3, #6b7775); font-variant-numeric: tabular-nums; min-width: 64px; text-align: center;
}
.tut-nav button {
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--lp-card-line);
  color: var(--duomobi-fg-1, #e8eeec);
  transition: transform 0.2s var(--lp-ease), border-color 0.2s, background 0.2s, color 0.2s;
}
.tut-nav button:hover { border-color: var(--duomobi-accent-line, rgba(34, 197, 94, 0.4)); color: #fff; transform: translateY(-2px); }
.tut-nav button svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2.2; }

/* Hint discreto sob o device */
.tut-hint {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  font-size: 12px; color: var(--duomobi-fg-3, #6b7775);
}
.tut-hint svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ── Ícones: pontas/junções arredondadas (padrão Arch_C) ──── */
.tut svg, .persona-switch svg, .hero-persona svg,
.btn-primary svg, .btn-ghost svg, .feat .ico svg, .lp-foot svg {
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .tut { padding: 50px clamp(18px, 4vw, 46px); }
  .tut-grid { grid-template-columns: 1fr; gap: 22px; }
  .tut-copy { min-height: 360px; }
  .tut[data-persona="arquiteto"] .device-screen { height: clamp(440px, 66vh, 600px); }
  .tut-rail button { min-width: 56px; }
  .tut-rail button .lbl { font-size: 9px; letter-spacing: 0.02em; }
  .persona-switch a span { display: none; }
  .persona-switch a { padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .tut-step { transition: none; }
  .device-screen iframe { transition: none !important; }
}
