/* Caderno do Gestor · componentes v1.7.0
   Depende de ../tokens.css (variáveis --vs-*). Classes com prefixo vs- pra não colidir.
   Cada componente aqui saiu de uma peça aprovada pelo Victor (guia de criativos bike shop, 16/10/2026).
   Regra geral: fundo neutro, a cor vai na palavra. Mobile primeiro. Toda animação some com movimento reduzido. */

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.vs-pagina { background: var(--vs-fundo); color: var(--vs-texto); font-family: var(--vs-fonte-corpo); font-size: 16px; line-height: 1.5; margin: 0; }
.vs-pagina h1, .vs-pagina h2, .vs-pagina h3, .vs-titulo { font-family: var(--vs-fonte-titulo); font-weight: var(--vs-peso-titulo); letter-spacing: 0; text-wrap: balance; margin: 0; }
.vs-apoio { color: var(--vs-apoio); }
.vs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- cor na palavra ---------- */
.vs-ideia { color: var(--vs-destaque-texto); }                      /* azul no claro, branco no escuro */
.vs-erro  { color: var(--vs-vermelho); }
.vs-marca-texto {                                                    /* 1 palavra/trecho por peça */
  background: linear-gradient(transparent 52%, var(--vs-cor-marca-texto) 52%, var(--vs-cor-marca-texto) 94%, transparent 94%);
  padding: 0 .08em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
:root[data-theme="dark"] .vs-marca-texto { background: var(--vs-cor-marca-texto); color: #000; border-radius: 3px; padding: 0 .14em; }

/* ---------- pílulas ---------- */
.vs-pilula-erro, .vs-pilula-alerta {
  display: inline-flex; align-items: flex-start; gap: 8px; justify-self: start;
  font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--vs-vermelho);
  background: color-mix(in srgb, var(--vs-vermelho) 10%, transparent);
  padding: 7px 14px 7px 11px; border-radius: var(--vs-raio-pilula);
}
.vs-pilula-erro::before { content: "✗"; font-weight: 800; }
.vs-pilula-alerta { font-size: 13px; padding: 6px 10px; }

/* ---------- número em círculo ---------- */
.vs-passo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--vs-raio-pilula);
  font-family: var(--vs-fonte-titulo); font-weight: 800; font-size: 13px; color: #fff;
  background: var(--vs-efeito-gradiente-chip); box-shadow: var(--vs-sombra-chip-azul); }

/* ---------- painel azul (topo) ---------- */
.vs-painel-azul { position: relative; overflow: hidden; border-radius: var(--vs-raio-painel); color: #fff;
  padding: clamp(24px, 5vw, 48px); background: var(--vs-efeito-painel-azul); box-shadow: var(--vs-sombra-painel-azul); }
.vs-painel-azul > * { position: relative; z-index: 1; }
.vs-grao::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- card ---------- */
.vs-card { padding: clamp(20px, 4vw, 32px); border-radius: var(--vs-raio-painel); border: 1px solid var(--vs-linha); background: var(--vs-fundo); }
.vs-card-suave { padding: clamp(20px, 4vw, 32px); border-radius: var(--vs-raio-painel); background: var(--vs-suave); }

/* ---------- número grande (meta, dado) ---------- */
.vs-numero { font-family: var(--vs-fonte-titulo); font-weight: 800; line-height: 1; color: var(--vs-destaque-texto); font-variant-numeric: tabular-nums; }

/* ---------- caminho (etapas até o objetivo) ---------- */
.vs-caminho { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vs-caminho li { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--vs-raio-card); background: color-mix(in srgb, var(--vs-texto) 6%, var(--vs-fundo)); }
.vs-caminho b { font-family: var(--vs-fonte-titulo); font-weight: 800; font-size: 24px; line-height: 1.1; color: var(--vs-destaque-texto); }
.vs-caminho span { font-size: 13px; color: var(--vs-apoio); }
.vs-caminho li.vs-objetivo { background: var(--vs-efeito-gradiente-chip); }
.vs-caminho li.vs-objetivo b, .vs-caminho li.vs-objetivo span { color: #fff; }

/* ---------- menu em pílula com vidro ---------- */
.vs-menu { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 10; max-width: 880px; margin: 12px auto 0;
  display: flex; align-items: center; gap: 16px; padding: 8px 8px 8px 18px; border-radius: var(--vs-raio-pilula);
  background: color-mix(in srgb, var(--vs-fundo) 58%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid color-mix(in srgb, var(--vs-texto) 9%, transparent); box-shadow: var(--vs-sombra-menu-vidro); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .vs-menu { background: var(--vs-fundo); } }
.vs-menu a { color: var(--vs-texto); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: var(--vs-raio-pilula); }
.vs-tema { display: flex; align-items: center; gap: 2px; flex: none; }
.vs-tema button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px;
  line-height: 1; cursor: pointer; font-size: 13px; font-weight: 500; border-radius: var(--vs-raio-pilula); color: var(--vs-apoio); }
.vs-tema button[aria-pressed="true"] { background: var(--vs-texto); color: var(--vs-fundo); }
.vs-tema button:focus-visible, .vs-menu a:focus-visible { outline: 2px solid var(--vs-cor-azul-fill-escuro); outline-offset: 2px; }
.vs-logo-escuro { display: none !important; }
:root[data-theme="dark"] .vs-logo-claro { display: none !important; }
:root[data-theme="dark"] .vs-logo-escuro { display: block !important; }

/* ---------- desenho vivo (flipbook 2 quadros + balanço) ---------- */
.vs-flip { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: var(--vs-raio-card); overflow: hidden; background: #fff; }
.vs-flip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-flip img + img { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .vs-flip.vs-vivo img + img { animation: vs-quadro2 var(--vs-fps, 1s) steps(1) infinite; }
  .vs-flip.vs-vivo.vs-gira { --vs-fps: .5s; animation: vs-gira 1.6s ease-in-out infinite; }
  .vs-flip.vs-vivo.vs-balanca { --vs-fps: 1.1s; animation: vs-balanca 2.2s ease-in-out infinite; }
  .vs-flip.vs-vivo.vs-fala { --vs-fps: .6s; animation: vs-fala 1.2s ease-in-out infinite; }
}
@keyframes vs-quadro2 { 0% { opacity: 0 } 50% { opacity: 1 } }
@keyframes vs-gira { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(-1.4deg) scale(1.015) } }
@keyframes vs-balanca { 0%, 100% { transform: rotate(0) } 50% { transform: rotate(1deg) } }
@keyframes vs-fala { 0%, 100% { transform: translateY(0) } 30% { transform: translateY(-3px) } 60% { transform: translateY(1px) } }

/* ---------- entrada ao rolar ---------- */
.vs-entra { transition: opacity var(--vs-duracao-entrada) var(--vs-curva-entrada), transform 1.1s var(--vs-curva-entrada), filter var(--vs-duracao-entrada) var(--vs-curva-entrada); transition-delay: var(--vs-atraso, 0ms); }
.vs-entra.vs-fora { opacity: 0; transform: translateY(64px) scale(.97); filter: blur(8px); }
@media (prefers-reduced-motion: reduce) { .vs-entra, .vs-entra.vs-fora { opacity: 1; transform: none; filter: none; transition: none; } }

/* ---------- capa formato tweet (post 1080x1350, em container-type) ---------- */
.vs-tweet { container-type: inline-size; aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: center; padding: 9% 7.5%; font-family: var(--vs-fonte-corpo); }
.vs-tweet.vs-claro { background: #fff; color: #0F1419; } .vs-tweet.vs-escuro { background: #000; color: #E7E9EA; }
.vs-tweet .vs-quem { display: flex; gap: 3cqw; align-items: center; margin-bottom: 5.2cqw; }
.vs-tweet .vs-quem img { width: 11.5cqw; height: 11.5cqw; border-radius: 50%; object-fit: cover; }
.vs-tweet .vs-quem b { display: block; font-weight: 700; font-size: 4.6cqw; }
.vs-tweet .vs-quem small { display: block; font-size: 4.2cqw; color: var(--vs-cor-x-handle-claro); }
.vs-tweet.vs-escuro .vs-quem small { color: var(--vs-cor-x-handle-escuro); }
.vs-tweet p { margin: 0; font-size: 4.4cqw; line-height: 1.45; } .vs-tweet p + p { margin-top: 4.4cqw; }
.vs-tweet .vs-link { color: var(--vs-cor-azul); } .vs-tweet.vs-escuro .vs-link { color: #fff; text-decoration: underline; text-decoration-color: var(--vs-cor-azul-fill-escuro); }

/* ---------- rodapé com rosto ---------- */
.vs-rodape { display: grid; gap: 18px; padding-top: 28px; border-top: 1px solid var(--vs-linha); }
.vs-rodape .vs-assina { display: flex; align-items: center; gap: 16px; }
.vs-rodape .vs-foto { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--vs-fundo), 0 0 0 5px var(--vs-cor-azul); }
.vs-rodape .vs-legal { font-size: 12px; color: var(--vs-apoio); padding-top: 14px; border-top: 1px solid var(--vs-linha); }

/* ---------- celular em story (progressão no formato que o cliente conhece) ---------- */
.vs-celular { width: 100%; max-width: 230px; padding: 9px; border-radius: 34px; background: #050B24; box-shadow: 0 30px 60px -20px rgba(5,11,36,.75), inset 0 0 0 1px rgba(255,255,255,.12); }
.vs-celular-tela { position: relative; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: #fff; }
.vs-celular-tela .vs-qd { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.vs-celular-tela .vs-qd.on { opacity: 1; }
.vs-stories { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.vs-st { height: 4px; border-radius: 999px; background: rgba(10,39,168,.18); overflow: hidden; }
.vs-st i { display: block; height: 100%; width: 0; background: var(--vs-cor-azul); border-radius: 999px; }
.vs-st.done i { width: 100%; } .vs-st.run i { animation: vs-enche var(--dur, 3s) linear forwards; }
@keyframes vs-enche { from { width: 0 } to { width: 100% } }
.vs-celular-tela [data-vs-ant], .vs-celular-tela [data-vs-prox] { all: unset; position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; cursor: pointer; }
.vs-celular-tela [data-vs-ant] { left: 0; } .vs-celular-tela [data-vs-prox] { right: 0; }
@media (prefers-reduced-motion: reduce) { .vs-st.run i { animation: none; width: 100%; } }

@media (max-width: 640px) {
  .vs-caminho { grid-template-columns: 1fr 1fr; }
  .vs-menu { gap: 10px; padding: 6px 6px 6px 16px; }
  .vs-menu .vs-links { display: none; }
  .vs-tema button { height: 32px; padding: 0 12px; }
}
