/* =====================================================================
   MOVIMENTO EXTRA, LABORATÓRIOS E GUIA DO APARELHO
   ===================================================================== */
.fx-fundo { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .9; }
.fx-confete { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.fx-rev { opacity: 0; transform: translateY(28px) scale(.98); filter: blur(6px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1), filter .7s; }
.fx-rev.fx-vis { opacity: 1; transform: none; filter: none; }
.card-prog.fx-rev.fx-vis { transition: opacity .7s, transform .25s ease-out, filter .7s, border-color .2s, box-shadow .2s; }
.ring .rf { transition: stroke-dasharray 1.4s cubic-bezier(.2,.8,.2,1); }

/* Capas nos cartões */
.card-prog .capa { position: absolute; right: -18px; top: 18px; width: 120px; height: auto; border-radius: 10px; transform: rotate(8deg); box-shadow: 0 18px 40px rgba(0,0,0,.55); opacity: .95; transition: transform .35s; z-index: 0; }
.card-prog:hover .capa { transform: rotate(3deg) translateY(-6px) scale(1.04); }
.card-prog > *:not(.capa) { position: relative; z-index: 1; }
.card-prog h2, .card-prog > p { padding-right: 96px; }
.card-prog::before { z-index: 2; }

/* Hero do programa com capa */
.hero-capa { padding-right: 160px; min-height: 220px; }
.capa-prog { position: absolute; right: 22px; top: 50%; width: 120px; height: auto; transform: translateY(-50%) rotate(6deg); border-radius: 10px; box-shadow: 0 22px 50px rgba(0,0,0,.6); z-index: 1; }
@media (max-width: 520px) {
  .hero-capa { padding-right: 20px; padding-top: 190px; }
  .capa-prog { top: 20px; left: 50%; right: auto; width: 122px; transform: translateX(-50%) rotate(4deg); }
  .card-prog .capa { width: 92px; right: -12px; }
  .card-prog h2, .card-prog > p { padding-right: 70px; }
}

/* Respiração no botão principal e degradê vivo */
.hero .btn-primary { animation: respira 2.8s ease-in-out infinite; }
@keyframes respira { 50% { box-shadow: 0 10px 46px rgba(249,115,22,.7), inset 0 1px 0 rgba(255,255,255,.45); } }
.grad { background-size: 200% 100%; animation: degrade 6s ease-in-out infinite; }
@keyframes degrade { 50% { background-position: 100% 0; } }

/* ===== Laboratório ===== */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.lab { position: relative; margin: 1.6em 0; padding: 20px 16px; border-radius: 22px; background: linear-gradient(160deg, rgba(34,211,238,.12), rgba(139,92,246,.12) 60%, rgba(52,211,153,.08)); border: 1px solid rgba(34,211,238,.35); box-shadow: 0 0 0 4px rgba(34,211,238,.06), 0 20px 50px rgba(0,0,0,.35); }
.lab::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--ang), transparent 0 70%, #22d3ee 80%, #8b5cf6 90%, transparent); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: girarBorda 5s linear infinite; pointer-events: none; }
@keyframes girarBorda { to { --ang: 360deg; } }
.lab-top h4 { font-family: var(--display); font-size: 1.2rem; margin: 8px 0 4px; color: #fff; }
.lab-top p { color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.lab-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: .68rem; letter-spacing: .18em; font-weight: 700; color: #67e8f9; }
.lab-tag i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: aoVivo 1.4s infinite; }
@keyframes aoVivo { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.7); } 70%, 100% { box-shadow: 0 0 0 9px rgba(239,68,68,0); } }
.lab-palco { position: relative; border-radius: 16px; background: radial-gradient(circle at 50% 0%, #1b2a4a, #0b1220 70%); border: 1px solid var(--line); padding: 8px; margin-bottom: 14px; }
.lab-escuro { background: radial-gradient(circle at 50% 80%, #2b1d10, #0b0f1a 70%); }
.lab-svg { display: block; width: 100%; height: auto; }
.lab-svg .lv { font-family: var(--display); font-size: 20px; font-weight: 800; fill: #0f172a; }
.lab-svg .lw { fill: #fff; font-size: 15px; letter-spacing: 2px; }
.lab-svg #ch-temp { fill: #fff; font-size: 26px; }
.lab-svg #cr-rel { fill: #fff; }
.lab-svg .ls { font-family: "Inter", sans-serif; font-size: 11px; font-weight: 600; fill: #94a3b8; }
.lab-svg #ar-visor { font-size: 17px; }
.lab-girar { animation: spin 1s linear infinite; }
.lab-vento { stroke-dasharray: 8 8; animation: flow .8s linear infinite; transition: opacity .4s; }
.lab-gota { animation: gotaCai var(--vel, 1s) linear infinite; }
@keyframes gotaCai { from { transform: translateY(0); opacity: 1; } to { transform: translateY(118px); opacity: .1; } }
.lab-medidor { display: grid; gap: 6px; padding: 6px 8px 4px; }
.lab-medidor span { font-size: .85rem; color: var(--muted); }
.lab-medidor b { font-family: var(--display); color: #fff; font-size: 1rem; }
.lab-barra { height: 14px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.lab-barra i { display: block; height: 100%; border-radius: 99px; transition: width .4s, background .4s; }
.lab-ctl { margin: 14px 0 6px; }
.lab-ctl label { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; color: #fff; margin-bottom: 10px; }
.lab-ctl output { font-family: var(--display); font-weight: 800; color: var(--amber); white-space: nowrap; }
.lab-esc { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.lab input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 99px; background: linear-gradient(90deg, #22d3ee, #8b5cf6, #f97316); outline: none; margin: 10px 0; }
.lab input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 5px solid #3b82f6; box-shadow: 0 0 0 6px rgba(59,130,246,.25), 0 6px 16px rgba(0,0,0,.5); cursor: grab; }
.lab input[type=range]::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 5px solid #3b82f6; cursor: grab; }
.lab input[type=range]:focus-visible { outline: 3px solid var(--amber); outline-offset: 6px; }
.lab-tog { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.lab-tog button { font: inherit; font-weight: 700; font-size: .92rem; min-height: 56px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--muted); cursor: pointer; transition: all .2s; }
.lab-tog button[aria-pressed="true"] { color: #fff; border-color: transparent; background: var(--grad-brand); box-shadow: 0 8px 22px rgba(59,130,246,.4); }
.lab-lei { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.lab-lei div { background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 6px; text-align: center; }
.lab-lei span { display: block; font-size: .74rem; color: var(--muted); line-height: 1.3; }
.lab-lei b { display: block; font-family: var(--display); font-size: 1rem; color: #fff; margin-top: 4px; overflow-wrap: anywhere; }
.lab-alerta { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.4); color: #fde68a; font-weight: 600; font-size: .95rem; }
.lab-alerta.bom { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.5); color: #a7f3d0; }
.lab-alerta.ruim { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.5); color: #fecaca; animation: tremer .4s; }
@keyframes tremer { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.lab-nota { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.lab-acao { margin-top: 6px; }
.hd-passa { animation: hdPassa 3.6s linear forwards; }
.hd-para { animation: hdPara 3.6s ease-out forwards; }
@keyframes hdPassa { from { transform: translateX(0); } to { transform: translateX(360px); } }
@keyframes hdPara { 0% { transform: translateX(0); } 60% { transform: translateX(96px); } 72% { transform: translateX(86px); } 100% { transform: translateX(92px); } }
.cr-pinga { animation: crPinga .9s ease-in forwards; }
@keyframes crPinga { from { transform: translateY(0); } to { transform: translateY(46px); opacity: 0; } }
#fg-chamas { transform-origin: 160px 128px; transition: transform .4s; }
.sb-led { animation: blink 1.2s steps(2) infinite; }
.sb-fio { animation: flow 1s linear infinite reverse; }
.sb-off .sb-led { animation: none; opacity: .12; }
.sb-off .sb-fio { animation: none; opacity: .2; }
.sb-off #sb-pont { animation-play-state: paused; }
.sb-botao { position: absolute; left: 12px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 800; font-size: .85rem; padding: 8px 14px; min-height: 48px; border-radius: 12px; border: 0; cursor: pointer; background: #fff; color: #0f172a; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.sb-botao i { width: 22px; height: 22px; border-radius: 6px; background: #dc2626; box-shadow: 0 0 14px #ef4444; }
.sb-off .sb-botao i { background: #475569; box-shadow: none; }

/* ===== Card discreto do aparelho ===== */
.ap-mini { display: grid; grid-template-columns: 64px 1fr 20px; gap: 14px; align-items: center; margin-top: 18px; padding: 12px 14px; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.ap-mini:hover { border-color: rgba(52,211,153,.6); transform: translateY(-2px); }
.ap-mini img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; }
.ap-mini small { display: block; font-family: var(--display); font-size: .64rem; letter-spacing: .18em; color: var(--green); }
.ap-mini b { display: block; color: #fff; font-size: 1rem; line-height: 1.3; }
.ap-mini em { display: block; font-style: normal; font-size: .84rem; color: var(--muted); line-height: 1.35; }
.ap-mini i { font-style: normal; font-size: 1.6rem; color: var(--muted); }

/* ===== Página do aparelho ===== */
.ap-hero { position: relative; border-radius: 26px; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.ap-hero img { display: block; width: 100%; height: 320px; object-fit: cover; object-position: 35% 60%; animation: kenburns 18s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.12) translate(-2%, -2%); } }
.ap-hero-tx { position: absolute; inset: auto 0 0 0; padding: 80px 20px 22px; background: linear-gradient(transparent, rgba(6,10,20,.96) 55%); }
.ap-hero-tx p { margin: 0; color: #dbe7f5; }
.ap-palco { padding: 14px; margin-bottom: 20px; border-radius: 26px; }
.ap-svg { display: block; width: 100%; height: auto; border-radius: 18px; background: radial-gradient(circle at 30% 20%, #1a2744, #070c18 70%); }
.ap-marca { font-family: var(--display); font-size: 17px; font-weight: 800; fill: #e5e7eb; }
.ap-tx { font-family: var(--display); font-size: 10px; letter-spacing: 3px; fill: #67e8f9; font-weight: 700; }
.ap-tx2 { font-family: var(--display); font-size: 15px; fill: #fff; font-weight: 800; }
.ap-svg g { transition: transform 1.1s cubic-bezier(.65,0,.35,1), opacity .6s; }
.ap-tampa { transform-box: fill-box; transform-origin: 0% 100%; }
.ap-disp { transform: translate(100px, 190px); opacity: 0; }
.ap-disp-in { transform: scale(.8); }
.ap-pinos { opacity: 0; }
.ap-led { fill: #14532d; transition: fill .4s; }
.ap-lupa, .ap-ok { opacity: 0; transform: translateY(10px); }
.ap-ondas circle { fill: none; stroke: #34d399; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ap-pulso { opacity: 0; transition: opacity .6s; transform-box: fill-box; transform-origin: center; }
#ap-palco .ap-tampa { opacity: 0; transform: translate(-40px, -70px) rotate(-28deg); }
[data-passo="0"] .ap-tampa { animation: tampaSai 1.6s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes tampaSai { 0%, 15% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate(-40px, -70px) rotate(-28deg); } }
[data-passo="0"] .ap-disp { animation: dispSobe 1.8s cubic-bezier(.65,0,.35,1) both; }
@keyframes dispSobe { 0%, 30% { transform: translate(100px, 190px); opacity: 0; } 45% { opacity: 1; } 100% { transform: translate(100px, 92px); opacity: 1; } }
[data-passo="0"] .ap-disp { transform: translate(100px, 92px); opacity: 1; }
[data-passo="0"] .ap-disp-in { transform: scale(.9); }
[data-passo="1"] .ap-disp { transform: translate(140px, 116px); opacity: 1; }
[data-passo="1"] .ap-disp-in { transform: scale(1.2) rotate(-8deg); }
[data-passo="1"] .ap-lupa { opacity: 1; transform: none; }
[data-passo="1"] .ap-pinos, [data-passo="2"] .ap-pinos, [data-passo="3"] .ap-pinos { opacity: 1; }
[data-passo="2"] .ap-disp { transform: translate(248px, 134px); opacity: 1; }
[data-passo="2"] .ap-disp-in { transform: scale(1); }
[data-passo="2"] .ap-pulso { opacity: 1; animation: pulse 1.2s ease-in-out infinite; }
[data-passo="3"] .ap-disp { transform: translate(300px, 134px); opacity: 1; }
[data-passo="3"] .ap-disp-in { transform: scale(1); }
[data-passo="3"] .ap-led { fill: #4ade80; animation: blink 1.6s ease-in-out infinite; }
[data-passo="3"] .ap-led.l2 { animation-delay: .8s; }
[data-passo="3"] .ap-ondas circle { animation: onda 1.8s ease-out infinite; }
[data-passo="3"] .ap-ondas circle:nth-child(2) { animation-delay: .6s; }
[data-passo="3"] .ap-ondas circle:nth-child(3) { animation-delay: 1.2s; }
[data-passo="3"] .ap-ok { opacity: 1; transform: none; }
@keyframes onda { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.1); } }
.ap-leg { padding: 16px 6px 6px; min-height: 130px; }
.ap-leg b { font-family: var(--display); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); }
.ap-leg h2 { margin: 6px 0 4px; }
.ap-leg p { color: var(--txt); margin: 0; }
.ap-trilha { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.ap-trilha button { display: flex; flex-direction: column; align-items: center; gap: 4px; font: inherit; font-size: .72rem; font-weight: 600; line-height: 1.2; color: var(--muted); background: rgba(0,0,0,.25); border: 1px solid var(--line); border-radius: 14px; padding: 10px 4px; min-height: 76px; cursor: pointer; transition: all .3s; }
.ap-trilha i { font-style: normal; font-family: var(--display); font-weight: 800; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; transition: all .3s; }
.ap-trilha button[aria-selected="true"] { color: #fff; border-color: var(--cyan); background: rgba(34,211,238,.12); }
.ap-trilha button[aria-selected="true"] i { background: var(--grad-brand); box-shadow: 0 0 16px rgba(34,211,238,.7); }
.ap-trilha button.feito i { background: var(--green); color: #022c1e; }
.ap-play { display: block; margin: 12px auto 0; font: inherit; font-weight: 600; font-size: .9rem; color: var(--muted); background: none; border: 0; min-height: 44px; cursor: pointer; }
.ap-check { padding: 22px 18px; margin-bottom: 18px; border-radius: 24px; }
.ap-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ap-lista li { padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.22); border: 1px solid var(--line); color: var(--muted); }
.ap-lista b { color: #fff; }
.ap-check details { border-top: 1px solid var(--line); padding: 4px 0; }
.ap-check summary { cursor: pointer; font-weight: 700; color: #fff; min-height: 52px; display: flex; align-items: center; }
.ap-check details p { color: var(--muted); margin: 0 0 12px; }
.ap-fim { padding: 22px 18px; border-radius: 24px; text-align: center; margin-bottom: 10px; }
@media (min-width: 800px) {
  .ap-hero img { height: 400px; }
  .ap-trilha button { font-size: .86rem; }
  .lab { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) { .fx-rev { opacity: 1; transform: none; filter: none; } }

/* Painel inicial empilhado no celular */
@media (max-width: 480px) {
  .hero-top { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-top .ring { width: 96px; height: 96px; }
}
.lab-lei b { font-size: .92rem; overflow-wrap: normal; word-break: keep-all; }
@media (min-width: 800px) { .lab-lei b { font-size: 1.05rem; } }
.sb-botao { position: static; display: flex; margin: 8px auto 6px; }
