/*
  Página do cofre do NFSe IA. Mesma identidade do site (apps/site): só escuro, grafite neutro,
  texto off-white quente e um acento só, o âmbar. Sem fonte externa (a CSP só libera a própria
  origem): Mona Sans se estiver instalada, senão a fonte do sistema.
*/

:root {
  color-scheme: dark;
  --fundo: #0b0b0c;
  --superficie: #141416;
  --superficie-forte: #1c1c1f;
  --campo: #101012;
  --borda: #2a2a2e;
  --borda-forte: #3a3a40;
  --texto: #f1ede6;
  --texto-suave: #a9a49b;
  --texto-fraco: #8c877e;
  --acento: #f4a340;
  --acento-claro: #ffb75e;
  --sobre-acento: #17120b;
  --erro: #f0877a;
  --sucesso: #8fd6a4;
  --sombra: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 28px 60px -30px rgb(0 0 0 / 0.9);
  --raio: 18px;
  --facil: cubic-bezier(0.16, 1, 0.3, 1);
  --fonte: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
  --margem: 1rem;
}

@media (min-width: 40em) {
  :root {
    --margem: 2rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: hidden precisa valer sobre qualquer display. */
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--fundo);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--texto);
  font-family: var(--fonte);
  font-size: 1.0625rem;
  font-weight: 420;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

svg {
  display: block;
}

a {
  color: var(--texto);
  text-decoration-color: var(--acento);
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--acento-claro);
}

:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 3px;
}

h1,
h2,
p {
  margin: 0;
}

h1,
h2 {
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
}

h2 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

/* Topo */

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding: 1rem var(--margem);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--texto);
  font-size: 1.05rem;
  font-weight: 660;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.marca:hover {
  color: var(--texto);
}

.marca__ia {
  color: var(--acento);
}

.topo__selo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--borda);
  border-radius: 999px;
  color: var(--texto-suave);
  font-size: 0.85rem;
}

/* Conteúdo */

.pagina {
  display: grid;
  flex: 1;
  align-items: start;
  gap: 1.5rem;
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding: 1rem var(--margem) 3rem;
}

/* Computador: formulário à esquerda, como fica protegido à direita. */
@media (min-width: 60em) {
  .pagina {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.5rem;
    padding-top: 2rem;
  }
}

.sobretitulo {
  color: var(--acento);
  font-size: 0.8rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lateral {
  display: grid;
  gap: 1.1rem;
  padding-top: 0.25rem;
}

.garantias {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) and (max-width: 59.99em) {
  .garantias {
    grid-template-columns: 1fr 1fr;
  }
}

.garantia {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--borda);
  border-radius: 14px;
  background: var(--superficie);
}

.garantia svg {
  margin-top: 0.1rem;
  color: var(--acento);
}

.garantia h3 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.garantia p {
  color: var(--texto-suave);
  font-size: 0.92rem;
  line-height: 1.5;
}

.nota {
  display: grid;
  grid-column: 1 / -1;
  gap: 0.4rem 2.5rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--acento);
  color: var(--texto-suave);
  font-size: 0.92rem;
}

@media (min-width: 60em) {
  .nota {
    grid-template-columns: 1fr 1fr;
  }
}

.nota strong {
  color: var(--texto);
  font-weight: 600;
}

.cartao {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 1rem + 2vw, 2.25rem);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  background: var(--superficie);
  box-shadow: var(--sombra);
}

.cartao--claro {
  gap: 0.9rem;
  background: transparent;
  box-shadow: none;
}

.introducao,
.cartao--claro p,
.lista {
  color: var(--texto-suave);
}

.lista {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding-left: 1.2rem;
}

.lista li::marker {
  color: var(--acento);
}

.aviso {
  padding: 1rem 1.1rem;
  border: 1px solid var(--borda-forte);
  border-radius: 12px;
  background: var(--superficie-forte);
}

/* Formulário */

.formulario {
  display: grid;
  gap: 1.1rem;
}

.campo {
  display: grid;
  gap: 0.4rem;
}

label {
  font-size: 0.95rem;
  font-weight: 560;
}

input {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--borda-forte);
  border-radius: 12px;
  background: var(--campo);
  color: var(--texto);
  font: inherit;
  font-size: 1rem;
}

input[type="file"] {
  padding: 0.45rem;
  color: var(--texto-suave);
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--borda-forte);
  border-radius: 999px;
  background: var(--superficie-forte);
  color: var(--texto);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

input:focus-visible {
  border-color: var(--acento);
  outline-offset: 1px;
}

input:disabled {
  opacity: 0.55;
}

.dica {
  color: var(--texto-fraco);
  font-size: 0.875rem;
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 3rem;
  padding: 0.8rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--acento);
  box-shadow:
    0 1px 0 rgb(255 255 255 / 0.35) inset,
    0 10px 24px -14px rgb(0 0 0 / 0.9);
  color: var(--sobre-acento);
  font: inherit;
  font-size: 1rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.3s var(--facil);
}

.botao:hover {
  background: var(--acento-claro);
  transform: translateY(-1px);
}

.botao:active {
  transform: translateY(0) scale(0.98);
}

.botao[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.mensagem {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--borda-forte);
  border-left-width: 4px;
  border-radius: 12px;
  background: var(--superficie-forte);
}

.mensagem--erro {
  border-left-color: var(--erro);
}

.mensagem--sucesso {
  border-left-color: var(--sucesso);
}

.mensagem--sucesso p:first-child {
  color: var(--sucesso);
  font-weight: 600;
}

.mensagem--andamento {
  border-left-color: var(--acento);
  color: var(--texto-suave);
}

/* Rodapé */

.rodape {
  padding: 1.5rem var(--margem) 2rem;
  color: var(--texto-fraco);
  font-size: 0.875rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .botao {
    transition: none;
  }
}
