/* =========================================================
   Efeitos: boot, cursor "você", profundidade, celular 3D
   ========================================================= */
html, body { overflow-x: clip; }

/* ---------- boot ---------- */
.boot { display: none; }
.boot-on .boot { display: block; position: fixed; inset: 0; z-index: 120; animation: bootsafe 0s 7s forwards; }
@keyframes bootsafe { to { visibility: hidden; } } /* se o JS falhar, a cortina some sozinha */
.boot-red, .boot-ink { position: absolute; inset: 0; clip-path: inset(0 0 0 0); transition: clip-path .9s var(--ease); }
.boot-red { background: var(--red); }
.boot-ink { background: var(--ink); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px, 4vw, 56px); }
.boot.out { pointer-events: none; }
.boot.out .boot-ink { clip-path: inset(0 0 100% 0); }
.boot.out .boot-red { clip-path: inset(0 0 100% 0); transition-delay: .16s; }
.boot.gone { display: none; }
.boot-log { font: 500 13px/1.9 var(--mono); color: rgba(242, 236, 230, .66); min-height: 12em; }
.boot-log div { animation: bootline .25s var(--out) both; }
.boot-log .ok { color: #3ddc84; }
.boot-log .pr { color: var(--red); }
@keyframes bootline { from { opacity: 0; transform: translateY(6px); } }
.boot-foot { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.boot-name { font: 400 clamp(28px, 4vw, 52px)/1 var(--display); }
.boot-name span { color: var(--red); }
.boot-count { font: 400 clamp(96px, 17vw, 250px)/.8 var(--display); font-variant-numeric: tabular-nums; }
.boot-count small { font-size: .34em; color: var(--red); }
.boot-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--red); }

/* ---------- cursor "você" ---------- */
.has-me, .has-me a, .has-me button, .has-me [data-preview] { cursor: none; }
.me { position: fixed; left: 0; top: 0; z-index: 150; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
.me.on { opacity: 1; }
.me svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .6)); transform-origin: 3px 3px; transition: transform .2s var(--out); }
.me.press svg { transform: scale(.78); }
.me b { position: absolute; left: 17px; top: 20px; padding: 3px 8px; border-radius: 4px; background: var(--red); color: #160302; font: 700 11px/1.3 var(--mono); white-space: nowrap; transform-origin: 0 0; transition: transform .3s var(--out), background .2s; }
.me.hot b { background: var(--bone); transform: scale(1.12); }
.me-ring { position: fixed; left: 0; top: 0; z-index: 149; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 1px solid rgba(255, 45, 31, .75); pointer-events: none; opacity: 0; scale: .4; transition: opacity .3s, scale .45s var(--out); will-change: transform; }
.me-ring.on { opacity: 1; scale: 1; }

/* ---------- profundidade no hero ---------- */
.hero .giant:not(.giant-front) > span { translate: calc(var(--mx, 0) * -26px) calc(var(--my, 0) * -10px + var(--sy, 0) * -150px); }
.hero .giant-front > span { translate: calc(var(--mx, 0) * -46px) calc(var(--my, 0) * -18px + var(--sy, 0) * -220px); }
.hero .portrait { translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 6px + var(--sy, 0) * 70px); }
.hero-intro { translate: calc(var(--mx, 0) * 6px) calc(var(--sy, 0) * -40px); }
.hero-side { translate: calc(var(--mx, 0) * 8px) calc(var(--sy, 0) * -70px); }

/* glitch curto quando o retrato termina de montar */
.portrait.glitch::before, .portrait.glitch::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: url("../img/leo-portrait-v3.webp") center bottom / contain no-repeat;
  mix-blend-mode: screen;
  animation: glitch .6s steps(2) both;
}
.portrait.glitch::before { filter: drop-shadow(-8px 0 0 rgba(255, 45, 31, .9)); opacity: .7; clip-path: inset(18% 0 58% 0); }
.portrait.glitch::after { filter: drop-shadow(8px 0 0 rgba(124, 196, 255, .8)); opacity: .6; clip-path: inset(52% 0 22% 0); animation-delay: .08s; }
@keyframes glitch {
  0% { transform: translateX(-14px); }
  25% { transform: translateX(10px); }
  50% { transform: translateX(-6px); clip-path: inset(36% 0 40% 0); }
  75% { transform: translateX(4px); }
  100% { transform: none; opacity: 0; }
}

/* ---------- títulos que decodificam ---------- */
[data-scramble] .sc { color: var(--red); }

/* ---------- case com celular ---------- */
.case-phone { grid-template-columns: 1fr 1fr; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; height: 58px; padding: 0 22px 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-2); transition: border-color .25s, background .25s; }
.store:hover { border-color: var(--red); background: var(--ink-3); }
.store:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.store svg { width: 24px; height: 24px; fill: var(--bone); flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.15; }
.store small { font-weight: 500; font-size: 11px; color: var(--mute); }
.case .case-note { margin: 18px 0 0; font-size: 13px; color: var(--mute); }

.phone-stage { position: relative; height: 660px; display: grid; place-items: center; perspective: 1400px; }
.phone-stage::before { content: ""; position: absolute; width: 540px; height: 540px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 45, 31, .3), transparent 72%); }
.phone-stage::after { content: ""; position: absolute; width: 470px; height: 470px; border-radius: 50%; border: 1px dashed rgba(242, 236, 230, .14); animation: spin 50s linear infinite; }
.phone-float { position: relative; z-index: 2; animation: float 6s ease-in-out infinite; }
.phone {
  position: relative;
  width: 286px; height: 588px;
  border-radius: 50px;
  padding: 11px;
  background: linear-gradient(145deg, #3d3331, #130e0e 42%, #2b2221);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .15), inset 0 0 0 5px #0a0707, 0 50px 90px rgba(0, 0, 0, .65), 0 0 0 1px #000;
  transform: rotateY(var(--ry, -18deg)) rotateX(var(--rx, 7deg)) rotateZ(var(--rz, 2deg));
  transition: transform .7s var(--out);
}
.phone::before { content: ""; position: absolute; right: -3px; top: 150px; width: 3px; height: 70px; border-radius: 0 3px 3px 0; background: #2b2221; }
@keyframes float { 50% { transform: translateY(-14px); } }
.phone-screen { position: relative; height: 100%; border-radius: 40px; overflow: hidden; background: #f3f6fb; color: #17223b; display: flex; flex-direction: column; font-family: var(--body); }
.ph-status { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px 6px; font-size: 12px; font-weight: 700; }
.ph-island { width: 88px; height: 25px; border-radius: 20px; background: #000; }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; background: #fff; border-bottom: 1px solid #e2e8f1; }
.ph-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #3a7afe, #2155c7); color: #fff; font-weight: 800; }
.ph-head b { display: block; font-size: 14px; }
.ph-head small { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #67748c; }
.ph-head small i { width: 6px; height: 6px; border-radius: 50%; background: #10ca93; }
.ph-chat { flex: 1; min-height: 0; padding: 14px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; }
.ph-msg { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 12.5px; line-height: 1.38; flex: none; animation: msg .45s var(--out) both; }
.ph-msg.in { align-self: flex-start; background: #fff; border: 1px solid #e2e8f1; border-bottom-left-radius: 5px; }
.ph-msg.out { align-self: flex-end; background: #3a7afe; color: #fff; border-bottom-right-radius: 5px; }
.ph-msg time { display: block; margin-top: 3px; font-size: 9.5px; opacity: .55; text-align: right; }
.ph-msg.typing { display: flex; gap: 4px; padding: 12px; }
.ph-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #98a4b9; animation: dot 1.2s infinite; }
.ph-msg.typing i:nth-child(2) { animation-delay: .15s; }
.ph-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes msg { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.ph-input { display: flex; align-items: center; justify-content: space-between; margin: 0 12px 16px; padding: 8px 8px 8px 16px; border-radius: 22px; background: #fff; border: 1px solid #e2e8f1; font-size: 12px; color: #98a4b9; }
.ph-input i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #3a7afe; color: #fff; font-style: normal; font-size: 12px; }
.ph-notif { position: absolute; left: 10px; right: 10px; top: 44px; z-index: 3; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 18px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); box-shadow: 0 12px 30px rgba(23, 34, 59, .2); font-size: 11.5px; line-height: 1.3; animation: notif 3.4s var(--out) both; }
.ph-notif b { display: block; font-size: 12px; }
.ph-notif .ph-logo { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
@keyframes notif { 0% { transform: translateY(-160%); } 14%, 82% { transform: none; } 100% { transform: translateY(-160%); } }
.phone-glare { position: absolute; inset: 11px; border-radius: 40px; pointer-events: none; background: linear-gradient(var(--ga, 115deg), rgba(255, 255, 255, .24) 0%, transparent 30%, transparent 72%, rgba(255, 255, 255, .06)); mix-blend-mode: screen; }
.phone-shadow { position: absolute; bottom: 14px; z-index: 1; width: 240px; height: 28px; border-radius: 50%; background: rgba(0, 0, 0, .6); filter: blur(16px); animation: shadow 6s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scale(.86); opacity: .7; } }
.orbit-chip { position: absolute; z-index: 3; padding: 9px 15px; border-radius: 999px; background: rgba(22, 16, 16, .86); border: 1px solid var(--line-2); backdrop-filter: blur(8px); font: 700 12px/1 var(--mono); animation: bob 5s ease-in-out infinite; }
.o1 { left: 2%; top: 20%; color: #7cc4ff; }
.o2 { right: 4%; top: 42%; color: #8fe3a7; animation-delay: -1.6s; }
.o3 { left: 10%; bottom: 17%; color: var(--bone); animation-delay: -3.2s; }
@keyframes bob { 50% { transform: translateY(-14px); } }

@media (max-width: 860px) {
  .case-phone { grid-template-columns: 1fr; }
  .phone-stage { height: 580px; }
  .phone { width: 256px; height: 528px; }
  .phone-stage::before { width: 380px; height: 380px; }
  .phone-stage::after { width: 340px; height: 340px; }
  .o1 { left: 0; } .o2 { right: 0; } .o3 { left: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  .phone-float, .phone-shadow, .orbit-chip, .phone-stage::after, .cv-limit, .cv-pingo img { animation: none; }
  .hero .giant > span, .hero .portrait, .hero-intro, .hero-side { translate: none; }
}

/* ---------- Conversaê: WhatsApp Web, a IA negociando e o Pingo em 3D ---------- */
.case-cv { grid-template-columns: 1.2fr .8fr; }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cv-stage { position: relative; height: 650px; perspective: 1600px; }
.cv-stage::before { content: ""; position: absolute; left: 55%; top: 50%; width: 640px; height: 640px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 45, 31, .26), rgba(255, 45, 31, .06) 60%, transparent 74%); pointer-events: none; }
.cv-window {
  position: absolute; left: 0; top: 40px; z-index: 1;
  width: 66%; height: 510px;
  display: flex; flex-direction: column;
  border-radius: 14px; overflow: hidden;
  background: #0b141a;
  box-shadow: inset 0 0 0 1px rgba(233, 237, 239, .1), 0 50px 90px -24px rgba(0, 0, 0, .8);
  transform: rotateY(var(--wy, 10deg)) rotateX(var(--wx, 3deg));
  transform-origin: 20% 50%;
  transition: transform .8s var(--out);
}
.cv-bar { flex: none; display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px 0 16px; background: var(--ink-3); border-bottom: 1px solid rgba(255, 255, 255, .05); }
.cv-bar > i { width: 10px; height: 10px; border-radius: 50%; background: rgba(242, 236, 230, .16); }
.cv-url { flex: 1; min-width: 0; height: 26px; margin: 0 10px 0 8px; display: flex; align-items: center; padding: 0 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); font: 500 11.5px/1 var(--mono); color: var(--mute); overflow: hidden; white-space: nowrap; }
.cv-ext { flex: none; display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 4px; border-radius: 999px; background: rgba(184, 107, 50, .16); border: 1px solid rgba(184, 107, 50, .55); font: 700 11px/1 var(--body); color: #f2c49c; }
.cv-ext b { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: #b86b32; color: #fff4df; font-size: 10.5px; }
.cv-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #202c33; }
.cv-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #54656f; color: #e9edef; font: 700 13px/1 var(--body); }
.cv-head b { display: block; font-size: 15px; font-weight: 600; color: #e9edef; }
.cv-head small { font-size: 12.5px; color: #8696a0; }
.cv-chat {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  padding: 16px 5% 12px; overflow: hidden;
  background: #0b141a radial-gradient(rgba(233, 237, 239, .05) 1px, transparent 1.5px) 0 0 / 16px 16px;
  transition: opacity .4s;
}
.cv-msg { position: relative; flex: none; max-width: 82%; padding: 7px 10px 8px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: #e9edef; animation: cvIn .4s var(--out); }
.cv-msg time { float: right; margin: 7px 0 -5px 10px; font-size: 11px; color: rgba(233, 237, 239, .6); }
.cv-msg.in { align-self: flex-start; background: #202c33; border-top-left-radius: 2px; }
.cv-msg.out { align-self: flex-end; background: #005c4b; border-top-right-radius: 2px; }
.cv-ai { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font: 700 11px/1.2 var(--body); color: #f2c49c; }
.cv-ai::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e08a4c; }
.cv-msg.typing { display: flex; gap: 4px; padding: 12px 14px; }
.cv-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(233, 237, 239, .55); animation: dot 1.2s infinite; }
.cv-msg.typing i:nth-child(2) { animation-delay: .15s; }
.cv-msg.typing i:nth-child(3) { animation-delay: .3s; }
.cv-card { flex: none; align-self: center; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 9px 16px 9px 10px; border-radius: 10px; background: #182229; border: 1px solid rgba(61, 220, 132, .35); font: 600 13px/1.2 var(--body); color: #d7f5e2; animation: cvIn .5s var(--out); }
.cv-card i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #3ddc84; color: #06200f; font-style: normal; font-size: 12px; }
.cv-card b { color: #3ddc84; }
@keyframes cvIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.cv-input { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: #202c33; }
.cv-input span { flex: 1; padding: 9px 14px; border-radius: 8px; background: #2a3942; font-size: 13px; color: #8696a0; }
.cv-input i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #00a884; color: #0b141a; font-style: normal; font-size: 13px; }

.cv-limit { position: absolute; right: 0; top: 64px; z-index: 3; display: grid; gap: 3px; padding: 12px 16px 13px; border-radius: 12px; background: rgba(22, 16, 16, .88); backdrop-filter: blur(8px); border: 1px solid var(--line-2); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); color: var(--bone); animation: bob 5s ease-in-out -2s infinite; transition: border-color .3s, scale .45s var(--out); }
.cv-limit small { font: 500 11px/1.2 var(--body); color: var(--mute); }
.cv-limit b { font: 400 34px/1 var(--display); color: var(--red); }
.cv-limit span { font-size: 11.5px; color: var(--mute); }
.cv-limit.hit { border-color: var(--red); scale: 1.08; }
.cv-limit.hit::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--red); animation: cvRing 1s var(--out) forwards; }
@keyframes cvRing { from { opacity: 1; } to { opacity: 0; transform: scale(1.3); } }

.cv-pingo { position: absolute; right: -10%; bottom: 0; z-index: 2; width: 54%; height: 67%; pointer-events: none; }
.cv-pingo canvas { display: block; width: 100%; height: 100%; }
.cv-pingo img { position: absolute; left: 50%; bottom: 12%; width: 50%; height: auto; translate: -50% 0; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .55)); animation: float 6s ease-in-out infinite; }
.cv-pingo.live img { display: none; }
.cv-o1 { left: -1%; top: 0; z-index: 3; color: #f2c49c; }
.cv-o2 { left: 30%; bottom: 3%; color: var(--bone); animation-delay: -2.4s; }

@media (max-width: 860px) {
  .case-cv { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cv-stage { height: 660px; }
  .cv-window { width: 100%; height: 470px; top: 0; transform: none; }
  .cv-msg { font-size: 13.5px; }
  .cv-limit { left: 0; right: auto; top: auto; bottom: 46px; }
  .cv-limit b { font-size: 28px; }
  .cv-pingo { width: 60%; height: 255px; right: -6%; }
  .cv-o1, .cv-o2 { display: none; }
}

/* rótulos dos cursores trocam de tecnologia */
.cur b.swap { animation: swap .4s var(--out); }
@keyframes swap { from { opacity: 0; transform: translateY(5px); } }
