/* Hero: cenas dos cases em código (CSS puro).
   Cada card recria o movimento principal do vídeo do case com as telas finais.
   Sem suporte (container queries) ou com prefers-reduced-motion, fica a imagem estática .hx-still. */

.hx-card .hx-still { position: absolute; inset: 0; }
.hx-scene { display: none; position: absolute; inset: 0; overflow: hidden; container-type: size; font-family: 'Manrope', sans-serif; }
html.hx-anim .hx-scene { display: block; }
html.hx-anim .hx-card .hx-still { visibility: hidden; }

/* Só anima quando o card está na tela */
.hx-scene, .hx-scene * { animation-play-state: paused !important; }
.hx-card.is-live .hx-scene, .hx-card.is-live .hx-scene * { animation-play-state: running !important; }
.hx-scene * { animation-duration: 12s; animation-iteration-count: infinite; animation-timing-function: cubic-bezier(.45,0,.2,1); animation-fill-mode: both; }
.hx-card.hx-c4 .hx-scene * { animation-delay: -1.5s; }
.hx-card.hx-c1 .hx-scene * { animation-delay: -4s; }
.hx-card.hx-c5 .hx-scene * { animation-delay: -6s; }

.hx-card .hx-scene img { position: absolute; display: block; width: 100%; height: auto; max-width: none; object-fit: initial; }

/* Selo do case: pílula de vidro, no estilo do site */
.hs-pill { position: absolute; z-index: 9; left: 4cqw; top: 4cqw; display: inline-flex; align-items: center; gap: 1.8cqw; padding: 1.1cqw 3.2cqw 1.1cqw 1.1cqw; border-radius: 99px;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; font-size: 4cqw; font-weight: 700; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; animation: none !important; }
.hx-card .hs-pill img { position: static; width: 6.6cqw; height: 6.6cqw; border-radius: 1.8cqw; }

.hs-phone { position: absolute; overflow: hidden; aspect-ratio: 780 / 1688; border-radius: 4.4cqw; background: #fff;
  box-shadow: 0 0 0 0.7cqw #0E0E10, 0 3cqw 6cqw -1cqw rgba(0,0,0,0.45); }
.hs-phone img { inset: 0 auto auto 0; }

.hs-win { position: absolute; overflow: hidden; border-radius: 2.2cqw; background: #fff; box-shadow: 0 3cqw 7cqw -2cqw rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08); }
.hs-bar { display: block; height: 3.4cqw; background: #F2F2F4 radial-gradient(circle, #D6D5DA 0.55cqw, transparent 0.65cqw) 1.8cqw 50% / 2.2cqw 3.4cqw repeat-x; background-size: 2.2cqw 3.4cqw; border-bottom: 1px solid #E6E6EA; }
.hs-bar { background-repeat: no-repeat; background-image: radial-gradient(circle, #D6D5DA 0.55cqw, transparent 0.65cqw), radial-gradient(circle, #D6D5DA 0.55cqw, transparent 0.65cqw), radial-gradient(circle, #D6D5DA 0.55cqw, transparent 0.65cqw);
  background-position: 1.4cqw 50%, 3.6cqw 50%, 5.8cqw 50%; background-size: 2.2cqw 3.4cqw; }
.hs-view { position: relative; overflow: hidden; height: calc(100% - 3.4cqw); }
.hs-view img { inset: 0 auto auto 0; transform-origin: 30% 40%; }

/* ── 1 · NerdWallet: um fluxo, uma pergunta por vez, até o match e a call marcada ── */
.hx-nw { background: #021335; }
.hx-nw .hx-scene { background: radial-gradient(120% 95% at 75% 0%, #0D47B0 0%, #062A72 38%, #021335 100%); }
.hs-nw-a { left: 21cqw; top: 15cqw; width: 26cqw; z-index: 3; }
.hs-nw-a img { opacity: 0; animation-name: hsNwStep; }
.hs-nw-a img:nth-child(1) { animation-delay: 0s !important; }
.hs-nw-a img:nth-child(2) { animation-delay: 2.4s !important; }
.hs-nw-a img:nth-child(3) { animation-delay: 4.8s !important; }
.hs-nw-a img:nth-child(4) { animation-delay: 7.2s !important; }
.hs-nw-a img:nth-child(5) { animation-delay: 9.6s !important; }
@keyframes hsNwStep { 0% { opacity: 0; transform: translateX(14%); } 4%, 20% { opacity: 1; transform: none; } 24%, 100% { opacity: 0; transform: translateX(-10%); } }
.hs-nw-b { left: 54cqw; top: 20cqw; width: 23cqw; z-index: 2; animation-name: hsNwFloat; }
@keyframes hsNwFloat { 0%, 100% { transform: translateY(0) rotate(5deg); } 50% { transform: translateY(-2.2cqw) rotate(3.5deg); } }

/* ── 2 · Doctoranytime: "Ask anything" → resultados resumidos por IA ── */
.hx-da { background: #1B33C9; }
.hx-da .hx-scene { background: radial-gradient(110% 90% at 20% 0%, #5470FF 0%, #2B48E8 45%, #1A2FB8 100%); }
.hs-da-p { left: 12cqw; top: 15cqw; width: 26cqw; }
.hs-da-home { animation-name: hsDaHome; }
.hs-da-res { opacity: 0; animation-name: hsDaRes; }
@keyframes hsDaHome { 0%, 44% { opacity: 1; } 50%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes hsDaRes { 0%, 44% { opacity: 0; transform: translateY(0); } 50% { opacity: 1; transform: translateY(0); } 62% { transform: translateY(0); } 88% { opacity: 1; transform: translateY(-16%); } 94%, 100% { opacity: 0; transform: translateY(-16%); } }
.hs-da-ask { position: absolute; z-index: 4; left: 31cqw; top: 31cqw; display: flex; align-items: center; gap: 1.6cqw; width: 61cqw; height: 10cqw; padding: 0 1.2cqw 0 2.4cqw; box-sizing: border-box;
  background: #fff; border-radius: 99px; box-shadow: 0 2.6cqw 6cqw -1.5cqw rgba(8,20,90,0.55); animation-name: hsDaAsk; }
.hs-da-ask > svg { width: 3.6cqw; height: 3.6cqw; flex: none; }
.hs-type { flex: 1; color: #16163A; font-size: 2.9cqw; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; clip-path: inset(0 100% 0 0); animation-name: hsDaType; animation-timing-function: steps(32, end) !important; }
.hs-da-ask b { display: grid; place-items: center; flex: none; width: 7.4cqw; height: 7.4cqw; border-radius: 50%; background: #2B48E8; animation-name: hsDaBtn; }
.hs-da-ask b svg { width: 3.6cqw; height: 3.6cqw; }
@keyframes hsDaAsk { 0% { opacity: 0; transform: translateY(3cqw) scale(0.96); } 7%, 46% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: translateY(-2cqw) scale(0.97); } }
@keyframes hsDaType { 0%, 9% { clip-path: inset(0 100% 0 0); } 36%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes hsDaBtn { 0%, 39% { transform: scale(1); } 41% { transform: scale(0.82); } 44%, 100% { transform: scale(1); } }
.hs-da-ai { position: absolute; z-index: 4; left: 44cqw; top: 33cqw; padding: 1.6cqw 3cqw; border-radius: 99px; background: rgba(255,255,255,0.96); color: #6B4EFF; font-size: 3.2cqw; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap;
  box-shadow: 0 2.6cqw 6cqw -1.5cqw rgba(8,20,90,0.5); opacity: 0; animation-name: hsDaAi; }
@keyframes hsDaAi { 0%, 52% { opacity: 0; transform: translateY(2cqw) scale(0.94); } 58%, 86% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-1.5cqw); } }

/* ── 3 · FairSupply: tour de câmera pelas telas finais + "Ask Fair Supply" ── */
.hx-fs { background: #0B0A12; }
.hx-fs .hx-scene { background: radial-gradient(100% 90% at 85% 10%, #3A2A86 0%, #1A1438 45%, #0B0A12 100%); }
.hx-fs .hs-win { left: 6cqw; top: 17cqw; width: 76cqw; height: 54cqw; }
.hs-fs-a { animation-name: hsFsA; }
.hs-fs-b { opacity: 0; animation-name: hsFsB; }
@keyframes hsFsA { 0% { opacity: 1; transform: scale(1); } 44% { opacity: 1; transform: scale(1.32) translate(-2%, -6%); } 50%, 94% { opacity: 0; transform: scale(1.32) translate(-2%, -6%); } 100% { opacity: 1; transform: scale(1); } }
@keyframes hsFsB { 0%, 44% { opacity: 0; transform: scale(1.12); } 50% { opacity: 1; transform: scale(1.12); } 90% { opacity: 1; transform: scale(1.3) translate(-4%, -4%); } 96%, 100% { opacity: 0; transform: scale(1.3) translate(-4%, -4%); } }
.hs-fs-ai { position: absolute; z-index: 4; right: 4cqw; top: 25cqw; width: 27cqw; aspect-ratio: 560 / 876; overflow: hidden; border-radius: 2cqw; background: #fff;
  box-shadow: 0 3cqw 7cqw -1cqw rgba(60,30,180,0.55), 0 0 0 1px rgba(255,255,255,0.1); opacity: 0; animation-name: hsFsAi; }
.hs-fs-ai img { inset: 0 auto auto 0; }
@keyframes hsFsAi { 0%, 58% { opacity: 0; transform: translateX(8cqw); } 66%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateX(4cqw); } }

/* ── 4 · CPFL · Weme: o portal, um clique no catálogo e a avaliação do atendimento ── */
.hx-cp { background: #EDEBE6; }
.hx-cp .hx-scene { background: radial-gradient(110% 100% at 80% 0%, #DCE6F7 0%, #EEF0F2 50%, #F3F1EC 100%); }
.hx-cp .hs-pill { left: auto; right: 4cqw; background: rgba(255,255,255,0.75); border-color: rgba(0,0,0,0.06); color: #0A0A0A; }
.hx-cp .hs-win { left: 7cqw; top: 17cqw; width: 86cqw; height: 60cqw; box-shadow: 0 3cqw 7cqw -2cqw rgba(20,40,90,0.28), 0 0 0 1px rgba(0,0,0,0.05); }
.hx-card .hx-scene .hs-cp-home { top: -12cqw; animation-name: hsCpZoom; transform-origin: 50% 53.7%; }
@keyframes hsCpZoom { 0%, 30% { transform: scale(1); } 46%, 88% { transform: scale(1.16); } 96%, 100% { transform: scale(1); } }
.hs-cp-ring { position: absolute; left: 30.3cqw; top: 21.7cqw; width: 25.4cqw; height: 10.3cqw; border-radius: 1.2cqw; box-shadow: 0 0 0 0.5cqw #1E6BFF, 0 0 0 1.6cqw rgba(30,107,255,0.18); opacity: 0;
  transform-origin: 50% 50%; animation-name: hsCpRing; }
@keyframes hsCpRing { 0%, 30% { opacity: 0; transform: scale(0.96); } 34% { opacity: 1; transform: scale(1); } 46%, 84% { opacity: 1; transform: scale(1.16); } 90%, 100% { opacity: 0; transform: scale(1.16); } }
.hs-cursor { position: absolute; z-index: 6; left: 0; top: 0; width: 5.4cqw; height: 5.4cqw; filter: drop-shadow(0 0.6cqw 0.8cqw rgba(0,0,0,0.25)); animation-name: hsCpCursor; }
@keyframes hsCpCursor { 0% { transform: translate(78cqw, 56cqw); opacity: 0; } 6% { opacity: 1; } 28% { transform: translate(54cqw, 46cqw); } 31% { transform: translate(54cqw, 46cqw) scale(0.82); } 34%, 44% { transform: translate(54cqw, 46cqw) scale(1); opacity: 1; } 52%, 100% { transform: translate(60cqw, 70cqw); opacity: 0; } }
.hs-cp-rate { position: absolute; z-index: 5; right: 5cqw; top: 22cqw; width: 26cqw; aspect-ratio: 384 / 566; overflow: hidden; border-radius: 1.8cqw; background: #fff;
  box-shadow: 0 3cqw 7cqw -1cqw rgba(20,40,90,0.4); opacity: 0; animation-name: hsCpRate; }
.hs-cp-rate img { inset: 0 auto auto 0; }
@keyframes hsCpRate { 0%, 54% { opacity: 0; transform: translateY(10cqw); } 62%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(4cqw); } }

@media (prefers-reduced-motion: reduce) { html.hx-anim .hx-scene { display: none; } html.hx-anim .hx-card .hx-still { visibility: visible; } }
.hx-fs .hs-view img { transform-origin: 30% 0%; }
