/* fontes: css/fonts.css (gerado por build.ps1) */

:root {
  --bg: #eef0ff;
  --ink: #16171b;
  --ink-2: #5a6070;
  --blue: #0f33ff;
  --magenta: #d91c5c;
  --lav: #9fadff;
  --amber: #f5a524;
  --line: rgba(15, 51, 255, 0.14);
  --oil: #d91c5c; --gas: #2fbf71; --water: #00b8d9; --mix: #7a86ff;
  --shadow: 0 10px 30px rgba(15, 51, 255, 0.10), 0 2px 6px rgba(22, 23, 27, 0.06);
  --col: clamp(380px, 34vw, 480px);
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: 'Montserrat', system-ui, sans-serif; }
button { font: inherit; cursor: pointer; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ palco 3D */
.stage { position: fixed; top: 0; left: 0; bottom: 0; right: var(--col); }
#scene { width: 100%; height: 100%; display: block; }
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#flash { position: absolute; inset: 0; background: #16171b; opacity: 0; pointer-events: none; }
#flash.go { animation: blink 1.6s; }
@keyframes blink { 0%, 100% { opacity: 0; } 15% { opacity: .55; } 25% { opacity: .05; } 35% { opacity: .5; } 60% { opacity: 0; } }
.stage-legend { position: absolute; left: 20px; bottom: 20px; display: flex; gap: 14px; background: rgba(255,255,255,.85); padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow); }
.stage-hint { position: absolute; right: 20px; bottom: 20px; font-size: 11.5px; color: var(--ink-2); opacity: .7; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.dot.oil { background: var(--oil); } .dot.gas { background: var(--gas); } .dot.water { background: var(--water); } .dot.mix { background: var(--mix); }

/* rótulos 3D */
.lab { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; background: #fff; padding: 4px 12px 4px 4px; border-radius: 999px; box-shadow: var(--shadow); font-size: 13px; font-weight: 700; white-space: nowrap; transition: opacity .35s; pointer-events: auto; }
.lab .num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; background: var(--blue); }
.lab.magenta .num { background: var(--magenta); } .lab.dark .num { background: var(--ink); } .lab.cyan .num { background: #14b8b3; }
.lab.area { cursor: pointer; }
.lab.area:hover { outline: 2px solid var(--blue); }
.lab.prod { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 12px; border-radius: 12px; border-left: 4px solid var(--magenta); }
.lab.prod b { color: var(--blue); font-size: 13px; }
.lab.prod small { font-weight: 500; color: var(--ink-2); font-size: 11.5px; }
.lab.hidden { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------ coluna da história */
.story { position: fixed; top: 0; right: 0; bottom: 0; width: var(--col); background: #fff; box-shadow: -10px 0 40px rgba(15, 51, 255, .08); display: flex; flex-direction: column; z-index: 5; }
.story-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 12px; gap: 10px; }
.brand { display: flex; gap: 10px; align-items: center; }
.logo { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; flex: none; }
.logo img { width: 24px; height: auto; }
.logo.big { width: 72px; height: 72px; margin: 0 auto 20px; }
.logo.big img { width: 46px; }
.ttl { font-weight: 800; font-size: 15px; }
.seg { display: flex; background: #f1f3ff; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.seg button.on { background: var(--blue); color: #fff; }

/* capítulos */
.chapters { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; padding: 0 20px 4px; }
.chapters button { border: 0; background: none; padding: 6px 0 0; position: relative; text-align: left; }
.chapters button::before { content: ''; display: block; height: 4px; border-radius: 3px; background: #e3e7fb; }
.chapters button .p { position: absolute; top: 6px; left: 0; height: 4px; border-radius: 3px; background: var(--blue); width: 0; transition: width .4s; }
.chapters button .n { display: block; font-size: 10.5px; font-weight: 700; color: #a3aac2; margin-top: 4px; text-align: center; }
.chapters button.on .n { color: var(--blue); }
.chapters button.sh .n::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--magenta); margin-left: 3px; vertical-align: 1px; }
.chapters button:hover .n { color: var(--ink); }

.story-body { flex: 1; overflow-y: auto; padding: 18px 24px 12px; scrollbar-width: thin; }
.scene-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.scene-num { width: 44px; height: 44px; border-radius: 12px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex: none; transition: background .3s; }
.scene-head h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; line-height: 1.15; }
.chapter-tag { display: inline-flex; align-items: center; gap: 8px; background: #fde3ec; color: var(--magenta); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; }
.chapter-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
body.shape-step .scene-num { background: var(--magenta); }
.fala { font-size: 18px; line-height: 1.55; font-weight: 500; margin: 0 0 18px; min-height: 56px; }

/* mídia do passo */
.media { animation: rise .5s ease; }
.media:empty { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.m-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.m-label .tag { background: var(--ink); color: #fff; padding: 3px 8px; border-radius: 6px; letter-spacing: .06em; }
.m-label .tag.real { background: #14b8b3; }
.m-label .tag.demo { background: var(--magenta); }
.m-frame { position: relative; border-radius: 12px; overflow: hidden; background: #0d1030; cursor: zoom-in; box-shadow: var(--shadow); }
.m-frame img, .m-frame video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.m-frame video { object-fit: contain; background: #0d1030; }
.m-frame .expand { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--ink); font-size: 15px; display: grid; place-items: center; }
.m-cap { font-size: 12.5px; color: var(--ink-2); margin: 8px 2px 0; line-height: 1.45; }
.m-strip { display: flex; gap: 6px; margin-top: 8px; }
.m-strip button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; width: 64px; height: 42px; background: none; opacity: .65; }
.m-strip button.on { border-color: var(--blue); opacity: 1; }
.m-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* "o que acontece aqui" */
.area-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fafbff; }
.area-box h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.area-box p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.area-box .flows { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); }

/* produto: apresentação */
.prod-intro { border-radius: 14px; padding: 16px 18px; background: linear-gradient(160deg, #fff 0%, #fdf1f6 100%); border: 1px solid #f6c3d5; }
.prod-intro h3 { margin: 0 0 2px; font-size: 21px; font-weight: 800; color: var(--blue); }
.prod-intro .tagline { font-size: 12.5px; font-weight: 600; color: var(--magenta); }
.prod-intro .q { margin: 12px 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.prod-intro .how { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.prod-intro .how li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.prod-intro .how li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.prod-intro .how b { color: var(--ink); display: block; }
.prod-intro .for { margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.prod-intro .for b { color: var(--ink); }

/* painéis de produto (telas ilustrativas) */
.card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fafbff; }
.card .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.status { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.status.warn { color: #b26b00; }
.spark { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.spark span { width: 76px; }
.spark svg { flex: 1; height: 44px; }
.ax { stroke: #c9cfe8; stroke-width: 1; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.list li span { color: var(--ink-2); text-align: right; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.warn { background: #fff1d6; color: #9a5d00; }
.pill.crit { background: #fde3ec; color: var(--magenta); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: #eef0ff; color: var(--ink-2); }
.chip.on { background: var(--blue); color: #fff; }
.chip.done { background: #dfe5ff; color: var(--blue); }
.arr { font-style: normal; color: var(--lav); font-size: 12px; }
.res { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.res b { color: var(--ink); font-size: 13px; }
.note { margin: 10px 0 0; font-size: 12px; color: var(--ink-2); line-height: 1.45; }
.gauges { display: grid; gap: 8px; }
.gauges > div { display: grid; grid-template-columns: 70px 1fr; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.bar { height: 10px; background: #e6e9fb; border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 6px; }
.bar i.up { background: var(--amber); animation: grow 2.4s ease-in-out infinite alternate; }
@keyframes grow { from { width: 64%; } to { width: 88%; } }
svg.curve, svg.timeline { width: 100%; height: auto; }
svg .t { font-size: 10px; fill: var(--ink-2); font-family: 'Montserrat'; }
svg .t.b { font-weight: 700; fill: var(--ink); }
svg .t.s { fill: var(--magenta); }
.surge { fill: none; stroke: var(--magenta); stroke-width: 2; stroke-dasharray: 5 4; }
.op { fill: none; stroke: var(--lav); stroke-width: 1.6; }
.op.dim { opacity: .5; }
.win { fill: #f1f3ff; stroke: #dfe3ff; }
.win.ev { fill: #fde3ec; }
.tags { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tag-box { border-radius: 10px; padding: 8px; text-align: center; background: #fff; border: 1px solid var(--line); }
.tag-box b { display: block; font-size: 20px; }
.tag-box span { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.tag-box.crit b { color: var(--magenta); } .tag-box.deg b { color: #b26b00; } .tag-box.ok b { color: var(--gas); }
.who { margin-top: 12px; }
.who > span { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.who div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.who i { font-style: normal; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--blue); color: var(--blue); }
.disclaimer { margin: 10px 0 0; font-size: 10.5px; color: #8a90a2; }

/* rodapé da coluna */
.story-foot { border-top: 1px solid #eef0fb; padding: 12px 20px 16px; display: grid; gap: 10px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: #c9cfe8; position: relative; transition: .25s; flex: none; }
.switch .track i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .25s; }
.switch input:checked + .track { background: var(--magenta); }
.switch input:checked + .track i { left: 19px; }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }
.cap-ctrl { display: flex; gap: 8px; align-items: center; }
.cap-ctrl button { border: 1px solid var(--line); background: #fff; height: 40px; min-width: 40px; border-radius: 999px; font-weight: 700; color: var(--blue); }
.cap-ctrl .next { background: var(--blue); color: #fff; border-color: var(--blue); padding: 0 20px; }
.cap-ctrl .next:hover { background: #0a28d6; }
body.shape-step .cap-ctrl .next { background: var(--magenta); border-color: var(--magenta); }
.dots { display: flex; gap: 4px; margin-right: auto; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #d3d8f2; transition: .3s; }
.dots i.on { background: var(--blue); width: 16px; border-radius: 4px; }
.dots i.sh { background: #f6c3d5; }
.dots i.sh.on { background: var(--magenta); }

/* ------------------------------------------------------------------ overlays */
.overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(238, 240, 255, 0.6); backdrop-filter: blur(4px); transition: opacity .6s; }
.overlay.fade { opacity: 0; pointer-events: none; }
.intro-box, .outro-box { text-align: center; max-width: 560px; padding: 32px; }
.intro h1 { font-size: clamp(36px, 6vw, 64px); margin: 10px 0 14px; font-weight: 800; letter-spacing: -.02em; }
.intro p { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; }
.intro-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.intro-meta span { background: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow); }
.cta { border: 0; background: var(--blue); color: #fff; font-weight: 700; padding: 14px 28px; border-radius: 999px; font-size: 15px; box-shadow: 0 8px 20px rgba(15, 51, 255, .3); }
.cta:hover { background: #0a28d6; }
.ghost { border: 1px solid var(--blue); background: #fff; color: var(--blue); font-weight: 700; padding: 13px 24px; border-radius: 999px; font-size: 15px; }
.badge { right: var(--col); }
/* portaria: arrastar o crachá até o leitor */
.gate { display: grid; justify-items: center; gap: 22px; padding: 16px; max-width: 100%; }
.gate-hint { margin: 0; font-weight: 700; font-size: 15px; color: var(--ink); text-align: center; }
.gate-row { display: flex; align-items: center; gap: clamp(24px, 6vw, 80px); }
.gate-arrow { color: var(--blue); font-weight: 800; font-size: 22px; letter-spacing: -2px; animation: nudge 1.4s ease-in-out infinite; transition: opacity .3s; }
.gate.dragging .gate-arrow, .gate.ok .gate-arrow { opacity: 0; }
@keyframes nudge { 0%, 100% { transform: translateX(0); opacity: .4; } 50% { transform: translateX(8px); opacity: 1; } }
.badge-card { position: relative; z-index: 2; width: 220px; background: #fff; border-radius: 16px; padding: 0 0 16px; box-shadow: 0 20px 50px rgba(15, 51, 255, .22); text-align: center; overflow: hidden; cursor: grab; touch-action: none; user-select: none; transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.badge-card:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
.badge-card.dragging { cursor: grabbing; transition: box-shadow .2s; box-shadow: 0 30px 60px rgba(15, 51, 255, .3); }
.badge-hole { position: absolute; top: 7px; left: 50%; width: 34px; height: 7px; margin-left: -17px; border-radius: 4px; background: rgba(255, 255, 255, .55); }
.badge-top { background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px 12px 12px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.badge-top img { width: 18px; pointer-events: none; }
.badge-photo { width: 72px; height: 72px; border-radius: 50%; margin: 18px auto 10px; background: linear-gradient(135deg, var(--blue), var(--magenta)); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 800; }
.badge-name { font-weight: 800; font-size: 16px; }
.badge-role { color: var(--ink-2); font-size: 12.5px; margin: 4px 0 12px; }
.badge-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--ink-2); }
.badge-chip i { width: 22px; height: 16px; border-radius: 3px; background: linear-gradient(135deg, #f7d58a, var(--amber)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.reader { width: 150px; height: 210px; border-radius: 22px; background: #141a3d; color: #8f9cff; display: grid; justify-items: center; align-content: center; gap: 16px; box-shadow: 0 18px 40px rgba(10, 14, 40, .3), inset 0 0 0 2px rgba(255, 255, 255, .06); transition: box-shadow .25s, color .25s; }
.reader-led { width: 60px; height: 6px; border-radius: 3px; background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.reader-nfc { width: 56px; height: 56px; }
.reader-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); text-align: center; padding: 0 10px; }
.reader.near { color: #fff; box-shadow: 0 0 0 4px var(--blue), 0 0 40px rgba(15, 51, 255, .6); }
.reader.ok { color: var(--gas); box-shadow: 0 0 0 4px var(--gas), 0 0 40px rgba(47, 191, 113, .55); }
.reader.ok .reader-led { background: var(--gas); box-shadow: 0 0 14px var(--gas); animation: none; }
.reader.ok .reader-label { color: #fff; }
.badge-card.ok { cursor: default; box-shadow: 0 0 0 4px var(--gas), 0 20px 50px rgba(47, 191, 113, .25); }
.badge-ok { visibility: hidden; color: var(--gas); font-weight: 800; font-size: 17px; }
.gate.ok .badge-ok { visibility: visible; animation: pop .5s; }
@media (max-width: 520px) {
  .gate-row { flex-direction: column; gap: 18px; }
  .gate-arrow { transform: rotate(90deg); animation: none; }
  .badge-card { width: 190px; }
  .reader { width: 190px; height: 100px; display: flex; align-items: center; justify-content: center; gap: 12px; }
  .reader-led { width: 6px; height: 44px; }
  .reader-nfc { width: 40px; height: 40px; }
  .reader-label { width: 80px; padding: 0; text-align: left; }
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.outro { right: var(--col); background: rgba(238, 240, 255, 0.8); }
.outro .line1, .outro .line2 { font-size: clamp(28px, 4vw, 46px); font-weight: 800; margin: 0; letter-spacing: -.01em; }
.outro .line2 { color: var(--blue); }
.end-btns { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 30; background: rgba(10, 14, 40, .9); display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: 90vw; }
.lightbox img, .lightbox video { max-width: 90vw; max-height: 82vh; border-radius: 10px; display: block; }
.lightbox figcaption { color: #fff; margin-top: 10px; font-size: 14px; }
.lightbox .close { position: absolute; top: 20px; right: 20px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 24px; }

/* modo livre */
body.free .story-foot .cap-ctrl { display: none; }

/* ------------------------------------------------------------------ telas estreitas: história embaixo */
@media (max-width: 860px) {
  :root { --col: 100vw; }
  .stage { right: 0; bottom: 56vh; }
  .story { top: auto; height: 56vh; width: 100%; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(15, 51, 255, .1); }
  .story-top { padding: 10px 16px 6px; }
  .brand > div { display: none; }
  .chapters { padding: 0 16px 2px; }
  .story-body { padding: 12px 16px 8px; }
  .scene-head { margin-bottom: 8px; }
  .scene-num { width: 36px; height: 36px; font-size: 16px; }
  .scene-head h2 { font-size: 18px; }
  .fala { font-size: 15.5px; margin-bottom: 12px; }
  .stage-hint { display: none; }
  .stage-legend { left: 10px; bottom: 10px; gap: 8px; font-size: 11px; padding: 6px 10px; }
  .badge, .outro { right: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
