/* Melhorias do portfólio no celular (out/2026)
   Referências: GSAP Demo Hub (text-masking, rolling-text, text-scrambling, card-stack,
   directionally-aware-header, link-to-scroll-progress) e Origin Kit (Slide Fill Button, Emoji Burst).
   Tudo escopado em .is-mobile: a versão de computador não muda. */

/* Barra de progresso de leitura */
.mm-progress { display: none; }
.is-mobile .mm-progress { display: block; position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, #FF5A1F, #FFB347); transform-origin: left; transform: scaleX(0); }

/* Títulos de seção "// CLIENTES": cursor piscando depois do embaralhado */
.is-mobile #mobile-fallback h2.mm-typed::after { content: "_"; margin-left: .15em; animation: mm-blink 1s steps(1) infinite; }
@keyframes mm-blink { 50% { opacity: 0; } }

/* Palavra que troca no selo do topo */
.is-mobile .mm-roll { display: inline-grid; overflow: hidden; vertical-align: bottom; height: 1.35em; }
.is-mobile .mm-roll > span { grid-area: 1 / 1; white-space: nowrap; }
.mm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Linhas do subtítulo do topo entrando por máscara */
.is-mobile .mm-line { overflow: hidden; padding-bottom: .06em; }

/* Prints dos sites dentro dos cases: moldura de celular */
.case-shot { display: none; }
.is-mobile .case-shot { display: block; margin: -4px -4px 6px; border-radius: 18px; text-decoration: none; }
.is-mobile .case-phone { display: block; position: relative; height: 230px; overflow: hidden; border-radius: 18px;
  border: 6px solid #16120F; background: #16120F; box-shadow: 0 18px 30px -18px rgba(0,0,0,.55); }
.is-mobile .case-phone::before { content: ""; position: absolute; z-index: 2; top: 6px; left: 50%; width: 54px; height: 6px; margin-left: -27px;
  border-radius: 6px; background: #16120F; }
.is-mobile .case-phone img { display: block; width: 100%; height: auto; transform: translateY(0); transition: transform 3.2s cubic-bezier(.45,0,.2,1); }
.is-mobile .snap-item.is-active .case-phone img { transform: translateY(-38%); }   /* o site "rola" sozinho no card ativo */
.is-mobile .case-phone::after { content: "ver o site ↗"; position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: 4px 9px; border-radius: 999px;
  font: 700 10px/1.4 "Space Mono", monospace; letter-spacing: .04em; color: #fff; background: rgba(22,18,15,.78); }

/* Carrosséis: contador "03 / 10", barra de progresso e dica de arrastar (no lugar das bolinhas) */
.is-mobile #project-dots, .is-mobile #social-dots { display: none !important; }
.mm-car { display: none; }
.is-mobile .mm-car { display: flex; align-items: center; gap: 12px; margin-top: 2px; font: 700 12px/1 "Space Mono", monospace; color: #9A3412; }
.dark .is-mobile .mm-car, .is-mobile.dark .mm-car { color: #FBBF24; }
.is-mobile .mm-car-bar { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(194,65,12,.18); overflow: hidden; }
.is-mobile .mm-car-bar i { position: absolute; inset: 0; background: currentColor; transform-origin: left; transform: scaleX(.1); transition: transform .45s cubic-bezier(.16,1,.3,1); }
.is-mobile .mm-car-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(194,65,12,.35); background: transparent; color: inherit; font-size: 16px; }
.is-mobile .mm-car-btn:disabled { opacity: .3; }
.is-mobile .mm-hint { position: absolute; right: 14px; top: 170px; z-index: 3; padding: 7px 11px; border-radius: 999px; pointer-events: none;
  font: 700 11px/1 "Space Mono", monospace; color: #fff; background: rgba(194,65,12,.92); box-shadow: 0 8px 18px -8px rgba(0,0,0,.5);
  animation: mm-nudge 1.4s ease-in-out infinite; transition: opacity .4s; }
.is-mobile .mm-hint.off { opacity: 0; }
@keyframes mm-nudge { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(-8px, -50%); } }

/* "Modelos prontos": textos de 8–9 px ficavam ilegíveis */
.is-mobile #mobile-socials-carousel [class*="text-[8px]"], .is-mobile #mobile-socials-carousel [class*="text-[9px]"] { font-size: 11px !important; line-height: 1.35; }
.is-mobile #mobile-socials-carousel [class*="text-[11px]"] { font-size: 13px !important; }
.is-mobile #mobile-socials-carousel a.tap-target { min-height: 40px; display: inline-flex; align-items: center; }

/* Terminal da stack: cursor no fim enquanto "digita" */
.is-mobile .mm-term-cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: -2px; margin-left: 2px; background: #F59E0B; animation: mm-blink 1s steps(1) infinite; }

/* WhatsApp flutuante: some no topo (já tem o botão grande) e no formulário (cobria o "Enviar") */
.is-mobile #mobile-wa-fab { transition: transform .45s cubic-bezier(.16,1,.3,1), opacity .3s; }
.is-mobile #mobile-wa-fab.mm-off { transform: translateY(140%) scale(.8); opacity: 0; pointer-events: none; }

/* Botão de enviar o orçamento: preenchimento que desliza + confete de emoji */
.is-mobile .mm-fill { position: relative; overflow: hidden; isolation: isolate; }
.is-mobile .mm-fill::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #16a34a; transform: translateX(-101%); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.is-mobile .mm-fill.sent::before { transform: none; }
.mm-burst { position: fixed; z-index: 90; pointer-events: none; font-size: 22px; line-height: 1; }

@media (prefers-reduced-motion: reduce) {
  .is-mobile .case-phone img { transition: none; }
  .is-mobile .mm-hint { animation: none; }
}
