/* =========================================================
   BE Tecnologia — camada visual: vídeos, fotos, abas e animações
   ========================================================= */

/* ---------- Vídeo de fundo nos heróis ---------- */
.has-video { position: relative; isolation: isolate; }
.has-video::before { display: none; }
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--navy); }
.hero-video, .hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.has-video::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 22, 44, .94) 0%, rgba(8, 22, 44, .78) 48%, rgba(8, 22, 44, .45) 100%),
              linear-gradient(0deg, rgba(8, 22, 44, .7), transparent 40%);
  width: auto; height: auto; right: 0; top: 0; border-radius: 0; opacity: 1;
}
@media (max-width: 760px) { .has-video::after { background: linear-gradient(180deg, rgba(8, 22, 44, .72), rgba(8, 22, 44, .92)); } }
.hero.has-video { min-height: min(88vh, 760px); display: flex; align-items: center; }
.hero.has-video .container { width: 100%; }
.page-hero.has-video { min-height: 460px; display: flex; align-items: center; }
.page-hero.has-video .container { width: 100%; }
.video-toggle {
  position: absolute; right: 16px; top: 16px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(8, 22, 44, .55); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px);
}
.video-toggle:hover { background: rgba(8, 22, 44, .8); }
.video-toggle .icon-play { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }
@media (min-width: 760px) { .video-toggle { right: 24px; top: auto; bottom: 24px; } }
.hero-lead-short { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: #DCE5F1; max-width: 560px; margin-bottom: 30px; }

/* ---------- Cartões com foto ---------- */
.photo-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--navy); color: #fff; min-height: 380px; text-decoration: none; isolation: isolate; box-shadow: var(--shadow); }
.photo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.photo-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 22, 44, .05) 20%, rgba(8, 22, 44, .92) 78%); }
.photo-card:hover img { transform: scale(1.05); }
.photo-card .pc-body { margin-top: auto; padding: 26px; }
.photo-card .seg-label { color: #fff; }
.photo-card .seg-label .dot { background: var(--seg); }
.photo-card h3 { color: #fff; font-size: 1.35rem; margin-bottom: 14px; }
.photo-card .link-arrow { color: #fff; }
.photo-card .link-arrow::after { content: ""; position: absolute; inset: 0; }
.photo-card:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }
.photo-card .link-arrow:focus-visible { outline: none; }

/* Imagem simples com cantos e sombra */
.media-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--gray-100); }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tall { aspect-ratio: 4 / 5; }
.media-wide { aspect-ratio: 16 / 10; }

/* ---------- Cena com "detecção" da IA (ilustração animada) ---------- */
.scene { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--navy); box-shadow: var(--shadow-lg); }
.scene > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene.wide { aspect-ratio: 16 / 10; }
.scene .ov { position: absolute; inset: 0; }
.scene-badge { position: absolute; right: 10px; bottom: 10px; padding: 4px 9px; border-radius: 999px; background: rgba(8, 22, 44, .7); color: #fff; font: 600 .7rem/1.2 var(--font-body); letter-spacing: .04em; text-transform: uppercase; backdrop-filter: blur(4px); }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .28), rgba(34, 211, 238, .55) 96%, transparent); opacity: 0; }
.ov-box { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); border: 2px solid var(--cyan); border-radius: 8px; box-shadow: 0 0 0 1px rgba(8, 22, 44, .35), 0 0 18px rgba(34, 211, 238, .35); }
.ov-box b { position: absolute; left: -2px; bottom: calc(100% + 4px); white-space: nowrap; padding: 3px 7px; border-radius: 6px; background: var(--cyan); color: var(--navy); font: 700 .7rem/1.2 var(--font-body); }
.ov-box.below b { bottom: auto; top: calc(100% + 4px); }
.ov-box.warn { border-color: #F59E0B; box-shadow: 0 0 0 1px rgba(8, 22, 44, .35), 0 0 22px rgba(245, 158, 11, .5); }
.ov-box.warn b { background: #F59E0B; color: #1F1300; }
.ov-box.zone { border-style: dashed; background: rgba(245, 158, 11, .12); }
.ov-chip { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 130px); padding: 9px 13px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: var(--navy); font: 600 .82rem/1.3 var(--font-body); box-shadow: var(--shadow); }
.ov-chip .icon { color: var(--blue-700); }
.ov-chip.right { left: auto; right: 12px; }
.ov-chip.top { bottom: auto; top: 12px; }

.is-playing .scan { animation: scanDown 1.6s var(--ease) .1s 1 both; }
.is-playing .ov-box { animation: boxIn .45s var(--ease) var(--d, .8s) 1 both; }
.is-playing .ov-box.warn { animation: boxIn .45s var(--ease) var(--d, .8s) 1 both, warnPulse 1.2s ease-in-out calc(var(--d, .8s) + .5s) 3; }
.is-playing .ov-chip { animation: chipIn .5s var(--ease) var(--d, 2s) 1 both; }
@keyframes scanDown { 0% { opacity: 0; transform: translateY(-100%); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(560%); } }
@keyframes boxIn { from { opacity: 0; transform: scale(1.15); } to { opacity: 1; transform: none; } }
@keyframes warnPulse { 50% { box-shadow: 0 0 0 1px rgba(8, 22, 44, .35), 0 0 34px rgba(245, 158, 11, .9); } }
@keyframes chipIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Com JavaScript, os elementos animados começam ocultos e aparecem quando a cena entra na tela */
.js .ov-box, .js .ov-chip, .js .mock-toast, .js .chart-dot, .js .doc-btn { opacity: 0; }

/* ---------- Painéis ilustrativos (mockups animados) ---------- */
.mock { position: relative; height: 100%; min-height: 300px; border-radius: var(--radius-lg); background: #0E2546; color: #DCE5F1; padding: 20px; box-shadow: var(--shadow-lg); overflow: hidden; font-size: .9rem; display: flex; flex-direction: column; }
.mock::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; }
.mock > * { position: relative; }
.mock-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.mock-title { display: inline-flex; align-items: center; gap: 8px; font: 600 .92rem var(--font-head); color: #fff; }
.mock-title .icon { color: var(--cyan); }
.mock-live { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: #9FB3CC; }
.mock-live i { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.mock-status { font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: rgba(245, 158, 11, .16); color: #FCD34D; white-space: nowrap; }
.mock-value { font: 700 2.2rem/1 var(--font-head); color: #fff; margin-bottom: 6px; }

.chart-svg { width: 100%; height: 150px; margin-top: auto; overflow: visible; }
.chart-limit { stroke: #F59E0B; stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.chart-limit-label { font-size: .72rem; color: #FCD34D; margin-top: 4px; }
.chart-area { fill: rgba(34, 211, 238, .12); }
.chart-line { fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.chart-dot { fill: #F59E0B; }
.mock-toast { position: absolute; right: 16px; top: 64px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #fff; color: var(--navy); font: 600 .8rem/1.3 var(--font-body); box-shadow: var(--shadow); max-width: 70%; }
.mock-toast .icon { color: #D97706; }
.is-playing .chart-line { animation: drawLine 1.8s var(--ease) .2s 1 both; }
.is-playing .chart-area { animation: fadeIn .8s ease 1.4s 1 both; }
.is-playing .chart-dot { animation: popIn .4s var(--ease) 1.9s 1 both; }
.is-playing .mock-toast { animation: chipIn .5s var(--ease) 2.3s 1 both; }
@keyframes drawLine { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.chart-dot { transform-box: fill-box; transform-origin: center; }

.doc-wave { display: none; align-items: center; gap: 4px; height: 44px; margin-bottom: 14px; }
.has-wave .doc-wave { display: flex; }
.doc-wave i { flex: 1; height: 30%; border-radius: 3px; background: var(--cyan); opacity: .8; }
.is-playing .doc-wave i { animation: wave 1s ease-in-out 3 alternate; }
.doc-wave i:nth-child(3n) { animation-delay: .15s !important; } .doc-wave i:nth-child(3n+1) { animation-delay: .3s !important; } .doc-wave i:nth-child(4n) { animation-delay: .45s !important; }
@keyframes wave { from { height: 18%; } to { height: 100%; } }
.doc-lines { display: grid; gap: 10px; padding: 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.doc-lines i { display: block; height: 9px; border-radius: 5px; width: var(--w); background: rgba(255, 255, 255, .28); transform-origin: left; }
.doc-lines i:first-child { background: rgba(34, 211, 238, .6); width: 40%; height: 11px; }
.is-playing .doc-lines i { animation: typeIn .5s var(--ease) both; }
.doc-lines i:nth-child(1) { animation-delay: .2s !important; } .doc-lines i:nth-child(2) { animation-delay: .5s !important; } .doc-lines i:nth-child(3) { animation-delay: .8s !important; } .doc-lines i:nth-child(4) { animation-delay: 1.1s !important; } .doc-lines i:nth-child(5) { animation-delay: 1.4s !important; } .doc-lines i:nth-child(6) { animation-delay: 1.7s !important; } .doc-lines i:nth-child(7) { animation-delay: 2s !important; }
.has-wave .doc-lines i { animation-delay: calc(var(--k, 0) * 1s + 1.2s); }
@keyframes typeIn { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
.doc-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: flex-end; }
.doc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 600; font-size: .82rem; }
.is-playing .doc-btn { animation: chipIn .5s var(--ease) 2.4s both; }

.alert-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.alert-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); }
.alert-list strong { display: block; color: #fff; font-size: .88rem; font-weight: 600; }
.alert-list small { color: #9FB3CC; font-size: .76rem; }
.alert-list .sev { width: 10px; height: 10px; border-radius: 50%; }
.is-playing .alert-list li { animation: slideIn .5s var(--ease) calc(.4s + var(--i) * .55s) both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------- Abas de aplicações ---------- */
.app-tabs { display: grid; gap: 22px; }
@media (min-width: 1000px) { .app-tabs { grid-template-columns: 300px 1fr; gap: 36px; align-items: start; } }
.tab-list { display: flex; gap: 8px; overflow-x: auto; padding: 4px; margin: -4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
@media (min-width: 1000px) { .tab-list { flex-direction: column; overflow: visible; } }
.tab-list [role="tab"] {
  flex: none; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; text-align: left;
  border-radius: 14px; border: 1px solid var(--gray-200); background: var(--white); color: var(--text);
  font: 600 .95rem/1.3 var(--font-body); cursor: pointer; transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.tab-list [role="tab"] .icon { color: var(--accent-text); flex: none; }
.tab-list [role="tab"]:hover { border-color: var(--gray-300); background: var(--gray-50); }
.tab-list [role="tab"][aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: var(--shadow); }
.tab-list [role="tab"][aria-selected="true"] .icon { color: var(--cyan); }
.tab-panel { display: grid; gap: 22px; }
@media (min-width: 760px) { .tab-panel { grid-template-columns: 1.25fr .75fr; align-items: center; gap: 32px; } }
.tab-panel:focus-visible { outline-offset: 6px; }
.tab-text h3 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); }
.tab-text p { color: var(--muted); font-size: 1.05rem; }
.js .tab-panel[hidden] { display: none; }
.no-js-gap + .tab-panel { margin-top: 32px; }

/* ---------- Faixa de desafios (compacta) ---------- */
.pain-strip { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pain { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-200); font-weight: 600; color: var(--navy); line-height: 1.3; }
.pain .icon { color: var(--accent-text); flex: none; }

/* ---------- Lista curta com ícones (benefícios) ---------- */
.mini-grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .mini-grid { grid-template-columns: 1fr 1fr; } }
.mini { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-200); }
.mini .card-icon { margin: 0; width: 44px; height: 44px; flex: none; }
.mini h3 { font-size: 1.02rem; margin: 2px 0 2px; }
.mini p { margin: 0; font-size: .93rem; color: var(--muted); line-height: 1.45; }
.section-dark .mini { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
.section-dark .mini .card-icon { background: rgba(34, 211, 238, .12); color: var(--cyan); }
.section-dark .mini p { color: #B8C6D8; }

/* Etapas compactas com fluxo animado */
.flow-split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1000px) { .flow-split { grid-template-columns: .9fr 1.1fr; gap: 56px; } }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.step-list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); }
.step-list .icon-wrap { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(34, 211, 238, .12); color: var(--cyan); }
.step-list h3 { color: #fff; font-size: 1.08rem; margin: 0; }
.step-list h3 small { font: 600 .78rem var(--font-body); color: var(--cyan); margin-left: 6px; }
.step-list p { margin: 2px 0 0; color: #B8C6D8; font-size: .95rem; }

/* Faixa de privacidade */
.trust-band { display: grid; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); background: var(--blue-50); border: 1px solid #CFE0FB; }
@media (min-width: 900px) { .trust-band { grid-template-columns: auto 1fr auto; gap: 32px; } }
.trust-band .card-icon { margin: 0; width: 60px; height: 60px; background: var(--white); }
.trust-band h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); margin-bottom: .3em; }
.trust-band p { margin: 0; color: var(--muted); }

/* CTA com foto */
.cta-box.with-photo { background: var(--navy); }
.cta-box .cta-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }

/* Cartões de tecnologia com foto */
.tech-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.tech-card .tc-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.tech-card .tc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.tech-card:hover .tc-media img { transform: scale(1.05); }
.tech-card .tc-media .mock { min-height: 0; height: 100%; border-radius: 0; box-shadow: none; padding: 16px; }
.tech-card .tc-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.tech-card .tc-body h3 { display: flex; align-items: center; gap: 10px; }
.tech-card .tc-body h3 .icon { color: var(--blue-700); }
.tech-card .chips { margin: 14px 0 0; }

/* Contadores do painel */
.is-playing .bars span { animation: barUp .9s var(--ease) both; transform-origin: bottom; }
.bars span:nth-child(2) { animation-delay: .1s !important; } .bars span:nth-child(3) { animation-delay: .2s !important; } .bars span:nth-child(4) { animation-delay: .3s !important; } .bars span:nth-child(5) { animation-delay: .4s !important; } .bars span:nth-child(6) { animation-delay: .5s !important; } .bars span:nth-child(7) { animation-delay: .6s !important; }
@keyframes barUp { from { transform: scaleY(0); } to { transform: none; } }
.is-playing .events li { animation: slideIn .5s var(--ease) both; }
.events li:nth-child(1) { animation-delay: .6s !important; } .events li:nth-child(2) { animation-delay: 1s !important; } .events li:nth-child(3) { animation-delay: 1.4s !important; } .events li:nth-child(4) { animation-delay: 1.8s !important; }
.is-playing .meter i { animation: typeIn 1.2s var(--ease) .4s both; }

/* Movimento reduzido: tudo aparece já no estado final */
@media (prefers-reduced-motion: reduce) {
  .ov-box, .ov-chip, .mock-toast, .chart-dot, .doc-btn { opacity: 1 !important; animation: none !important; }
  .scan { display: none; }
  .photo-card img, .tech-card img { transition: none; }
}

/* Grade dos cartões de segmento: 1 coluna no celular, 3 a partir de 760px */
.seg-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .seg-grid { grid-template-columns: repeat(3, 1fr); } .seg-grid .photo-card { min-height: 420px; } }

@media (min-width: 1000px) { .mini-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.hero-media img + .video-toggle { display: none; }

/* Painel pequeno dentro do cartão de tecnologia */
.tech-card .mock .doc-lines i:nth-child(n+4), .tech-card .mock .doc-foot { display: none; }
.tech-card .mock .doc-wave { height: 56px; }

/* ---------- Diário de obra a partir das fotos do encarregado ---------- */
.mock-diario { min-height: 360px; }
.dia-body { display: grid; gap: 16px; grid-template-columns: .85fr 1.15fr; align-items: start; }
@media (max-width: 520px) { .dia-body { grid-template-columns: 1fr; } }
.dia-label { display: flex; gap: 6px; align-items: center; font-size: .75rem; color: #9FB3CC; margin-bottom: 8px; }
.dia-label .icon { color: var(--cyan); }
.dia-thumbs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border-radius: 10px; overflow: hidden; }
.dia-thumbs figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.dia-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dia-thumbs b, .dia-log b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--cyan); color: var(--navy); font: 700 .7rem/1 var(--font-body); flex: none; }
.dia-thumbs b { position: absolute; left: 6px; top: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.dia-thumbs::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30%; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .35), rgba(34, 211, 238, .7) 96%, transparent); }
.dia-ai { margin-top: 10px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(34, 211, 238, .12); color: var(--cyan); font-size: .78rem; font-weight: 600; }
.dia-ai-txt { display: grid; }
.dia-ai-txt > span { grid-area: 1 / 1; }
.dia-ai-run { opacity: 0; }
.dia-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dia-log li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; color: #E6EEF8; line-height: 1.35; }
.dia-log time { display: block; font-size: .7rem; color: var(--cyan); font-weight: 600; margin-bottom: 2px; }
.mock-diario .doc-foot { justify-content: space-between; align-items: center; }
.dia-badge { position: static; }

.js .mock-diario .dia-thumbs figure, .js .mock-diario .dia-log li, .js .mock-diario .dia-ai { opacity: 0; }
.is-playing .dia-thumbs figure { animation: photoIn .45s var(--ease) calc(.2s + var(--i) * .3s) both; }
.is-playing .dia-thumbs::after { animation: scanDown 1.6s var(--ease) 1.6s 1 both; }
.is-playing .dia-ai { animation: chipIn .4s var(--ease) 1.5s both; }
.is-playing .dia-ai-run { animation: runFade 1.9s linear 1.5s both; }
.is-playing .dia-ai-done { animation: fadeIn .4s ease 3.4s both; }
.is-playing .dia-log li { animation: slideIn .5s var(--ease) calc(2.3s + var(--i) * .45s) both; }
.is-playing .mock-diario .doc-btn { animation-delay: 4.3s; }
@keyframes photoIn { from { opacity: 0; transform: translateY(12px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes runFade { 0% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .mock-diario .dia-thumbs figure, .mock-diario .dia-log li, .mock-diario .dia-ai { opacity: 1 !important; animation: none !important; }
  .dia-ai-run { display: none; }
}

/* ---------- Cena em vídeo com rastreamento ilustrativo ---------- */
.scene-video .hero-video { position: absolute; inset: 0; }
.scene-video .ov { z-index: 1; }
.js .ov-box.zone-static { opacity: 1; }
.ov-box.zone-static { border-color: rgba(245, 158, 11, .85); background: rgba(245, 158, 11, .08); box-shadow: none; transition: background .3s; }
.scene-video.alerting .ov-box.zone-static { background: rgba(239, 68, 68, .18); border-color: #EF4444; animation: zoneAlert 1s ease-in-out infinite; }
.scene-video.alerting .ov-box.zone-static b { background: #EF4444; color: #fff; }
@keyframes zoneAlert { 50% { box-shadow: 0 0 28px rgba(239, 68, 68, .7); } }
.js .ov-box.track { opacity: 0; transition: opacity .2s, border-color .2s; }
.js .ov-box.track.on { opacity: 1; }
.ov-box.track.warn { border-color: #EF4444; box-shadow: 0 0 0 1px rgba(8, 22, 44, .35), 0 0 22px rgba(239, 68, 68, .6); }
.ov-box.track.warn b { background: #EF4444; color: #fff; }
.js .ov-chip.alert-chip { opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; }
.js .ov-chip.alert-chip.on { opacity: 1; transform: none; }
.ov-chip.alert-chip .icon { color: #DC2626; }
.scene .video-toggle { top: 10px; right: 10px; bottom: auto; width: 38px; height: 38px; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .scene-video.alerting .ov-box.zone-static { animation: none; } }

.scene-video .scene-badge { top: 16px; bottom: auto; right: 58px; }

@media (max-width: 560px) {
  .scene-video .scene-badge { top: auto; bottom: 8px; right: 8px; }
  .scene-video .ov-chip { max-width: calc(100% - 64px); font-size: .76rem; padding: 7px 10px; }
  .hide-sm { display: none; }
}

/* ---------- Relatório semanal gerado a partir dos diários ---------- */
.mock-semanal { min-height: 380px; }
.sem-body { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); grid-template-areas: "days rep" "ai rep"; gap: 12px 16px; align-items: start; }
.sem-days { grid-area: days; }
.sem-days ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sem-days li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center; padding: 5px; border-radius: 9px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); }
.sem-days img { width: 44px; height: 32px; object-fit: cover; border-radius: 6px; display: block; }
.sem-days b { display: block; font: 700 .72rem var(--font-body); color: #fff; margin-bottom: 4px; }
.sem-days li i { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .28); margin-top: 3px; }
.sem-days li i + i { width: 65%; }
.sem-ai { grid-area: ai; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(34, 211, 238, .12); color: var(--cyan); font-size: .76rem; font-weight: 600; }
.sem-ai .dia-ai-txt > span { grid-area: 1 / 1; }
.sem-run { opacity: 0; }
.sem-report { grid-area: rep; background: #fff; color: var(--navy); border-radius: 14px; padding: 14px; box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .6); }
.sem-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.sem-head span { display: inline-flex; align-items: center; gap: 6px; font: 600 .82rem var(--font-head); }
.sem-head .icon { color: var(--blue-700); }
.sem-head em { font-style: normal; font-size: .66rem; padding: 3px 8px; border-radius: 999px; background: #FEF3C7; color: #92400E; white-space: nowrap; }
.sem-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sem-kpis div { padding: 8px 10px; border-radius: 10px; background: var(--gray-50); border: 1px solid var(--gray-200); }
.sem-kpis strong { display: block; font: 700 1.2rem/1.1 var(--font-head); color: var(--navy); }
.sem-kpis small { font-size: .68rem; color: var(--muted); line-height: 1.2; display: block; }
.sem-chart small { font-size: .68rem; color: var(--muted); }
.sem-bars { display: flex; align-items: flex-end; gap: 8px; height: 56px; margin-top: 4px; }
.sem-bars span { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--c-construcao), #FDBA74); transform-origin: bottom; }
.sem-x { display: flex; gap: 8px; margin-top: 4px; }
.sem-x span { flex: 1; text-align: center; font-size: .62rem; color: var(--muted); }
.sem-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.sem-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--blue); color: #fff; font-size: .74rem; font-weight: 600; }
.sem-btn.ghost { background: var(--blue-50); color: var(--blue-700); }
.mock-semanal .scene-badge { right: 12px; bottom: 12px; }
@media (max-width: 560px) {
  .sem-body { grid-template-columns: 1fr; grid-template-areas: "days" "ai" "rep"; }
  .sem-days ol { grid-template-columns: repeat(5, 1fr); }
  .sem-days li { grid-template-columns: 1fr; padding: 4px; }
  .sem-days img { width: 100%; height: 34px; }
  .sem-days li i { display: none; }
  .sem-days b { text-align: center; margin: 2px 0 0; }
  .mock-semanal .scene-badge { display: none; }
}

.js .mock-semanal .sem-days li, .js .mock-semanal .sem-ai, .js .mock-semanal .sem-report, .js .mock-semanal .sem-kpis div, .js .mock-semanal .sem-btn { opacity: 0; }
.is-playing .sem-days li { animation: dayIn .4s var(--ease) calc(.2s + var(--i) * .25s) both, dayOut .6s var(--ease) calc(2s + var(--i) * .08s) forwards; }
.is-playing .sem-ai { animation: chipIn .4s var(--ease) 1.7s both; }
.is-playing .sem-run { animation: runFade 1.6s linear 1.7s both; }
.is-playing .sem-done { animation: fadeIn .4s ease 3.3s both; }
.is-playing .sem-report { animation: reportIn .6s var(--ease) 2.5s both; }
.is-playing .sem-kpis div { animation: popIn .35s var(--ease) calc(3s + var(--i) * .15s) both; }
.is-playing .sem-bars span { animation: barUp .7s var(--ease) 3.5s both; }
.is-playing .sem-bars span:nth-child(2) { animation-delay: 3.6s; } .is-playing .sem-bars span:nth-child(3) { animation-delay: 3.7s; } .is-playing .sem-bars span:nth-child(4) { animation-delay: 3.8s; } .is-playing .sem-bars span:nth-child(5) { animation-delay: 3.9s; }
.is-playing .sem-btn { animation: chipIn .4s var(--ease) 4.3s both; }
@keyframes dayIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes dayOut { to { opacity: .4; transform: translateX(8px) scale(.97); filter: grayscale(.7); } }
@keyframes reportIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .mock-semanal .sem-days li, .mock-semanal .sem-ai, .mock-semanal .sem-report, .mock-semanal .sem-kpis div, .mock-semanal .sem-btn { opacity: 1 !important; animation: none !important; }
  .sem-run { display: none; }
}

.mock-semanal > .scene-badge { position: absolute; }

.mock-semanal > .scene-badge { left: 14px; right: auto; bottom: 14px; }

@media (max-width: 560px) { .mock-semanal > .scene-badge { display: inline-block; top: 14px; bottom: auto; left: auto; right: 14px; } }

/* ---------- Consulta → transcrição → prontuário ---------- */
.mock-pront { min-height: 400px; }
.pr-body { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-areas: "talk rep" "ai rep"; gap: 12px 16px; align-items: start; }
.pr-talk { grid-area: talk; }
.pr-consent { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(52, 211, 153, .14); color: #6EE7B7; font-size: .66rem; font-weight: 600; }
.pr-wave { display: flex; align-items: center; gap: 3px; height: 26px; margin-bottom: 8px; }
.pr-wave i { flex: 1; height: 30%; border-radius: 2px; background: var(--c-saude); opacity: .85; }
.pr-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-lines li { max-width: 92%; padding: 6px 9px; border-radius: 10px; font-size: .74rem; line-height: 1.35; color: #E6EEF8; background: rgba(255, 255, 255, .08); }
.pr-lines li b { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); margin-bottom: 1px; }
.pr-lines li.pac { justify-self: end; background: rgba(20, 184, 166, .18); }
.pr-lines li.pac b { color: #5EEAD4; }
.pr-doc { grid-area: rep; background: #fff; color: var(--navy); border-radius: 14px; padding: 14px; box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .6); }
.pr-doc .sem-head .icon { color: var(--c-saude-text); }
.pr-doc dl { margin: 0; display: grid; gap: 9px; }
.pr-doc dt { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.pr-doc dd { margin: 0; font-size: .78rem; line-height: 1.4; }
.pr-doc mark { color: var(--navy); background: linear-gradient(transparent 50%, rgba(20, 184, 166, .28) 50%) no-repeat 0 0 / 100% 100%; padding: 0 1px; }
.pr-doc .todo dd { padding: 5px 8px; border: 1.5px dashed var(--gray-300); border-radius: 8px; color: var(--muted); font-style: italic; font-size: .72rem; }
.mock-pront > .scene-badge { position: absolute; left: 14px; right: auto; bottom: 14px; }
@media (max-width: 560px) {
  .pr-body { grid-template-columns: 1fr; grid-template-areas: "talk" "ai" "rep"; }
  .mock-pront > .scene-badge { top: 14px; bottom: auto; left: auto; right: 14px; }
}

.js .mock-pront .pr-consent, .js .mock-pront .pr-lines li, .js .mock-pront .pr-ai, .js .mock-pront .pr-doc, .js .mock-pront .pr-doc dl > div, .js .mock-pront .sem-btn { opacity: 0; }
.pr-run { opacity: 0; }
.is-playing .pr-consent { animation: chipIn .4s var(--ease) .1s both; }
.is-playing .pr-wave i { animation: wave .45s ease-in-out 6 alternate; }
.is-playing .pr-wave i:nth-child(odd) { animation-delay: .15s; } .is-playing .pr-wave i:nth-child(3n) { animation-delay: .3s; } .is-playing .pr-wave i:nth-child(4n) { animation-delay: .05s; }
.is-playing .pr-lines li { animation: slideIn .45s var(--ease) calc(.5s + var(--i) * .55s) both; }
.is-playing .pr-ai { animation: chipIn .4s var(--ease) 2.7s both; }
.is-playing .pr-run { animation: runFade 1.4s linear 2.7s both; }
.is-playing .pr-done { animation: fadeIn .4s ease 4s both; }
.is-playing .pr-doc { animation: reportIn .6s var(--ease) 3s both; }
.is-playing .pr-doc dl > div { animation: dayIn .4s var(--ease) calc(3.4s + var(--i) * .3s) both; }
.is-playing .pr-doc mark { animation: hlIn .7s var(--ease) both; }
.is-playing .pr-doc dl > div:nth-child(1) mark { animation-delay: 3.7s; } .is-playing .pr-doc dl > div:nth-child(2) mark { animation-delay: 4s; }
.is-playing .mock-pront .sem-btn { animation: chipIn .4s var(--ease) 4.8s both; }
@keyframes hlIn { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }
@media (prefers-reduced-motion: reduce) {
  .mock-pront .pr-consent, .mock-pront .pr-lines li, .mock-pront .pr-ai, .mock-pront .pr-doc, .mock-pront .pr-doc dl > div, .mock-pront .sem-btn { opacity: 1 !important; animation: none !important; }
  .pr-run { display: none; }
}

.mock-pront { padding-bottom: 48px; }
@media (max-width: 560px) { .mock-pront { padding-bottom: 20px; } }

/* ---------- Anamnese → sugestão de exame para o médico ---------- */
.mock-sug { min-height: 380px; padding-bottom: 48px; }
.sg-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 560px) { .sg-body { grid-template-columns: 1fr; } .mock-sug { padding-bottom: 20px; } }
.sg-paper { background: #fff; color: var(--navy); border-radius: 12px; padding: 12px 14px; font-size: .78rem; line-height: 1.5; }
.sg-paper p { margin: 0 0 6px; color: #2E3C4F; }
.sg-paper p:last-child { margin: 0; }
.sg-paper b { color: var(--navy); }
.sg-paper mark { color: inherit; background: linear-gradient(transparent 45%, rgba(245, 158, 11, .35) 45%) no-repeat 0 0 / 100% 100%; padding: 0 1px; }
.sg-ai { grid-area: auto; margin-top: 10px; }
.sg-run { opacity: 0; }
.sg-note { position: relative; background: #fff; color: var(--navy); border-radius: 14px; padding: 14px; border-left: 4px solid var(--c-saude); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .65); }
.sg-note::before { content: ""; position: absolute; inset: -4px; border-radius: 18px; border: 2px solid rgba(20, 184, 166, .7); opacity: 0; pointer-events: none; }
.sg-app { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-saude-text); }
.sg-title { display: block; margin: 8px 0 8px; font: 700 .98rem/1.25 var(--font-head); }
.sg-exams { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.sg-exams li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--c-saude-soft); font-size: .8rem; font-weight: 600; }
.sg-exams .icon { color: var(--c-saude-text); }
.sg-why { margin: 0 0 10px; font-size: .74rem; color: var(--muted); line-height: 1.45; }
.sg-why b { color: var(--navy); }
.sg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sg-foot { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .7rem; color: var(--muted); }
.mock-sug > .scene-badge { position: absolute; left: 14px; right: auto; bottom: 14px; }
@media (max-width: 560px) { .mock-sug > .scene-badge { top: 14px; bottom: auto; left: auto; right: 14px; } }

.js .mock-sug .sg-paper, .js .mock-sug .sg-ai, .js .mock-sug .sg-note, .js .mock-sug .sg-exams li, .js .mock-sug .sg-why, .js .mock-sug .sg-actions, .js .mock-sug .sg-foot { opacity: 0; }
.is-playing .sg-paper { animation: dayIn .45s var(--ease) .1s both; }
.is-playing .sg-ai { animation: chipIn .4s var(--ease) .5s both; }
.is-playing .sg-run { animation: runFade 2.6s linear .5s both; }
.is-playing .sg-done { animation: fadeIn .4s ease 3.1s both; }
.is-playing .sg-paper mark { animation: hlIn .5s var(--ease) calc(.8s + var(--k) * .28s) both; }
.is-playing .sg-note { animation: noteIn .55s var(--ease) 2.6s both; }
.is-playing .sg-note::before { animation: notePing 1s ease-out 3s 2; }
.is-playing .sg-exams li { animation: slideIn .4s var(--ease) calc(3.1s + var(--i) * .2s) both; }
.is-playing .sg-why { animation: fadeIn .4s ease 3.6s both; }
.is-playing .sg-actions { animation: chipIn .4s var(--ease) 3.9s both; }
.is-playing .sg-foot { animation: fadeIn .4s ease 4.2s both; }
@keyframes noteIn { from { opacity: 0; transform: translateX(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes notePing { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .mock-sug .sg-paper, .mock-sug .sg-ai, .mock-sug .sg-note, .mock-sug .sg-exams li, .mock-sug .sg-why, .mock-sug .sg-actions, .mock-sug .sg-foot { opacity: 1 !important; animation: none !important; }
  .sg-run { display: none; }
}

/* Variante clínica do relatório semanal */
.sem-ico { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 6px; background: rgba(20, 184, 166, .18); color: #5EEAD4; }
.sem-days li small { display: block; font-size: .66rem; color: #9FB3CC; }
.sem-clinica .sem-bars span { background: linear-gradient(180deg, var(--c-saude), #99F6E4); }
.sem-clinica .sem-head .icon { color: var(--c-saude-text); }
.sem-clinica .sem-head em { background: #DCFCE7; color: #166534; }
.sem-clinica .sem-kpis strong { font-size: 1.05rem; }
@media (max-width: 560px) {
  .sem-clinica .sem-ico { width: 100%; height: 30px; }
  .sem-clinica .sem-days li small { display: none; }
}

.mock-semanal { padding-bottom: 48px; }
@media (max-width: 560px) { .mock-semanal { padding-bottom: 20px; } }

/* ---------- Perímetro: pessoa entra na área restrita e a IA alerta ---------- */
.scene-perim .pr-zone { background: rgba(245, 158, 11, .06); box-shadow: none; }
.scene-perim .pr-person .pr-l2 { opacity: 0; background: #EF4444; color: #fff; }
.scene-perim.is-playing .pr-zone { animation: boxIn .45s var(--ease) .6s 1 both, zoneRed .3s ease 2.3s forwards, zoneAlert 1s ease-in-out 2.6s 3; }
.scene-perim.is-playing .pr-zone b { animation: labelRed .3s ease 2.3s forwards; }
.scene-perim.is-playing .pr-person { animation: boxIn .45s var(--ease) 1.5s 1 both, personRed .3s ease 2.3s forwards; }
.scene-perim.is-playing .pr-person .pr-l1 { animation: fadeOut .2s ease 2.3s forwards; }
.scene-perim.is-playing .pr-person .pr-l2 { animation: fadeIn .25s ease 2.35s forwards; }
.scene-perim.is-playing .pr-chip .icon { color: #DC2626; }
@keyframes zoneRed { to { border-color: #EF4444; background: rgba(239, 68, 68, .16); } }
@keyframes labelRed { to { background: #EF4444; color: #fff; } }
@keyframes personRed { from { opacity: 1; } to { opacity: 1; border-color: #EF4444; box-shadow: 0 0 0 1px rgba(8, 22, 44, .35), 0 0 24px rgba(239, 68, 68, .7); } }
@keyframes fadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .scene-perim .pr-zone { border-color: #EF4444; background: rgba(239, 68, 68, .16); }
  .scene-perim .pr-zone b, .scene-perim .pr-person .pr-l2 { background: #EF4444; color: #fff; opacity: 1; }
  .scene-perim .pr-person { border-color: #EF4444; }
  .scene-perim .pr-person .pr-l1 { display: none; }
}

@media (max-width: 560px) {
  .scene-perim .pr-far b { display: none; }
  .scene-perim .ov-box b { font-size: .62rem; padding: 2px 5px; }
  .scene-perim .pr-chip { top: auto; bottom: 10px; font-size: .74rem; padding: 7px 10px; }
}
