/* ---------- Apresentação (keynote em rolagem) ---------- */
html, body { height: 100%; }
body.deck { overflow: hidden; background: var(--night); }
.deck-scroll {
  height: 100svh; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.scene {
  position: relative; height: 100svh; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; place-items: center; overflow: hidden; background: var(--paper);
}
.scene.dark { background: radial-gradient(120% 90% at 80% 10%, #262a6b 0%, var(--night) 55%); color: #fff; }
.stage {
  position: relative; container-type: size;
  width: min(100vw, 177.78svh); height: min(100svh, 56.25vw);
  --t-hero: 9.2cqw; --t-h: 3.9cqw; --t-lead: 1.55cqw; --t-body: 1.12cqw; --t-small: .9cqw;
  --gap: 2.2cqw; --pad-x: 6cqw;
}
.stage-grid {
  position: absolute; inset: 11cqh var(--pad-x) 10cqh; display: grid;
  grid-template-columns: 34fr 58fr; gap: 5cqw; align-items: center;
}
.copy { display: flex; flex-direction: column; gap: 1.6cqw; min-width: 0; }
.kicker { font: 600 var(--t-small)/1.2 var(--text); color: var(--brand); letter-spacing: 0; }
.dark .kicker { color: #aeb2ff; }
.copy h2 {
  margin: 0; font: 700 var(--t-h)/1.02 var(--display); letter-spacing: -.035em; text-wrap: balance;
}
.lead { margin: 0; font: 400 var(--t-lead)/1.4 var(--text); color: var(--muted); text-wrap: pretty; max-width: 34ch; }
.dark .lead { color: rgba(255,255,255,.72); }
.facts { list-style: none; margin: .4cqw 0 0; padding: 0; display: grid; gap: 1cqw; }
.facts li { display: grid; grid-template-columns: 1.9cqw 1fr; gap: .9cqw; align-items: start;
  font: 400 var(--t-body)/1.42 var(--text); color: var(--ink); }
.dark .facts li { color: rgba(255,255,255,.9); }
.facts li b { font-weight: 600; }
.facts .ico { width: 1.9cqw; height: 1.9cqw; border-radius: 30%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); }
.dark .facts .ico { background: rgba(174,178,255,.14); color: #c5c8ff; }
.facts .ico svg { width: 60%; height: 60%; stroke-width: 2; }
.note {
  display: inline-flex; gap: .7cqw; align-items: flex-start; padding: .9cqw 1.1cqw; border-radius: 1cqw;
  background: #FFF4E5; color: #6b3500; font: 500 var(--t-body)/1.4 var(--text); max-width: 40ch;
}
.note svg { flex: none; width: 1.3cqw; height: 1.3cqw; margin-top: .15cqw; }
.note.info { background: var(--brand-soft); color: #262a7a; }
.dark .note.info { background: rgba(174,178,255,.14); color: #dfe1ff; }

.vis { position: relative; min-width: 0; height: 100%; }

/* rodapé do deck */
.deck-ui { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.deck-count { pointer-events: auto; font: 600 12px/1 var(--text); color: var(--muted); font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 8px 12px; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); }
.deck-nav { pointer-events: auto; display: flex; gap: 6px; }
.deck-nav button { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.75); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.deck-nav button:hover { background: #fff; }
.deck-nav svg { width: 18px; height: 18px; }
.deck-progress { position: fixed; z-index: 41; top: 0; left: 0; height: 3px; width: 0; background: var(--brand); transition: width .5s var(--ease); }
body.on-dark .deck-count, body.on-dark .deck-nav button { background: rgba(20,22,58,.5); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }

/* ---------- Entradas coreografadas ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 90ms + 120ms); }
.is-active .rv { opacity: 1; transform: none; }

/* ---------- Lente (zoom da tela para o recorte) ---------- */
.lens { position: absolute; z-index: 5; border-radius: 1.1cqw; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 1px rgba(20,22,58,.08), var(--shadow-lg); transform-origin: 0 0; opacity: 0; }
.lens img { width: 100%; height: auto; }
.lens.ready { transition: transform 1.1s var(--ease), opacity .35s ease; }
.lens.in { opacity: 1; transform: none !important; }
.region { position: absolute; z-index: 4; border: 2px solid var(--brand); border-radius: 8px; background: rgba(72,77,181,.08);
  opacity: 0; transition: opacity .5s ease .1s; pointer-events: none; }
.region.in { opacity: 1; }
.lens-cap { position: absolute; z-index: 6; font: 600 var(--t-small)/1.2 var(--text); color: var(--ink);
  background: #fff; padding: .45cqw .8cqw; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap;
  opacity: 0; transform: translateY(6px); transition: all .5s var(--ease); }
.is-active .lens-cap.in { opacity: 1; transform: none; }

/* marcadores numerados */
.shot { position: relative; }
.pin { position: absolute; z-index: 7; width: 2cqw; height: 2cqw; margin: -1cqw 0 0 -1cqw; border-radius: 50%;
  background: var(--brand); color: #fff; font: 700 1cqw/2cqw var(--text); text-align: center;
  box-shadow: 0 0 0 .3cqw rgba(255,255,255,.95), 0 4px 14px rgba(72,77,181,.5);
  transform: scale(0); transition: transform .5s cubic-bezier(.34,1.56,.64,1); transition-delay: calc(var(--d, 0) * 160ms + 1400ms); }
.is-active .pin { transform: scale(1); }
.pin::after { content: ""; position: absolute; inset: -.5cqw; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; }
.is-active .pin::after { animation: ping 2.4s ease-out calc(var(--d, 0) * 160ms + 1900ms) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .8cqw; counter-reset: lg; }
.legend li { display: grid; grid-template-columns: 1.8cqw 1fr; gap: .8cqw; font: 400 var(--t-body)/1.4 var(--text); }
.legend li::before { counter-increment: lg; content: counter(lg); width: 1.8cqw; height: 1.8cqw; border-radius: 50%;
  background: var(--brand); color: #fff; font: 700 .9cqw/1.8cqw var(--text); text-align: center; }
.legend b { font-weight: 600; }

/* ---------- Cena 1: capa com comanda imprimindo ---------- */
.cover-grid { position: absolute; inset: 0 var(--pad-x); display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 4cqw; }
.cover h1 { margin: 0; font: 800 var(--t-hero)/.9 var(--display); letter-spacing: -.055em; }
.cover .sub { margin: 2.2cqw 0 0; font: 500 2.3cqw/1.2 var(--display); letter-spacing: -.02em; color: rgba(255,255,255,.86); max-width: 20ch; text-wrap: balance; }
.cover .by { margin-top: 4cqw; display: flex; gap: 1.4cqw; align-items: center; font: 500 1.1cqw/1.3 var(--text); color: rgba(255,255,255,.62); }
.cover .by span + span::before { content: ""; display: inline-block; width: .35cqw; height: .35cqw; border-radius: 50%; background: currentColor; margin-right: 1.4cqw; vertical-align: middle; }
.printer { position: relative; width: 25cqw; margin-inline: auto; }
.printer-body { position: relative; z-index: 2; height: 7cqw; border-radius: 1.4cqw 1.4cqw .6cqw .6cqw;
  background: linear-gradient(#2b2f6e, #1c1f4c); box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, 0 20px 40px rgba(0,0,0,.35); }
.printer-body::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: 1.1cqw; height: .5cqw; border-radius: 999px; background: #0c0d24; }
.printer-body::after { content: ""; position: absolute; right: 1.4cqw; top: 1.4cqw; width: .6cqw; height: .6cqw; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 1cqw #3ddc84; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.paper-clip { position: relative; z-index: 1; margin: -1.4cqw 10% 0; height: 30cqw; overflow: hidden; }
.ticket {
  position: absolute; left: 0; right: 0; top: 0; padding: 2.6cqw 1.8cqw 2cqw; background: #fbfbf8; color: #1b1b1b;
  font: 500 1cqw/1.55 var(--mono); transform: translateY(-100%);
  -webkit-mask: radial-gradient(circle at 50% 100%, transparent .45cqw, #000 .5cqw) bottom / 1.2cqw 100% repeat-x;
          mask: radial-gradient(circle at 50% 100%, transparent .45cqw, #000 .5cqw) bottom / 1.2cqw 100% repeat-x;
  box-shadow: 0 30px 40px rgba(0,0,0,.25);
}
.is-active .ticket { animation: print 3.6s steps(22, end) .5s forwards; }
@keyframes print { to { transform: translateY(0); } }
.ticket .t-center { text-align: center; }
.ticket .t-big { font-size: 1.5cqw; font-weight: 800; letter-spacing: .02em; }
.ticket hr { border: 0; border-top: 1px dashed #999; margin: .7cqw 0; }
.ticket .t-row { display: flex; justify-content: space-between; gap: 1cqw; }
.ticket .t-obs { margin-top: .4cqw; padding: .2cqw .5cqw; background: #1b1b1b; color: #fbfbf8; display: inline-block; }

/* ---------- Diagrama de fluxo ---------- */
.flow { position: absolute; inset: 0; }
.flow svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow .path { fill: none; stroke: rgba(72,77,181,.28); stroke-width: 2; stroke-dasharray: 6 7; }
.dark .flow .path { stroke: rgba(174,178,255,.35); }
.flow .path.draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.is-active .flow .path.draw { transition: stroke-dashoffset 1.4s var(--ease) .4s; stroke-dashoffset: 0; }
.node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: .6cqw; text-align: center; }
.node .bubble { width: 6.4cqw; height: 6.4cqw; border-radius: 1.8cqw; display: grid; place-items: center;
  background: #fff; color: var(--brand); box-shadow: 0 0 0 1px var(--line), var(--shadow); transition: transform .4s var(--ease), box-shadow .4s; }
.dark .node .bubble { background: rgba(255,255,255,.07); color: #d7d9ff; box-shadow: 0 0 0 1px rgba(255,255,255,.14); }
.node .bubble svg { width: 44%; height: 44%; stroke-width: 1.75; }
.node .bubble.hit { transform: scale(1.08); box-shadow: 0 0 0 2px var(--brand), 0 10px 30px rgba(72,77,181,.35); }
.node strong { font: 600 1.05cqw/1.2 var(--text); }
.node small { font: 400 .85cqw/1.3 var(--text); color: var(--muted); max-width: 13cqw; }
.dark .node small { color: rgba(255,255,255,.6); }
.token { position: absolute; z-index: 3; left: 0; top: 0; padding: .35cqw .7cqw; border-radius: 999px; font: 600 .85cqw/1 var(--text);
  background: var(--brand); color: #fff; white-space: nowrap; box-shadow: 0 6px 16px rgba(72,77,181,.4); opacity: 0; pointer-events: none; }
.token.pizza { background: #C2410C; box-shadow: 0 6px 16px rgba(194,65,12,.35); }
.token.bar { background: #0E7490; box-shadow: 0 6px 16px rgba(14,116,144,.35); }
.token.ok { background: var(--ok); box-shadow: 0 6px 16px rgba(36,138,61,.35); }

/* cartões soltos (recortes) */
.card { position: absolute; border-radius: 1.1cqw; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(20,22,58,.06), var(--shadow-lg); }
.card img { width: 100%; height: auto; }
.card-cap { position: absolute; font: 600 var(--t-small)/1.25 var(--text); color: var(--muted); }
.dark .card-cap { color: rgba(255,255,255,.7); }

/* números que contam */
.stat { display: flex; flex-direction: column; gap: .3cqw; }
.stat .big { font: 700 5cqw/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat .lbl { font: 500 var(--t-body)/1.3 var(--text); color: var(--muted); }
.dark .stat .lbl { color: rgba(255,255,255,.65); }
.stats { display: flex; gap: 3cqw; margin-top: .6cqw; }

/* cena offline */
.off-status { position: absolute; left: 50%; top: 96%; transform: translateX(-50%); display: flex; gap: .7cqw; align-items: center;
  padding: .7cqw 1.2cqw; border-radius: 999px; font: 600 1cqw/1 var(--text); background: #FFF4E5; color: #8a4200; box-shadow: var(--shadow); white-space: nowrap; transition: background .4s, color .4s; }
.off-status .dot { width: .7cqw; height: .7cqw; border-radius: 50%; background: #F59E0B; }
.off-status.online { background: #E8F5EC; color: #1b6b30; }
.off-status.online .dot { background: var(--ok); }
.cloud-x { position: absolute; inset: 0; display: grid; place-items: center; }
.cloud-x::after { content: ""; position: absolute; width: 120%; height: 3px; background: var(--err); border-radius: 3px; transform: rotate(-35deg); transition: opacity .4s; }
.online-now .cloud-x::after { opacity: 0; }
.slip { position: absolute; width: 7cqw; padding: .6cqw .7cqw; background: #fbfbf8; color: #222; font: 500 .7cqw/1.4 var(--mono);
  box-shadow: 0 6px 18px rgba(0,0,0,.18); border-radius: 2px; transform-origin: 50% 0; }

/* check de sucesso */
.check { width: 8cqw; height: 8cqw; border-radius: 2.2cqw; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); }
.check svg { width: 60%; height: 60%; }
.check circle { fill: none; stroke: rgba(36,138,61,.18); stroke-width: 3; }
.check path { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
.check.go path { transition: stroke-dashoffset .6s var(--ease) .15s; stroke-dashoffset: 0; }
.check.go { animation: pop .6s cubic-bezier(.34,1.56,.64,1); }
@keyframes pop { from { transform: scale(.7); } to { transform: scale(1); } }

/* selo status */
.badge { display: inline-flex; align-items: center; gap: .5cqw; padding: .5cqw 1cqw; border-radius: 999px; font: 600 var(--t-small)/1 var(--text); }
.badge.off { background: #F2F2F7; color: #3a3a3c; box-shadow: 0 0 0 1px var(--line); }
.badge.soon { background: #FFF4E5; color: #8a4200; }
.badge .dot { width: .6cqw; height: .6cqw; border-radius: 50%; background: currentColor; }

/* linha do tempo */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.6cqw; }
.timeline::before { content: ""; position: absolute; left: 1.1cqw; top: 1cqw; bottom: 1cqw; width: 2px; background: rgba(255,255,255,.14); }
.timeline li { position: relative; display: grid; grid-template-columns: 2.2cqw 9cqw 1fr; gap: 1.4cqw; align-items: baseline; }
.timeline .mk { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: var(--night); box-shadow: 0 0 0 2px rgba(255,255,255,.25) inset; align-self: center; }
.timeline li.key .mk { background: var(--brand); box-shadow: 0 0 0 .4cqw rgba(72,77,181,.35); }
.timeline .when { font: 700 1.9cqw/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.timeline .what { font: 500 1.25cqw/1.35 var(--text); color: rgba(255,255,255,.88); }
.timeline .what small { display: block; font-weight: 400; font-size: .95cqw; color: rgba(255,255,255,.6); margin-top: .2cqw; }
.day { font: 700 1.2cqw/1 var(--text); color: #aeb2ff; margin-bottom: 1cqw; }

.cta-row { display: flex; gap: 1cqw; flex-wrap: wrap; }
.cta { display: inline-flex; align-items: center; gap: .6cqw; padding: 1cqw 1.6cqw; border-radius: 999px; text-decoration: none;
  font: 600 1.1cqw/1 var(--text); background: #fff; color: var(--night); }
.cta.ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset; }
.cta svg { width: 1.2cqw; height: 1.2cqw; }

/* ---------- Celular / retrato: vira página rolável ---------- */
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  body.deck { overflow: auto; }
  .deck-scroll { height: auto; overflow: visible; scroll-snap-type: none; }
  .scene { height: auto; min-height: 100svh; padding: 76px 0 72px; display: block; }
  .stage { width: 100%; height: auto; container-type: inline-size;
    --t-hero: 64px; --t-h: 30px; --t-lead: 17px; --t-body: 15px; --t-small: 13px; --pad-x: 16px; }
  .stage-grid, .cover-grid { position: static; display: flex; flex-direction: column; align-items: stretch; gap: 28px; padding: 0 16px; inset: auto; }
  .copy { gap: 14px; }
  .facts { gap: 10px; }
  .facts li { grid-template-columns: 26px 1fr; gap: 10px; }
  .facts .ico { width: 26px; height: 26px; }
  .note { padding: 12px 14px; border-radius: 12px; gap: 10px; }
  .note svg { width: 18px; height: 18px; }
  .vis { height: auto; }
  .legend li { grid-template-columns: 24px 1fr; gap: 10px; }
  .legend li::before { width: 24px; height: 24px; font-size: 12px; line-height: 24px; }
  .pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 13px; line-height: 26px; box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(72,77,181,.5); }
  .pin::after { inset: -6px; }
  .lens { border-radius: 14px; }
  .lens-cap { font-size: 12px; padding: 6px 10px; }
  .card { border-radius: 14px; }
  .cover .sub { font-size: 24px; margin-top: 16px; }
  .cover .by { font-size: 13px; margin-top: 24px; flex-wrap: wrap; gap: 10px; }
  .cover .by span + span::before { width: 4px; height: 4px; margin-right: 10px; }
  .printer { width: min(300px, 82vw); }
  .printer-body { height: 80px; border-radius: 16px 16px 8px 8px; }
  .printer-body::before { bottom: 12px; height: 6px; }
  .printer-body::after { right: 16px; top: 16px; width: 8px; height: 8px; }
  .paper-clip { margin-top: -16px; height: 340px; }
  .ticket { padding: 28px 18px 22px; font-size: 11px; }
  .ticket .t-big { font-size: 17px; }
  .ticket hr { margin: 8px 0; }
  .stat .big { font-size: 44px; }
  .stats { gap: 28px; }
  .node .bubble { width: 56px; height: 56px; border-radius: 16px; }
  .node strong { font-size: 13px; }
  .node small { font-size: 11px; max-width: 110px; }
  .node { gap: 6px; }
  .token { font-size: 11px; padding: 5px 9px; }
  .off-status { font-size: 12px; padding: 8px 14px; gap: 8px; }
  .off-status .dot { width: 8px; height: 8px; }
  .slip { width: 84px; font-size: 9px; padding: 7px 8px; }
  .check { width: 84px; height: 84px; border-radius: 22px; }
  .badge { font-size: 13px; padding: 7px 12px; gap: 7px; }
  .badge .dot { width: 7px; height: 7px; }
  .timeline { gap: 18px; }
  .timeline::before { left: 11px; }
  .timeline li { grid-template-columns: 24px 88px 1fr; gap: 12px; }
  .timeline .mk { width: 24px; height: 24px; }
  .timeline .when { font-size: 22px; }
  .timeline .what { font-size: 15px; }
  .timeline .what small { font-size: 13px; }
  .day { font-size: 14px; margin-bottom: 12px; }
  .cta { font-size: 15px; padding: 13px 18px; gap: 8px; }
  .cta svg { width: 16px; height: 16px; }
  .card-cap { font-size: 12px; }
  .deck-ui { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .deck-scroll { scroll-behavior: auto; }
  .rv { transition: none; opacity: 1; transform: none; }
  .lens.ready { transition: opacity .2s; }
  .pin { transition: none; transform: scale(1); }
  .is-active .pin::after { animation: none; }
  .is-active .ticket { animation: none; transform: none; }
  .ticket { transform: none; }
  .flow .path.draw { stroke-dashoffset: 0; }
  .check path { stroke-dashoffset: 0; }
  .printer-body::after { animation: none; }
}
