/* Gestor RC: tela de entrada (login e código de verificação).
   Sempre escura, como a arte de referência (ferramentas/entrada/referencia.png).
   A Têmis, a onda e as marcas "+" são desenhadas em canvas por js/entrada.js;
   aqui ficam o painel, a moldura editorial e os estados dos campos. */

@font-face { font-family: "Geist"; src: url("../fontes/geist.284d2af3ed9d.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../fontes/newsreader.175a37868200.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --e-fundo: #070707;
  --e-texto: #ecebe7;
  --e-texto-2: #b9b7b1;
  --e-texto-3: #7c7a75;
  --e-fio: rgba(236, 235, 231, .16);
  --e-fio-forte: rgba(236, 235, 231, .32);
  --e-campo: rgba(16, 16, 16, .82);
  --e-erro: #eaa3a6;
  --e-sans: "Geist", "Segoe UI", system-ui, sans-serif;
  --e-serifa: "Newsreader", "Palatino Linotype", Palatino, Georgia, serif;
  --e-mola: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.entrada {
  min-height: 100dvh;
  background: var(--e-fundo);
  color: var(--e-texto);
  font: 400 14.5px/1.5 var(--e-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- cena (canvas) ---------- */
.cena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
/* escurece atrás do painel para o texto nunca disputar com a onda */
body.entrada::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 46vw 70vh at 22vw 46vh, rgba(7, 7, 7, .82), rgba(7, 7, 7, 0) 70%);
}

/* ---------- moldura editorial ---------- */
.moldura { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.guia { position: absolute; top: 0; width: 1px; background: linear-gradient(var(--e-fio), rgba(236, 235, 231, 0)); transform-origin: top; }
.guia-1 { left: 6vw; height: 24vh; }
.guia-2 { left: 30.6vw; height: 13vh; }
/* marcas "+": a posição vem do js (acompanham a estátua); aqui só o desenho e o piscar */
.mais { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.mais::before, .mais::after { content: ""; position: absolute; background: var(--e-texto); opacity: .4; }
.mais::before { left: -8px; top: -.5px; width: 16px; height: 1px; }
.mais::after { left: -.5px; top: -8px; width: 1px; height: 16px; }
.cena-compacta .mais { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .mais::before, .mais::after { animation: piscar 5.2s ease-in-out infinite; }
  .mais:nth-of-type(2)::before, .mais:nth-of-type(2)::after { animation-duration: 6.4s; animation-delay: -2.1s; }
  .mais:nth-of-type(3)::before, .mais:nth-of-type(3)::after { animation-duration: 4.6s; animation-delay: -3.3s; }
  .mais:nth-of-type(4)::before, .mais:nth-of-type(4)::after { animation-duration: 7.1s; animation-delay: -.8s; }
}
@keyframes piscar {
  0%, 62%, 100% { opacity: .35; transform: scale(1); }
  76% { opacity: 1; transform: scale(1.45); }
}
.lema-topo, .indice { list-style: none; margin: 0; padding: 0; }
.lema-topo {
  position: absolute; top: 5.6vh; right: 3vw; width: 9.4vw; min-width: 118px;
  font: 500 9.5px/2.45 var(--e-sans); letter-spacing: .38em; text-transform: uppercase; color: var(--e-texto-3);
}
.lema-topo::after { content: ""; display: block; width: 20px; height: 1px; margin-top: 3.2vh; background: var(--e-fio-forte); }
.regua {
  position: absolute; right: 4.1vw; top: 37vh; width: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 500 9px/1 var(--e-sans); letter-spacing: .3em; color: var(--e-texto-3);
}
.regua .fio { width: 1px; height: 7.5vh; background: var(--e-fio-forte); }
.regua .fio.longo { height: 10.5vh; }
.regua .sigla { padding-left: .3em; }
.indice { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 8px; }
.indice li { position: relative; padding-left: .3em; transition: color .6s ease; }
.indice li:last-child { margin-top: 14px; }
.indice li:last-child::before { content: ""; position: absolute; left: 50%; top: -12px; width: 12px; height: 1px; margin-left: -6px; background: var(--e-fio-forte); }
.indice li.aceso { color: var(--e-texto); }
.rodape-direito {
  position: absolute; right: 3vw; bottom: 3.8vh; margin: 0;
  font: 500 9.5px/2.3 var(--e-sans); letter-spacing: .38em; text-transform: uppercase; color: var(--e-texto-3);
}
.rodape-direito::before { content: ""; position: absolute; left: -40px; top: 1.15em; width: 20px; height: 1px; background: var(--e-fio-forte); }

/* ---------- painel ---------- */
.painel {
  position: relative; z-index: 2;
  min-height: 100dvh; width: min(432px, 100% - 32px);
  margin-left: max(16px, 9.5vw);
  display: flex; flex-direction: column; justify-content: center;
  padding: 7vh 0 9vh;
}
.marca { display: flex; align-items: center; gap: 26px; margin-bottom: clamp(36px, 7vh, 64px); }
/* selo RC: vetor gerado por ferramentas/entrada/gerar_monograma.py a partir da arte */
.monograma { flex: none; width: 94px; height: 95px; border: 1px solid rgba(236, 235, 231, .62); color: var(--e-texto); }
.monograma svg { display: block; width: 100%; height: 100%; }
.nome {
  margin: 0; font: 400 39px/1 var(--e-serifa); letter-spacing: -.005em; color: var(--e-texto);
  font-variation-settings: "opsz" 72; white-space: nowrap;
}
.nome span { display: inline-block; font-size: .79em; text-transform: uppercase; letter-spacing: .005em; }
.nome span::first-letter { font-size: 1.27em; }
.atuacao {
  margin: 9px 0 0; font: 400 10.5px/1.2 var(--e-serifa); letter-spacing: .3em; text-transform: uppercase;
  color: var(--e-texto-2); white-space: nowrap;
}

.formulario { display: flex; flex-direction: column; }
.saudacao { margin: 0 0 26px; color: var(--e-texto-2); font-size: 14px; max-width: 40ch; text-wrap: pretty; }

.campo-entrada { margin-bottom: 28px; }
.campo-entrada label {
  display: block; margin-bottom: 12px;
  font: 500 11px/1 var(--e-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--e-texto-2);
}
.caixa-campo {
  position: relative; display: flex; align-items: center; height: 53px;
  background: var(--e-campo); border: 1px solid var(--e-fio-forte); border-radius: 2px;
  transition: border-color .25s ease, background-color .25s ease;
}
.caixa-campo:hover { border-color: rgba(236, 235, 231, .46); }
.caixa-campo:focus-within { border-color: rgba(236, 235, 231, .86); background: rgba(20, 20, 20, .9); }
.caixa-campo input {
  flex: 1; min-width: 0; height: 100%; padding: 0 16px 0 0; border: 0; outline: 0; background: transparent;
  color: var(--e-texto); font: 400 15px/1 var(--e-sans); letter-spacing: .01em;
}
.caixa-campo input::placeholder { color: #6c6a66; opacity: 1; }
.caixa-campo input:-webkit-autofill,
.caixa-campo input:-webkit-autofill:hover,
.caixa-campo input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--e-texto); caret-color: var(--e-texto);
  -webkit-box-shadow: 0 0 0 40px #101010 inset; transition: background-color 9999s;
}
.caixa-campo input.codigo { font: 500 22px/1 var(--e-sans); letter-spacing: .32em; font-variant-numeric: tabular-nums; }
.caixa-campo input.codigo::placeholder { letter-spacing: .32em; }

.simbolo {
  flex: none; display: block; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--simbolo) center / contain no-repeat; mask: var(--simbolo) center / contain no-repeat;
}
.caixa-campo > .simbolo { margin: 0 16px 0 17px; color: #d4d2cc; }
.i-envelope { --simbolo: url("../icones/envelope-simple-light.bfd74be4a42a.svg"); }
.i-cadeado { --simbolo: url("../icones/lock-simple-light.e222d713e288.svg"); }
.i-olho { --simbolo: url("../icones/eye-light.c6dc8c12593d.svg"); }
.i-olho-fechado { --simbolo: url("../icones/eye-slash-light.8556b9d3ea02.svg"); }
.i-seta { --simbolo: url("../icones/arrow-right-light.2edbcbd1d038.svg"); }
.i-escudo { --simbolo: url("../icones/shield-check-light.580301acbea3.svg"); }

.ver-senha {
  flex: none; display: grid; place-items: center; width: 52px; height: 100%;
  border: 0; background: transparent; color: #cfcdc7; cursor: pointer; border-radius: 0 2px 2px 0;
}
.ver-senha:hover { color: #fff; }
.ver-senha:focus-visible { outline: 1px solid var(--e-texto); outline-offset: -6px; }

.botao-entrar {
  position: relative; margin-top: 18px; height: 53px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 2px; background: #efeee9; color: #0b0b0b; cursor: pointer;
  font: 600 12.5px/1 var(--e-sans); letter-spacing: .4em; text-transform: uppercase;
  transition: background-color .2s ease, transform .2s var(--e-mola);
  overflow: hidden;
}
.botao-entrar .rotulo { padding-left: .4em; }
.botao-entrar .simbolo { position: absolute; right: 22px; width: 19px; height: 19px; transition: transform .35s var(--e-mola); }
.botao-entrar:hover { background: #ffffff; }
.botao-entrar:hover .simbolo { transform: translateX(4px); }
.botao-entrar:active { transform: scale(.985); }
.botao-entrar:focus-visible { outline: 1px solid var(--e-texto); outline-offset: 4px; }
.botao-entrar[disabled] { cursor: progress; }
.botao-entrar[disabled]::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 34%; background: #0b0b0b;
  animation: correr 1.1s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes correr { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

.nota { margin: 22px 0 0; font-size: 12px; line-height: 1.6; color: var(--e-texto-3); max-width: 46ch; text-wrap: pretty; }
.nota a { color: var(--e-texto-2); text-underline-offset: 3px; }
.nota a:hover { color: var(--e-texto); }

.alerta-entrada {
  margin-bottom: 26px; padding: 12px 14px 12px 16px; font-size: 13px; line-height: 1.5;
  color: var(--e-erro); background: rgba(234, 163, 166, .06);
  border: 1px solid rgba(234, 163, 166, .28); border-left-width: 2px; border-radius: 2px;
}
.alerta-entrada.neutro { color: var(--e-texto-2); background: rgba(236, 235, 231, .04); border-color: var(--e-fio-forte); }

/* ---------- entrada em cena ---------- */
@media (prefers-reduced-motion: no-preference) {
  .marca, .campo-entrada, .botao-entrar, .nota, .saudacao, .alerta-entrada {
    animation: surgir .9s var(--e-mola) both;
  }
  .marca { animation-delay: .15s; }
  .saudacao, .alerta-entrada { animation-delay: .3s; }
  .campo-entrada { animation-delay: .38s; }
  .campo-entrada + .campo-entrada { animation-delay: .46s; }
  .botao-entrar { animation-delay: .56s; }
  .nota { animation-delay: .7s; }
  .lema-topo, .regua, .rodape-direito { animation: aparecer 1.6s ease .9s both; }
  .guia { animation: tracar 1.8s var(--e-mola) .2s both; }
}
@keyframes surgir { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes tracar { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- telas menores ---------- */
@media (max-width: 1100px) {
  .regua { display: none; }
}
@media (max-width: 860px) {
  body.entrada::before { background: rgba(7, 7, 7, .4); }
  .painel { margin: 0 auto; padding: 56px 0 72px; }
  .guia, .rodape-direito { display: none; }
  .lema-topo { top: 22px; right: 18px; width: auto; min-width: 0; line-height: 2.2; }
  .lema-topo::after { display: none; }
}
@media (max-width: 480px) {
  .marca { gap: 18px; }
  .monograma { width: 70px; height: 71px; }
  .nome { font-size: 30px; }
  .atuacao { font-size: 8.6px; letter-spacing: .24em; }
  .lema-topo { display: none; }
}
@media (max-height: 640px) and (min-width: 861px) {
  .painel { padding: 28px 0; }
  .marca { margin-bottom: 26px; }
  .campo-entrada { margin-bottom: 18px; }
}
