/* Tela de entrada: vitrine escura à esquerda (a assinatura visual) e o
   formulário à direita. A vitrine NÃO muda com o tema — é sempre o verde
   profundo com latão, o resto da tela é que segue claro/escuro. */

.entrar {
  --v-fundo: #101010;
  --v-brilho: #262626;
  --v-texto: #a6a6a6;
  --v-latao: #d8b56a;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
}

/* No tema claro a vitrine mantém o verde profundo */
:root[data-theme="light"] .entrar {
  --v-fundo: #08100d;
  --v-brilho: #123026;
  --v-texto: #a3b8ae;
}
:root[data-theme="light"] .vitrine { color: #e8f0ec; }

/* ===== Vitrine ===== */

.vitrine {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 52px);
  background:
    radial-gradient(120% 80% at 85% 0%, var(--v-brilho) 0%, transparent 60%),
    var(--v-fundo);
  color: #eeeeee;
}
.arte { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.arte .aneis circle { stroke: var(--v-latao); stroke-opacity: .09; stroke-width: 1; }
.arte .chave * { stroke: var(--v-latao); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; fill: none; }
.arte .chave .fino { stroke-opacity: .45; stroke-width: 1; }
.arte .eco { stroke: var(--v-latao); stroke-width: 1.2; stroke-linejoin: round; fill: none; }
.arte .e1 { stroke-opacity: .28; }
.arte .e2 { stroke-opacity: .12; }

/* O único momento animado da tela: a chave se desenha uma vez */
.arte .chave * { stroke-dasharray: 1; stroke-dashoffset: 1; animation: desenhar 2.2s var(--ease) .15s forwards; }
.arte .chave .fino { animation-delay: .5s; animation-duration: 1.8s; }
.arte .chave path { animation-delay: .8s; animation-duration: 2s; }
@keyframes desenhar { to { stroke-dashoffset: 0; } }
.arte .eco { opacity: 0; animation: surge 1.4s ease-out 1.6s forwards; }
@keyframes surge { to { opacity: 1; } }

.vitrine-marca { display: flex; align-items: center; gap: 12px; }
.vitrine-nome { font: 600 18px/1 var(--f-titulo); letter-spacing: -.01em; }

.vitrine-texto { max-width: 100%; }
.vitrine-titulo {
  font: 600 clamp(36px, 4.4vw, 64px)/1.02 var(--f-titulo);
  letter-spacing: -.03em;
  text-wrap: balance;
}
.vitrine-sub { margin-top: 18px; color: var(--v-texto); font-size: 17px; max-width: 28ch; }

/* ===== Lado do formulário ===== */

.lado {
  position: relative; display: grid; grid-template-rows: 1fr auto;
  padding: 28px clamp(24px, 5vw, 64px) 22px;
}
.tema-canto { position: absolute; top: 20px; right: 20px; }
.tema-canto .sol { display: none; }
:root[data-theme="light"] .tema-canto .sol { display: block; }
:root[data-theme="light"] .tema-canto .lua { display: none; }

.miolo { display: grid; align-items: center; justify-items: center; }
.formulario {
  width: min(400px, 100%);
  display: grid; gap: 26px;
  animation: forma-entra .5s var(--ease) both;
}
@keyframes forma-entra { from { opacity: 0; transform: translateY(12px); } }

.cabeca-form { display: grid; gap: 8px; }
.cabeca-form h1 { font-size: clamp(30px, 3.4vw, 38px); letter-spacing: -.025em; }
.cabeca-form p { font-size: 16px; max-width: 38ch; }
.cabeca-form .avatar { margin-bottom: 8px; justify-self: start; }

.campos { display: grid; gap: 18px; }
.dica.caps { color: var(--alerta); font-weight: 600; }
.acoes-form { display: grid; gap: 8px; }
.acoes-form .btn { min-height: 48px; font-size: 15.5px; }
.acoes-form .btn.primario { min-height: 50px; }
.rodape-form { text-align: center; font: 13px var(--f-mono); color: var(--fraco); padding-top: 18px; }

#erro { animation: none; }
#erro.treme { animation: treme .35s; }
@keyframes treme {
  20% { translate: -6px 0; } 40% { translate: 5px 0; }
  60% { translate: -3px 0; } 80% { translate: 2px 0; }
}

/* ===== Celular: a vitrine vira uma faixa no topo ===== */

@media (max-width: 880px) {
  .entrar { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .vitrine { padding: 22px 24px; min-height: 148px; justify-content: flex-start; }
  .vitrine-texto { display: none; }
  .arte { inset: -40px -10px; width: calc(100% + 20px); height: calc(100% + 80px); opacity: .85; }
  .lado { padding-top: 32px; }
  .tema-canto { top: 14px; right: 14px; }
  .miolo { align-items: start; }
}
