/* Ponto para Empresas · cadastro
   Estrutura e animações: conversa no padrão do diagnóstico BMR.
   Identidade: Ponto (creme #F8F3DD, preto #1A1A1A, amarelo #FFD900, Nexa + Literata). */

/* Nexa: ascendente = altura de maiúscula, então o texto sobe dentro das caixas no Mac.
   Os overrides centralizam a fonte igual em Mac, Windows e Android. */
@font-face { font-family: "Nexa"; src: url("../fonts/nexa-book.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; ascent-override: 84%; descent-override: 16%; line-gap-override: 0%; }
@font-face { font-family: "Nexa"; src: url("../fonts/nexa-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; ascent-override: 84%; descent-override: 16%; line-gap-override: 0%; }
@font-face { font-family: "Literata"; src: url("../fonts/literata-var.woff2") format("woff2-variations"), url("../fonts/literata-var.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  --papel: #F8F3DD;
  --tinta: #1A1A1A;
  --amarelo: #FFD900;
  --vidro: rgba(252, 250, 240, .74);
  --borda-vidro: rgba(26, 26, 26, .09);
  --toque: #FCF0AE;
  --apagado: rgba(26, 26, 26, .42);
  --texto: "Nexa", "Helvetica Neue", Arial, sans-serif;
  --display: "Literata", Georgia, "Times New Roman", serif;
  --gutter: clamp(18px, 3.4vw, 52px);
  --col: min(600px, calc(100vw - 2 * var(--gutter)));
  --borda: clamp(16px, 4.2vh, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--papel); }
body {
  color: var(--tinta);
  font-family: var(--texto);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--tinta); color: var(--papel); }
:focus-visible { outline: 1.5px solid var(--tinta); outline-offset: 3px; }

/* rótulos: o "mono" da BMR vira Nexa Bold em caixa alta */
.rotulo-tipo, .pilula, .rotulo, .dica, .erro, .tecla, .info, .balao.desc, .selo {
  font-family: var(--texto);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- palco ---------- */
.tela {
  position: fixed;
  left: 0;
  top: var(--vt, 0px);
  width: 100vw;
  height: var(--vh, 100dvh);
  overflow: clip;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--papel);
}

.progresso {
  position: absolute; left: 0; top: 0; z-index: 3;
  height: 2px; width: 0;
  background: var(--tinta);
  transition: width .55s var(--ease);
}

/* relógio de ponto: o arco amarelo e o ponto andam a cada resposta (7 marcas, 7 perguntas) */
.anel {
  position: absolute;
  left: 50%; top: 50%;
  width: min(66vh, 600px);
  aspect-ratio: 1;
  translate: -50% -50%;
  pointer-events: none;
  z-index: 0;
}
.anel svg { display: block; width: 100%; height: 100%; overflow: visible; }
.anel .trilho { fill: none; stroke: var(--tinta); stroke-opacity: .12; stroke-width: .28; }
.anel .marcos line { stroke: var(--tinta); stroke-opacity: .32; stroke-width: .32; stroke-linecap: round; }
.anel .arco {
  fill: none; stroke: var(--amarelo); stroke-width: 2.1; stroke-linecap: round;
  stroke-dasharray: 100 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.1s var(--ease);
}
.anel .ponteiro { transform-box: view-box; transform-origin: 50px 50px; transition: transform 1.1s var(--ease); }
.anel .ponteiro circle { fill: var(--amarelo); stroke: var(--tinta); stroke-width: .5; }
.anel.fechou { animation: ponto-bate .9s var(--ease) .5s both; }

.topo {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: var(--borda) var(--gutter) 10px;
}
.pilula {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 13px; margin: 0;
  border: 1.5px solid var(--tinta); border-radius: 999px;
  background: var(--papel);
  white-space: nowrap;
}
.pilula b { font-weight: 700; }
.contador { font-variant-numeric: tabular-nums; }
.contador span { opacity: .55; }

.marcas {
  position: absolute; left: var(--gutter); right: var(--gutter);
  top: clamp(70px, 13.6vh, 128px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  pointer-events: none; z-index: 0;
}
.marcas span { display: flex; gap: 10px; align-items: center; }
.marcas span:nth-child(2), .marcas span:nth-child(3) { visibility: hidden; }
.marcas svg { width: 13px; height: 13px; color: var(--tinta); }

.wordmark {
  position: absolute; z-index: 2;
  left: var(--gutter);
  bottom: calc(var(--borda) + env(safe-area-inset-bottom));
  width: 128px;
  display: block;
}
.wordmark img { display: block; width: 100%; height: auto; }

.info {
  position: absolute; z-index: 0;
  right: var(--gutter);
  bottom: calc(var(--borda) + env(safe-area-inset-bottom));
  width: min(280px, calc((100vw - var(--col)) / 2 - var(--gutter) - 40px));
  display: grid; gap: 18px;
  margin: 0;
}
.info p { margin: 0; }
.lista { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 2.4em; }

/* ---------- conversa ---------- */
.conversa {
  position: relative; z-index: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 32px, #000 calc(100% - 10px), transparent);
          mask-image: linear-gradient(transparent, #000 32px, #000 calc(100% - 10px), transparent);
}
.conversa::-webkit-scrollbar { display: none; }
.fio {
  width: var(--col); margin: 0 auto;
  padding: 36px 0 18px;
  display: flex; flex-direction: column; gap: 14px;
}

.passo, .fim { display: contents; }
.grupo { animation: ponto-entra .4s var(--ease) both; }
.grupo.bot { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.avatar {
  grid-area: 2 / 1;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--tinta);
  display: grid; place-items: center;
}
.avatar svg { width: 17px; height: 17px; display: block; color: var(--amarelo); }
.rotulo {
  grid-area: 1 / 2;
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 6px;
}
.rotulo::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amarelo);
  box-shadow: 0 0 0 1.5px var(--tinta);
  flex: 0 0 auto;
  translate: 0 -.5px;
}
.baloes { grid-area: 2 / 2; display: grid; gap: 6px; justify-items: start; min-width: 0; }

.balao {
  max-width: min(44ch, 100%);
  margin: 0;
  padding: 10px 16px 11px;
  border-radius: 18px;
  font-size: 17px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.bot .balao {
  background: var(--vidro);
  border: 1px solid var(--borda-vidro);
  -webkit-backdrop-filter: blur(16px) saturate(.9);
          backdrop-filter: blur(16px) saturate(.9);
  animation: ponto-entra .3s var(--ease) both;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bot .balao { background: rgba(252, 250, 240, .96); }
}
.bot .baloes > .balao:first-child { border-top-left-radius: 6px; }
.balao.pergunta {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.22;
  letter-spacing: -.012em;
  padding: 10px 16px 12px;
}
.balao.desc { padding: 8px 14px 9px; line-height: 1.55; }
.balao a { font-weight: 700; }
.sub {
  text-decoration: underline;
  text-decoration-color: var(--amarelo);
  text-decoration-thickness: .2em;
  text-underline-offset: .16em;
  text-decoration-skip-ink: none;
}

.balao.digitando { display: inline-flex; gap: 5px; align-items: center; padding: 15px 16px; }
.digitando i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--tinta); opacity: .22;
  animation: ponto-pulo 1.05s ease infinite;
}
.digitando i:nth-child(2) { animation-delay: .15s; }
.digitando i:nth-child(3) { animation-delay: .3s; }

/* resposta de quem preenche */
.grupo.eu { display: flex; justify-content: flex-end; }
.eu .balao {
  appearance: none;
  position: relative;
  border: 0;
  background: var(--tinta);
  color: var(--papel);
  border-bottom-right-radius: 6px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.eu .balao::before {
  content: "Corrigir";
  position: absolute; right: calc(100% + 10px); top: 50%;
  translate: 0 -50%;
  padding-right: 16px;
  white-space: nowrap;
  font: 700 11px/1 var(--texto);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tinta);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%231A1A1A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8a4.5 4.5 0 1 0 1.4-3.3'/%3E%3Cpath d='M3 2.5v3h3'/%3E%3C/svg%3E") right center / 11px 11px no-repeat;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.eu .balao:focus-visible::before { opacity: 1; }
.eu .balao[disabled] { cursor: default; }
.eu .balao[disabled]::before { display: none; }

/* opções */
.opcoes { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.opcao {
  appearance: none;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; max-width: 100%;
  padding: 8px 18px 8px 8px;
  border: 1.5px solid var(--tinta);
  border-radius: 999px;
  cursor: pointer;
  text-align: left;
  background: var(--vidro);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  font-size: 16px;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
  animation: ponto-entra .3s var(--ease) both;
  animation-delay: calc(var(--k, 0) * 70ms);
}
.opcao .tecla {
  flex: 0 0 auto;
  height: 26px; min-width: 34px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--tinta); color: var(--papel);
  line-height: 1;
}
.opcao.antes { box-shadow: inset 0 0 0 1px var(--tinta); }
.opcao.escolhida { background: var(--tinta); color: var(--papel); animation: ponto-pisca .3s steps(2) 1; }
.opcao.escolhida .tecla { background: var(--amarelo); color: var(--tinta); }
.opcoes.feito .opcao:not(.escolhida) { opacity: .35; transition: opacity .2s; }

/* chamada final: o botão do site da Ponto */
.chamada {
  appearance: none;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 52px;
  padding: 6px 6px 6px 22px;
  border: 0; border-radius: 999px;
  background: var(--amarelo); color: var(--tinta);
  font: 700 13px/1 var(--texto);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 1.5px var(--tinta);
  animation: ponto-entra .3s var(--ease) both;
  -webkit-tap-highlight-color: transparent;
}
.chamada .seta {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tinta); color: var(--papel);
  flex: 0 0 auto;
}
.chamada .seta svg { width: 14px; height: 14px; transition: transform .3s var(--ease); }
.selo { align-self: flex-start; margin: 0 0 0 42px; opacity: .6; }

/* ---------- campo de resposta ---------- */
.compositor {
  position: relative; z-index: 2;
  width: var(--col); margin: 0 auto;
  padding: 6px 0 calc(var(--borda) + env(safe-area-inset-bottom));
  display: grid; gap: 8px;
}
.erro { margin: 0; padding-left: 22px; }
.campo {
  display: flex; align-items: center; gap: 8px;
  height: 56px;
  padding: 0 7px 0 22px;
  border: 1.5px solid var(--tinta);
  border-radius: 999px;
  background: rgba(252, 250, 240, .88);
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
  transition: opacity .2s, box-shadow .2s;
}
.campo.espera { opacity: .45; }
.campo:focus-within { box-shadow: 0 0 0 3px rgba(26, 26, 26, .08); }
.resposta {
  appearance: none;
  flex: 1 1 0%; min-width: 0; height: 100%;
  margin: 0; padding: 0;
  border: 0; border-radius: 0;
  background: transparent;
  color: var(--tinta);
  font-family: var(--texto);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.2;
}
.resposta::placeholder { color: var(--apagado); opacity: 1; }
.resposta:focus { outline: none; }
.enviar {
  appearance: none;
  flex: 0 0 auto;
  width: 42px; height: 42px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--tinta); color: var(--papel);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.enviar svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.campo.espera .enviar { cursor: default; }
.dica { justify-self: end; margin: 0; padding-right: 22px; opacity: .7; display: inline-flex; align-items: center; gap: 6px; }
.dica svg { width: 11px; height: 11px; }

/* selo "Powered by Netlify" (plano grátis): iframe de 202x64 fixo no canto inferior direito.
   O app.js marca .tem-selo quando ele existe; o layout abre espaço para nada ficar embaixo dele. */
.tela.tem-selo .wordmark,
.tela.tem-selo .info { bottom: calc(80px + env(safe-area-inset-bottom)); }
@media (max-width: 1010px), (max-aspect-ratio: 1/1) {
  .tela.tem-selo:not(.teclado) .compositor { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .tela.tem-selo:has(.compositor[hidden]) .fio { padding-bottom: 84px; }
}

/* ---------- interações ---------- */
@media (hover: hover) {
  .opcao:hover { background: var(--toque); }
  .opcao.escolhida:hover { background: var(--tinta); }
  .eu .balao:not([disabled]):hover::before { opacity: .75; }
  .enviar:hover svg { transform: translateX(2px); }
  .chamada:hover .seta svg { transform: translate(2px, -2px); }
}
@media (hover: none) {
  .dica { display: none; }
  .eu .balao:not([disabled])::before { content: ""; width: 12px; height: 12px; padding: 0; opacity: .4; background-size: 12px 12px; }
}

/* ---------- animações ---------- */
@keyframes ponto-entra { from { opacity: 0; transform: translateY(8px); } }
@keyframes ponto-pulo { 0%, 60%, 100% { opacity: .22; transform: none; } 30% { opacity: .85; transform: translateY(-2px); } }
@keyframes ponto-pisca { 50% { background: transparent; color: var(--tinta); } }
@keyframes ponto-bate { 0% { scale: 1; } 35% { scale: 1.035; } 100% { scale: 1; } }

/* ---------- telas menores ---------- */
@media (max-width: 1120px) { .info { display: none; } }
@media (min-aspect-ratio: 1/1) and (max-height: 760px) {
  .marcas { display: none; }
  .wordmark { width: 104px; }
}
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  :root { --gutter: 16px; --borda: 16px; }
  .marcas, .wordmark, .info { display: none; }
  .anel { width: min(84vw, 50vh); }
  .fio { padding-top: 24px; gap: 12px; }
  .balao { font-size: 16px; max-width: 88%; }
  .bot .balao { max-width: 100%; }
  .balao.pergunta { font-size: 19px; }
  .compositor { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .campo { height: 52px; padding-left: 18px; }
  .eu .balao::before { right: calc(100% + 8px); }
  .tela.teclado .compositor { padding-bottom: 8px; }
  .tela.teclado .dica { display: none; }
}
@media (max-width: 380px) { .pilula { padding: 0 10px; font-size: 10px; } }

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
