/* Animação "Personagem UGC com IA" (js/motion-ugc.js)
   Palco 4:5 com um celular no centro. Medidas do palco em cqw/cqh do .mug;
   dentro da tela, em cqw da própria tela (.mug__screen). */

.mugw { margin: 0; justify-self: center; width: min(100%, 460px); }
.mugw figcaption { margin-top: 12px; }

.mug {
  --base: #0a0d14;
  --e1: #1d4ed8;
  --e2: #3b82f6;
  --red: #e3101b;
  position: relative;
  aspect-ratio: 4 / 5;
  container-type: size;
  overflow: hidden;
  isolation: isolate;
  border-radius: 22px;
  background: radial-gradient(70% 55% at 50% 45%, #13204a 0%, var(--base) 70%);
  border: 1px solid rgba(59, 130, 246, .18);
  color: #fff;
  font-family: Inter, -apple-system, "Segoe UI", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}
.mug__glow {
  position: absolute; left: 50%; top: 50%; width: 70cqw; height: 70cqw; margin: -35cqw 0 0 -35cqw;
  border-radius: 50%; background: radial-gradient(circle, rgba(59, 130, 246, .45), transparent 65%);
  filter: blur(4cqw); opacity: .55;
}

/* ---------- celular ---------- */
.mug__phone {
  /* centrado sem translate: o GSAP anima a escala do celular */
  position: absolute; inset: 0; margin: auto; height: 90cqh; aspect-ratio: 9 / 19.5;
  border-radius: 6.4cqh; padding: 1.1cqh; background: #05070c;
  box-shadow: 0 0 0 .35cqh #2a3245, 0 4cqh 10cqh rgba(0, 0, 0, .6), 0 0 8cqh rgba(59, 130, 246, .25);
}
.mug__screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 5.4cqh;
  background: #000; container-type: size;
}
.mug__notch { position: absolute; z-index: 9; left: 50%; top: 1.4cqh; width: 26cqw; height: 3.2cqh; translate: -50% 0; border-radius: 99px; background: #000; }
.mug__shine {
  position: absolute; z-index: 9; inset: -20% -80%; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .22) 50%, transparent 58%);
  opacity: 0;
}
.mug__fade { position: absolute; z-index: 10; inset: 0; background: #000; pointer-events: none; }

/* ---------- "vídeo" do personagem ---------- */
.mug__cam { position: absolute; inset: 0; overflow: hidden; transform-origin: 50% 38%; }
.mug__room {
  position: absolute; inset: 0;
  background:
    radial-gradient(18cqw 18cqw at 18% 22%, rgba(255, 200, 140, .55), transparent 70%),
    radial-gradient(10cqw 10cqw at 82% 16%, rgba(120, 170, 255, .5), transparent 70%),
    radial-gradient(14cqw 14cqw at 88% 48%, rgba(255, 170, 120, .35), transparent 70%),
    radial-gradient(8cqw 8cqw at 10% 58%, rgba(255, 255, 255, .25), transparent 70%),
    linear-gradient(180deg, #3b3f55 0%, #2a2b3a 45%, #1c1b25 100%);
  filter: blur(.6cqw);
}
.mug__room::after { /* janela desfocada atrás */
  content: ""; position: absolute; left: 56%; top: 6%; width: 38%; height: 40%; border-radius: 2cqw;
  background: linear-gradient(160deg, rgba(255, 236, 200, .55), rgba(255, 210, 160, .15)); filter: blur(2.4cqw);
}
/* rosto no terço de cima, legenda logo abaixo do queixo (o corpo do desenho continua para baixo) */
.mug__av { position: absolute; left: 50%; top: 11%; width: 104cqw; translate: -50% 0; overflow: visible; }
.mug__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* rastreamento facial (cena 2) */
.mug__track { position: absolute; left: 36%; top: 43%; width: 28%; height: 7.5%; opacity: 0; }
.mug__track i { position: absolute; width: 2.6cqw; height: 2.6cqw; border: .5cqw solid var(--e2); }
.mug__track i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.mug__track i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.mug__track i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.mug__track i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.mug__track span {
  position: absolute; left: 50%; top: 100%; margin-top: 1.4cqw; translate: -50% 0; white-space: nowrap;
  padding: .8cqw 2cqw; border-radius: 99px; background: rgba(29, 78, 216, .9); font: 700 2.8cqw/1 Inter, sans-serif; letter-spacing: .04em;
}

/* ---------- interface do Reels ---------- */
.mug__ui { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.mug__top { position: absolute; left: 5cqw; right: 5cqw; top: 7.5cqh; display: flex; justify-content: space-between; align-items: center; font: 800 5cqw/1 Inter, sans-serif; text-shadow: 0 .4cqw 1.6cqw rgba(0, 0, 0, .5); }
.mug__top svg { width: 6cqw; height: 6cqw; }
.mug__side { position: absolute; right: 3.5cqw; bottom: 24cqh; display: grid; gap: 4.4cqh; justify-items: center; }
.mug__side svg { width: 8cqw; height: 8cqw; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 .3cqw 1cqw rgba(0, 0, 0, .5)); }
.mug__side svg.on { fill: var(--red); stroke: var(--red); }
.mug__who { position: absolute; left: 4.5cqw; right: 18cqw; bottom: 6cqh; font: 600 3.6cqw/1.3 Inter, sans-serif; text-shadow: 0 .3cqw 1.2cqw rgba(0, 0, 0, .6); }
.mug__who p { margin: 0; display: flex; align-items: center; gap: 2cqw; }
.mug__who b { font-weight: 800; }
.mug__who em { font-style: normal; background: rgba(0, 0, 0, .35); padding: .6cqw 2.2cqw; border: .3cqw solid rgba(255, 255, 255, .8); border-radius: 1.6cqw; font-size: 3.2cqw; }
.mug__who small { display: block; margin-top: 1.2cqh; opacity: .85; font-size: 3.2cqw; font-weight: 500; }
.mug__pic { width: 8cqw; height: 8cqw; border-radius: 50%; overflow: hidden; background: #3b3f55; box-shadow: 0 0 0 .4cqw #fff; flex: none; }
.mug__pic svg { width: 200%; margin: -68% 0 0 -50%; overflow: visible; }

/* ondas sonoras */
.mug__wave { position: absolute; left: 4.5cqw; bottom: 17cqh; display: flex; align-items: center; gap: .9cqw; height: 7cqw; padding: 0 2.4cqw; border-radius: 99px; background: rgba(6, 9, 20, .55); backdrop-filter: blur(2cqw); }
.mug__wave i { width: .9cqw; height: 100%; border-radius: 1cqw; background: #fff; transform: scaleY(.15); transform-origin: 50% 50%; }
.mug__wave i:nth-child(3n) { background: #8fb4ff; }

/* legendas dinâmicas (palavra por palavra) */
.mug__cap {
  position: absolute; left: 6cqw; right: 6cqw; top: 61cqh; z-index: 5; text-align: center;
  font: 900 9.2cqw/1.04 Inter, sans-serif; text-transform: uppercase; letter-spacing: -.01em;
  pointer-events: none;
}
.mug__cap .wd {
  display: inline-block; margin: 0 .12em; opacity: 0; transform: scale(.6) translateY(.15em);
  color: #fff; -webkit-text-stroke: .9cqw #000; paint-order: stroke fill;
  text-shadow: 0 .7cqw 0 #000, 0 1.4cqw 3cqw rgba(0, 0, 0, .6);
  transition: transform .12s cubic-bezier(.2, 1.6, .4, 1), opacity .08s;
}
.mug__cap .wd.dito { opacity: 1; transform: none; }
.mug__cap .wd.agora { transform: scale(1.14) rotate(-2deg); }
.mug__cap .wd.azul { color: #4c8dff; }
.mug__cap .wd.verm { color: #ff3b45; }

/* ---------- cena 3: grade de cenários ---------- */
.mug__grid { position: absolute; inset: 0; z-index: 6; display: grid; grid-template-rows: auto 1fr 1fr 1fr; gap: 1.6cqh; padding: 8.5cqh 4cqw 4cqh; background: #070a12; visibility: hidden; }
.mug__msg { margin: 0 0 .4cqh; font: 900 6cqw/1.12 Inter, sans-serif; text-align: center; }
.mug__msg em { font-style: normal; color: #4c8dff; }
.mug__tile { position: relative; overflow: hidden; border-radius: 3.6cqw; box-shadow: 0 0 0 .3cqw rgba(255, 255, 255, .1); }
.mug__tile svg.av { position: absolute; left: 50%; top: 4%; width: 74%; translate: -50% 0; overflow: visible; }
.mug__tile--a { background: radial-gradient(40cqw 30cqw at 80% 20%, rgba(255, 190, 120, .6), transparent 70%), linear-gradient(160deg, #5a4a3e, #241d19); }
.mug__tile--b { background: radial-gradient(40cqw 30cqw at 20% 10%, rgba(140, 180, 255, .55), transparent 70%), linear-gradient(160deg, #2b3a66, #121a33); }
.mug__tile--c { background: radial-gradient(40cqw 30cqw at 70% 30%, rgba(255, 255, 255, .45), transparent 70%), linear-gradient(160deg, #6b6f7c, #2a2c34); }
.mug__tile b { position: absolute; left: 3cqw; top: 3cqw; padding: .9cqw 2.2cqw; border-radius: 99px; background: rgba(6, 9, 20, .75); font: 700 3cqw/1 Inter, sans-serif; }
.mug__q { position: absolute; right: 4cqw; top: 22%; width: 42%; padding: 2cqw; border-radius: 3cqw; background: #fff; color: #111; text-align: center; font: 700 2.8cqw/1.2 Inter, sans-serif; box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .4); }
.mug__q small { display: block; margin-bottom: 1cqw; padding: .8cqw; border-radius: 1.6cqw; background: linear-gradient(90deg, #6d28d9, #db2777); color: #fff; font-size: 2.4cqw; }
.mug__box { position: absolute; right: 7cqw; bottom: 10%; width: 22cqw; height: 18cqw; border-radius: 1.6cqw; background: linear-gradient(150deg, #1d4ed8, #3b82f6); box-shadow: 0 2cqw 4cqw rgba(0, 0, 0, .4); }
.mug__box::after { content: ""; position: absolute; inset: 30% 18%; border-radius: 1cqw; background: rgba(255, 255, 255, .85); }
.mug__dot { position: absolute; right: 3cqw; top: 3cqw; display: flex; align-items: center; gap: 1cqw; font: 700 2.6cqw/1 Inter, sans-serif; }
.mug__dot::before { content: ""; width: 1.8cqw; height: 1.8cqw; border-radius: 50%; background: var(--red); }

/* ---------- cena 4: fechamento ---------- */
.mug__end { position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 4cqh; padding: 0 7cqw; text-align: center; background: radial-gradient(80% 50% at 50% 40%, #142454, #070a12 75%); visibility: hidden; }
.mug__face { width: 30cqw; height: 30cqw; border-radius: 50%; overflow: hidden; background: #3b3f55; box-shadow: 0 0 0 1cqw #070a12, 0 0 0 1.6cqw var(--e2), 0 0 10cqw rgba(59, 130, 246, .6); }
.mug__face svg { width: 200%; margin: -68% 0 0 -50%; overflow: visible; }
.mug__end p { margin: 0; font: 300 6.4cqw/1.18 Inter, sans-serif; }
.mug__end p strong { display: block; font-weight: 900; }
.mug__end p em { font-style: normal; color: #4c8dff; }
.mug__cta {
  position: relative; display: inline-block; padding: 3.6cqw 6cqw; border-radius: 99px;
  background: var(--red); color: #fff; font: 800 4.2cqw/1 Inter, sans-serif; text-decoration: none;
  box-shadow: 0 1.6cqw 5cqw rgba(227, 16, 27, .55); pointer-events: none;
}
.mug__cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.mug__ring { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1cqw rgba(227, 16, 27, .8); opacity: 0; }

/* ---------- selos fora do celular ---------- */
.mug__badge, .mug__note {
  position: absolute; z-index: 11; display: inline-flex; align-items: center; gap: 1.6cqw;
  padding: 1.8cqw 3cqw; border-radius: 99px; white-space: nowrap;
  background: rgba(10, 13, 20, .82); border: 1px solid rgba(59, 130, 246, .55); backdrop-filter: blur(6px);
  font: 700 2.9cqw/1 Inter, sans-serif; box-shadow: 0 2cqw 5cqw rgba(0, 0, 0, .45);
}
.mug__badge { right: 1.5cqw; top: 1.5cqh; }
.mug__badge svg { width: 3.6cqw; height: 3.6cqw; fill: #8fb4ff; }
.mug__badge b { font-weight: 400; opacity: .75; }
.mug__note { left: 3.5cqw; opacity: 0; }
.mug__note::before { content: ""; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: #4ade80; box-shadow: 0 0 2cqw #4ade80; }

/* ---------- controles ---------- */
.mug__bar { position: absolute; z-index: 12; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .06); }
.mug__bar i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--e1), var(--e2)); transform-origin: 0 50%; transform: scaleX(0); }
.mug__btn {
  position: absolute; z-index: 12; right: 10px; bottom: 10px; display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%;
  background: rgba(10, 13, 20, .65); color: #fff; cursor: pointer; opacity: .75;
}
.mug__btn:hover, .mug__btn:focus-visible { opacity: 1; }
.mug__btn svg { width: 13px; height: 13px; fill: currentColor; }
.mug__btn .i-play, .mug__btn[data-on="false"] .i-pause { display: none; }
.mug__btn[data-on="false"] .i-play { display: block; }
.mug__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- modo vídeo (data-video): o arquivo real toca no celular ---------- */
.mug--video .mug__cap, .mug--video .mug__track, .mug--video .mug__grid, .mug--video .mug__note, .mug--video .mug__room { display: none; }
.mug--video .mug__cam { background: #000; }
.mug--video .mug__face, .mug--video .mug__pic { background: #1a2134 center 18% / cover no-repeat; }
.mug__som {
  position: absolute; z-index: 12; left: 10px; bottom: 10px; height: 34px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 99px; background: rgba(10, 13, 20, .7); color: #fff;
  font: 600 .8125rem/1 Inter, sans-serif; cursor: pointer;
}
.mug__som[aria-pressed="false"]::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); vertical-align: 1px; }
.mug__som:hover, .mug__som:focus-visible { background: rgba(29, 78, 216, .85); }
.mug--mudo .mug__wave { display: none; }
