/* =====================================================================
   Sanduba do Moral · protótipo · tutorial.css
   Dono: agente BASE (junto com js/tutorial.js).
   ===================================================================== */
@property --gx { syntax: '<percentage>'; inherits: false; initial-value: 30%; }
@property --gy { syntax: '<percentage>'; inherits: false; initial-value: 25%; }

.tut-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 48px; }
.tut {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  min-height: min(680px, calc(100vh - var(--protobar-h) - 56px));
  border-radius: 24px; overflow: hidden; background: var(--raised);
  box-shadow: 0 1px 2px rgba(31,25,21,.05), 0 24px 60px -24px rgba(31,25,21,.3);
}

/* lado esquerdo: o disco laranja da marca com retícula; o brilho anda um pouco a cada passo */
.tut__vis {
  position: relative; overflow: hidden; isolation: isolate; min-height: 440px; color: var(--carvao-950);
  background:
    radial-gradient(circle at 1px 1px, rgba(21, 17, 14, .15) 1.2px, transparent 1.6px) 0 0 / 9px 9px,
    radial-gradient(110% 90% at var(--gx) var(--gy), #FFD45C 0%, #FFA21A 36%, #FF7A00 68%, #E85400 100%);
  transition: --gx 900ms var(--ease-in-out), --gy 900ms var(--ease-in-out);
}
.tut__vis[data-passo="1"] { --gx: 70%; --gy: 20%; }
.tut__vis[data-passo="2"] { --gx: 25%; --gy: 70%; }
.tut__vis[data-passo="3"] { --gx: 75%; --gy: 65%; }
.tut__vis[data-passo="4"] { --gx: 50%; --gy: 15%; }
.tut__vis[data-passo="5"] { --gx: 20%; --gy: 40%; }
.tut__vis[data-passo="6"] { --gx: 80%; --gy: 35%; }
.tut__vis[data-passo="7"] { --gx: 50%; --gy: 80%; }
.tut__marca { position: absolute; right: -90px; bottom: -40px; z-index: -1; opacity: .13; transform: rotate(-12deg); pointer-events: none; }
.tut__marca svg { width: 520px; height: auto; }
.tut__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px 24px; }
.tut__scene { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.tut__scene.is-in { animation: tut-scene 340ms var(--ease-out) both; }
.tut__scene.is-out { position: absolute; inset: 0; padding: 28px 24px; justify-content: center; animation: tut-out 140ms ease-out both; pointer-events: none; }
@keyframes tut-scene { from { opacity: 0; transform: scale(.975); filter: blur(3px); } }
@keyframes tut-out { to { opacity: 0; transform: scale(.99); } }

/* lado direito */
.tut__body { display: flex; flex-direction: column; padding: 34px 38px 26px; min-width: 0; }
.tut__prog { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 5px; }
.tut__prog i { height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; position: relative; }
.tut__prog i::after { content: ""; position: absolute; inset: 0; background: var(--action); transform: scaleX(0); transform-origin: 0 50%; transition: transform 320ms var(--ease-out); }
.tut__prog i.is-on::after { transform: none; }
.tut__count { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tut__content { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.tut__content.is-in > * { animation: tut-line 380ms var(--ease-out) both; }
.tut__content.is-in > *:nth-child(2) { animation-delay: 50ms; }
.tut__content.is-in > *:nth-child(3) { animation-delay: 90ms; }
.tut__content.is-in > *:nth-child(n+4) { animation-delay: 120ms; }
@keyframes tut-line { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } }
.tut__content h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.2vw, 44px); line-height: 1.02; color: var(--carvao-900); }
.tut__content h1:focus { outline: none; }
.tut__text { font-size: 17px; line-height: 1.55; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; max-width: 56ch; }
.tut__text b { color: var(--ink); font-weight: 700; }
.tut__parts { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tut__parts li { display: flex; gap: 10px; align-items: baseline; }
.tut__parts li em { flex: none; font-style: normal; font-family: var(--font-display); color: var(--laranja-800); width: 18px; }
.tut__tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--mar-50); color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.tut__tip svg { flex: none; color: var(--mar-700); margin-top: 1px; }
.tut__final { display: flex; flex-direction: column; gap: 8px; }
.tut__final a { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 14px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color var(--dur-quick) ease, background-color var(--dur-quick) ease, transform var(--dur-press) var(--ease-out); }
.tut__final a:hover { border-color: var(--laranja-300); background: var(--laranja-50); }
.tut__final a:active { transform: scale(.985); }
.tut__final .n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--carvao-900); color: var(--sol-400); font-family: var(--font-display); font-size: 17px; }
.tut__final b { display: block; font-weight: 700; font-size: 15px; }
.tut__final small { display: block; color: var(--muted); font-size: 13.5px; }
.tut__final .go { margin-left: auto; color: var(--muted); transition: transform var(--dur-fast) var(--ease-out); }
.tut__final a:hover .go { transform: translateX(3px); color: var(--laranja-800); }
.tut__nav { margin-top: auto; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tut__dots { display: flex; gap: 2px; }
.tut__dots button { display: grid; place-items: center; width: 22px; height: 28px; border: 0; padding: 0; background: transparent; }
.tut__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 8px; background: var(--line-2); transition: width var(--dur-fast) var(--ease-out), background-color var(--dur-fast) ease; }
.tut__dots button[aria-current="step"]::before { width: 20px; background: var(--action); }
.tut__dots button:hover::before { background: var(--laranja-300); }
.tut__skip { align-self: center; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---------- cenas ---------- */
.tsc-logo { filter: drop-shadow(6px 8px 0 rgba(21,17,14,.85)); }
.tsc-logo svg { border-radius: 50%; box-shadow: 0 0 0 4px var(--carvao-950); }
.tsc-logo.is-in { animation: tsc-logo 640ms var(--ease-bounce) both; }
@keyframes tsc-logo { from { opacity: 0; transform: scale(.88) rotate(-6deg); } }
.tsc-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 480px; }
.tsc-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--carvao-950); color: #fff; font-size: 14px; font-weight: 600; animation: tut-line 420ms var(--ease-out) both; }
.tsc-chip svg { color: var(--sol-400); }
.tsc-place { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.55); font-size: 13.5px; font-weight: 700; color: var(--carvao-950); }

.tsc-bar { display: flex; gap: 2px; padding: 5px; border-radius: 14px; background: var(--carvao-950); position: relative; box-shadow: 6px 6px 0 rgba(21,17,14,.35); max-width: 100%; overflow: hidden; }
.tsc-bar span { position: relative; z-index: 1; padding: 7px 11px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--carvao-200); white-space: nowrap; transition: color 200ms ease; }
.tsc-bar span.is-on { color: var(--carvao-950); }
.tsc-bar .pill { position: absolute; z-index: 0; top: 5px; height: calc(100% - 10px); left: 0; width: 0; border-radius: 9px; background: var(--action); transition: transform 420ms var(--ease-in-out), width 420ms var(--ease-in-out); }
.tsc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 480px; }
.tsc-tile { display: flex; gap: 11px; align-items: flex-start; padding: 13px; border-radius: 16px; background: rgba(21,17,14,.86); border: 2px solid transparent; animation: tut-line 420ms var(--ease-out) both; transition: border-color 240ms ease, transform 240ms var(--ease-out); }
.tsc-tile.is-on { border-color: var(--sol-400); transform: translateY(-2px); }
.tsc-tile .ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.1); color: var(--sol-400); }
.tsc-tile b { display: block; font-size: 14.5px; color: #fff; }
.tsc-tile small { display: block; font-size: 13px; color: var(--carvao-200); line-height: 1.35; margin-top: 2px; }

/* o celular da cena é o de verdade (CT.phone), só que em escala */
.tsc-phone { width: 372px; zoom: .78; filter: drop-shadow(8px 10px 0 rgba(21,17,14,.55)); }
.tsc-phone .phone { --ph-h: 700px; min-height: 0; }

/* mini cardápio dentro do celular */
.tsc-phone .pbrowser__view { background: #fff; }
.mcard { position: relative; background: var(--ground); min-height: 100%; }
.mcard__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.mcard__body { padding: 14px 12px 80px; display: flex; flex-direction: column; gap: 10px; }
.mcard__cat { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin-top: 6px; }
.mcard__bar { position: sticky; bottom: 12px; margin: -66px 12px 12px; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 14px; background: var(--carvao-950); color: #fff; font-size: 14px; box-shadow: var(--shadow-2); }
.mcard__bar.is-in { animation: bar-in 320ms var(--ease-out) both; }
@keyframes bar-in { from { opacity: 0; transform: translateY(16px); } }
.mcard__ver { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--sol-400); }
.tap { position: relative; }
.tap::after { content: ""; position: absolute; inset: -6px; border-radius: 18px; border: 3px solid var(--carvao-950); opacity: 0; pointer-events: none; }
.tap.is-tap::after { animation: tap-ring 700ms var(--ease-out) both; }
@keyframes tap-ring { 0% { opacity: 0; transform: scale(.9); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.12); } }
.mok { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 16px; text-align: center; background: #fff; min-height: 100%; }
.mok h3 { font-family: var(--font-display); font-weight: 400; font-size: 27px; color: var(--carvao-900); }
.mok__linha { align-self: stretch; padding: 14px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }

/* entrega: mapa + app do motoboy */
.ment { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 10px; }
.ment__mapa { border: 3px solid var(--carvao-950); border-radius: 18px; box-shadow: 6px 6px 0 rgba(21,17,14,.55); }
.ment__app { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--carvao-950); color: #fff; box-shadow: 6px 6px 0 rgba(21,17,14,.35); }
.ment__id { display: flex; flex-direction: column; min-width: 0; }
.ment__id b { font-size: 14.5px; }
.ment__id small { font-size: 12.5px; color: var(--carvao-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ment__btn { flex: none; }
.ment__btn.is-ok { --btn-bg: var(--mata-500); --btn-ink: #fff; --btn-hover: var(--mata-500); }

/* sistema */
.msys { display: grid; grid-template-columns: 140px 1fr; width: 100%; max-width: 520px; border-radius: 18px; overflow: hidden; background: var(--ground); border: 3px solid var(--carvao-950); box-shadow: 6px 6px 0 rgba(21,17,14,.55); color: var(--ink); }
.msys__side { background: var(--carvao-900); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.msys__side .lg { padding: 2px 6px 10px; }
.msys__side span { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; color: var(--carvao-200); font-size: 12.5px; font-weight: 600; }
.msys__side span.on { background: var(--action); color: var(--carvao-950); }
.msys__main { padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.msys__main h4 { font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.msys__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.msys__kpis div { padding: 8px 9px; border-radius: 10px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.msys__kpis small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.msys__kpis b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 23px; color: var(--carvao-900); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.msys__kpis b i { font-style: normal; font-size: 15px; color: var(--muted); }
.msys__canais { display: flex; flex-direction: column; gap: 5px; padding: 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.msys__canal { display: grid; grid-template-columns: 92px 1fr 22px; align-items: center; gap: 8px; animation: tut-line 380ms var(--ease-out) both; }
.msys__canal .selo { height: 22px; font-size: 11.5px; padding: 0 8px; }
.msys__canal b { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.msys__barra { height: 10px; width: calc(var(--w) * 100%); border-radius: 5px; background: var(--c); transform-origin: 0 50%; animation: meter-in 700ms var(--ease-out) 250ms both; }
.msys__barra--proprio { --c: var(--canal-proprio); } .msys__barra--ifood { --c: var(--canal-ifood); } .msys__barra--99food { --c: var(--canal-99food); } .msys__barra--whatsapp { --c: var(--canal-whatsapp); } .msys__barra--balcao { --c: var(--canal-balcao); }
.msys__row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; animation: tut-line 380ms var(--ease-out) both; }
.msys__row .selo { margin-left: auto; height: 22px; font-size: 11.5px; padding: 0 8px; }

/* log de exemplo */
.mlog { width: 100%; max-width: 440px; padding: 16px; border-radius: 18px; background: #fff; color: var(--ink); border: 3px solid var(--carvao-950); box-shadow: 6px 6px 0 rgba(21,17,14,.55); }
.mlog .log__list { max-height: none; overflow: visible; }

/* roteiro desenhado */
.mroute { position: relative; width: 100%; max-width: 430px; }
.mroute .line { position: absolute; left: 27px; top: 29px; width: 4px; height: calc(100% - 58px); border-radius: 3px; background: var(--carvao-950); transform: scaleY(0); transform-origin: 50% 0; }
.mroute.is-in .line { animation: route-draw 1300ms var(--ease-in-out) 150ms forwards; }
@keyframes route-draw { to { transform: none; } }
.mroute ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; position: relative; }
.mroute li { display: flex; align-items: center; gap: 14px; animation: tut-line 420ms var(--ease-out) both; }
.mroute .dot { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--carvao-950); border: 3px solid var(--sol-400); color: var(--sol-400); box-shadow: 4px 4px 0 rgba(21,17,14,.35); }
.mroute li b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; color: var(--carvao-950); }
.mroute li small { display: block; color: var(--carvao-900); font-size: 14px; font-weight: 600; }

@media (max-width: 980px) {
  .tut { grid-template-columns: 1fr; min-height: 0; }
  .tut__vis { min-height: 0; }
  .tut__stage { position: relative; inset: auto; min-height: 460px; padding: 28px 20px 36px; }
  .tut__scene.is-out { padding: 28px 20px 36px; }
}
@media (max-width: 640px) {
  .tut-wrap { padding: 14px 16px 32px; }
  .tut { border-radius: 20px; }
  .tut__stage { min-height: 420px; padding: 22px 12px 30px; }
  .tut__body { padding: 22px 18px 18px; }
  .tut__dots { display: none; }
  .tut__marca svg { width: 360px; }
  .tsc-phone { zoom: .66; }
  .tsc-phone .phone { --ph-h: 640px; }
  .tsc-logo svg { width: 156px; height: 156px; }
  .tsc-grid { grid-template-columns: 1fr; gap: 8px; }
  .tsc-tile { padding: 10px; }
  .tsc-bar span { padding: 6px 6px; font-size: 11px; }
  .msys { grid-template-columns: 1fr; }
  .msys__side { flex-direction: row; overflow: hidden; }
  .msys__side .lg { display: none; }
  .msys__side span { padding: 6px; font-size: 11.5px; }
  .tut__nav .btn { padding-inline: 13px; }
  .ment__app { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .tut__vis { transition: none; }
}
