/* Tela de entrada (sem-acesso.ejs). Cores, fonte e botão vêm do bemestar.css (Design System); aqui só diagramação:
   um passo por tela, margens e respiros largos, como o login do Canva. Mobile primeiro. */

.login { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.janela {
  container-type: inline-size;
  width: 100%; max-width: 440px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius-lg);
  padding: 40px 24px 28px;
}
.marca { font-family: var(--font-heading); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--primary); margin-bottom: 32px; }

/* Passos lado a lado; o trilho desliza e a altura acompanha o passo ativo (definida em JS). */
.trilho { display: flex; align-items: flex-start; width: calc(400% + 8px); margin: -4px; transition: transform .38s cubic-bezier(.4, 0, .2, 1), height .3s ease; }
.passo { width: 25%; padding: 4px; box-sizing: border-box; visibility: hidden; transition: visibility 0s .38s; }
.passo.ativo { visibility: visible; transition-delay: 0s; }
.passo h1 { font-family: var(--font-heading); font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--on-surface); outline: none; }
/* Textos que nunca quebram: a fonte acompanha a largura do cartão (100cqw). O divisor é quanto o texto mede em múltiplos da fonte
   (título 16,6; botão mais longo 13,3; o subtítulo é 88% do título e mede menos que ele), com 6% de folga para fontes mais largas (Android). Ao trocar o texto, meça de novo. */
.passo h1.entrada { font-size: 17px; font-size: min(23.8px, calc((100cqw - 8px) / 17.6)); white-space: nowrap; }
.passo .sub.sub-entrada { font-size: 12px; font-size: min(16px, calc(0.88 * min(23.8px, (100cqw - 8px) / 17.6))); white-space: nowrap; } /* sempre menor que o título, e cabe porque mede menos que ele */
.passo .sub { font-size: 16px; line-height: 1.5; color: var(--on-surface-variant); margin: 0 0 28px; }
.voltar { background: none; border: 0; padding: 4px 12px 4px 0; margin: -4px 0 12px; font-size: 32px; line-height: 1; color: var(--on-surface); cursor: pointer; min-width: 44px; min-height: 44px; text-align: left; }

.passo .campo { margin-bottom: 20px; }
.passo input[type="tel"], .passo input[type="text"], .passo input[type="email"] { height: 52px; margin-bottom: 0; font-size: 16px; }
.passo input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.passo .botao { width: 100%; min-height: 52px; font-size: 14px; font-size: min(16px, calc((100cqw - 44px) / 14.1)); white-space: nowrap; padding-inline: 16px; display: flex; align-items: center; justify-content: center; gap: .6em; margin: 0 0 12px; text-decoration: none; box-sizing: border-box; }
.passo .botao svg { width: 1.25em; height: 1.25em; flex: none; }
.passo .botao:disabled { opacity: 0.6; cursor: default; }
.num { font-weight: 600; color: var(--on-surface); white-space: nowrap; }
.nota { text-align: center; font-size: 13px; line-height: 1.5; color: var(--on-surface-variant); margin: 4px 0 0; }
.erro-campo { color: var(--error); font-size: 14px; line-height: 1.4; margin: 8px 0 0; }
.erro-campo[hidden] { display: none; }
.rodape { margin: 32px 0 0; font-size: 13px; line-height: 1.6; color: var(--on-surface-variant); }
.link-legal { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
.card-pitch { background: var(--primary-container); color: var(--on-primary-container); border-radius: var(--radius-md); padding: 16px; margin: 0 0 20px; font-size: 15px; line-height: 1.5; }

.toast-login {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); max-width: calc(100vw - 32px);
  background: var(--primary-container); color: var(--on-primary-container);
  padding: 12px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: var(--elevation-2); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 30;
}
.toast-login.on { opacity: 1; transform: translate(-50%, 0); }

/* Termos e privacidade abrem por cima da tela, sem tirar a pessoa dela: cartão centralizado, com a mesma folga em cima e embaixo.
   Sem unidades vh/dvh: no Safari do iPhone elas contam a área atrás da barra do navegador e empurram a base para fora da tela. */
dialog.legal { position: fixed; inset: 0; margin: auto; border: 0; padding: 0; width: calc(100% - 32px); max-width: 560px; height: calc(100% - 64px); max-height: 760px; background: var(--surface); color: var(--on-surface); flex-direction: column; border-radius: var(--radius-lg); box-shadow: var(--elevation-2); overflow: hidden; outline: none; }
dialog.legal[open] { display: flex; animation: legal-sobe .3s cubic-bezier(.4, 0, .2, 1); }
dialog.legal::backdrop { background: rgba(15, 19, 15, .55); }
dialog.legal header { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--outline-variant); font-family: var(--font-heading); font-weight: 700; font-size: 17px; }
dialog.legal header button { background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; min-width: 44px; min-height: 44px; color: var(--on-surface); }
dialog.legal iframe { flex: 1; border: 0; width: 100%; }
@keyframes legal-sobe { from { transform: translateY(24px); opacity: 0; } }

@media (min-width: 640px) {
  .login { padding: 40px; }
  .janela { padding: 48px 40px 36px; box-shadow: var(--elevation-2); }
  .marca { margin-bottom: 40px; }
  dialog.legal { width: 100%; height: calc(100% - 96px); }
}
@media (prefers-reduced-motion: reduce) {
  .trilho, .toast-login { transition: none; }
  dialog.legal[open] { animation: none; }
}
