/* Assistente de Reparo — Biblivre 5 · landing page */

:root {
  --ink: #1e2a9e;
  --ink-deep: #131b6b;
  --ink-forte: #2735c4;
  --ink-tinta: #c9cff7;
  --ink-fundo: #eef0fb;
  --papel: #ffffff;
  --texto: #16192e;
  --texto-suave: #4a5078;
  --linha: #d5d9ee;
  --carimbo: #b8172f;
  --carimbo-fundo: #fbecef;
  --ok: #1d7a45;
  --ok-fundo: #e6f4ea;

  --fonte: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fonte-janela: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --faixa: 72rem;
  --raio: 0.375rem;
  --sombra: 0 1.5rem 3rem -1.25rem rgba(19, 27, 107, 0.45), 0 0.25rem 0.75rem -0.25rem rgba(19, 27, 107, 0.25);

  --passo-1: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --passo-2: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --passo-3: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --passo-4: clamp(2rem, 1.5rem + 2.4vw, 3.5rem);

  --suave: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  accent-color: var(--ink);
  scrollbar-color: var(--ink) var(--ink-fundo);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  font-family: var(--fonte);
  font-size: var(--passo-1);
  line-height: 1.55;
  color: var(--texto);
  background: var(--papel);
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--papel);
}

.abertura ::selection,
.passos ::selection,
.fecho ::selection,
.rodape ::selection {
  background: var(--papel);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--ink-forte);
  outline-offset: 3px;
  border-radius: 2px;
}

.abertura :focus-visible,
.passos :focus-visible,
.fecho :focus-visible,
.rodape :focus-visible {
  outline-color: var(--papel);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: var(--passo-3);
}

h3 {
  font-size: var(--passo-2);
  font-weight: 700;
}

p,
li,
dd {
  max-width: 68ch;
}

a {
  color: var(--ink);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

a:hover {
  color: var(--ink-forte);
  text-decoration-thickness: 0.14em;
}

code {
  font-family: "Atkinson Hyperlegible Mono", ui-monospace, Consolas, "Cascadia Mono", monospace;
  font-size: 0.92em;
  background: var(--ink-fundo);
  padding: 0.1em 0.4em;
  border-radius: 0.25em;
}

.passos code {
  background: rgba(255, 255, 255, 0.14);
  color: var(--papel);
}

strong {
  font-weight: 700;
}

.faixa {
  width: min(100% - 2.5rem, var(--faixa));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--papel);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: var(--raio);
  font-weight: 700;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

/* Botões */

.botao {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.5rem;
  border-radius: var(--raio);
  font-size: var(--passo-2);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 220ms var(--suave), background-color 220ms var(--suave), box-shadow 220ms var(--suave);
}

.botao svg {
  width: 1.3em;
  height: 1.3em;
  flex: none;
}

.botao-principal {
  background: var(--papel);
  color: var(--ink);
  box-shadow: 0 0.6rem 1.4rem -0.6rem rgba(0, 0, 0, 0.55);
}

.botao-principal:hover {
  color: var(--ink-deep);
  transform: translateY(-1px);
  box-shadow: 0 0.9rem 1.6rem -0.6rem rgba(0, 0, 0, 0.6);
}

.botao-principal:active {
  transform: translateY(0);
}

.link-botao {
  appearance: none;
  border: 0;
  padding: 0.15rem 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  cursor: pointer;
}

.link-botao:hover {
  text-decoration-thickness: 0.14em;
}

/* Topo */

.topo {
  background: var(--ink);
  color: var(--papel);
}

.topo .faixa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.marca em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink-tinta);
}

.marca-icone {
  width: 1.75rem;
  height: 1.75rem;
}

.topo nav {
  display: flex;
  gap: 0.25rem 1.5rem;
  flex-wrap: wrap;
}

.topo nav a {
  color: var(--ink-tinta);
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.25rem;
}

.topo nav a:hover {
  color: var(--papel);
  text-decoration: underline;
}

/* Abertura */

.abertura {
  background: var(--ink);
  color: var(--papel);
  padding-block: clamp(3rem, 2rem + 4vw, 6rem) clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.abertura-grade {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.abertura h1 {
  font-size: var(--passo-4);
  letter-spacing: -0.025em;
  max-width: 18ch;
}

.abertura-sub {
  margin: 1.5rem 0 0;
  font-size: var(--passo-2);
  line-height: 1.5;
  color: var(--ink-tinta);
  max-width: 44ch;
}

.abertura-sub strong {
  color: var(--papel);
}

.aviso-comunidade {
  margin: 1.15rem 0 0;
  max-width: 48ch;
  font-size: 0.98rem;
  color: var(--ink-tinta);
}

.acao {
  margin-top: 2.25rem;
}

.acao-nota {
  margin: 0.85rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-tinta);
  min-height: 1.5em;
}

.acao-nota strong {
  color: var(--papel);
}

.garantias {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.5rem;
  font-size: 0.98rem;
  color: var(--ink-tinta);
}

.garantias li {
  position: relative;
  padding-left: 1.6rem;
  max-width: none;
}

.garantias li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--papel);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.garantias strong {
  color: var(--papel);
}

/* Simulação da janela */

.demo {
  margin: 0;
  container-type: inline-size;
  width: 100%;
  max-width: 35rem;
  justify-self: end;
}

.demo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--ink-tinta);
}

.janela {
  position: relative;
  font-family: var(--fonte-janela);
  color: #000;
  background: #fff;
  border: 1px solid #6e6e6e;
  border-radius: 0.5cqw;
  box-shadow: var(--sombra);
  overflow: hidden;
  aspect-ratio: 560 / 500;
  line-height: 1.3;
}

.janela-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5.5cqw;
  padding: 0 0 0 2.2cqw;
  background: #fff;
  border-bottom: 1px solid #e3e3e3;
  font-size: 2.15cqw;
  color: #000;
}

.janela-controles {
  display: flex;
  height: 100%;
}

.janela-controles svg {
  width: 8.2cqw;
  height: 100%;
  padding: 1.6cqw 2.6cqw;
  color: #000;
}

.janela-controles svg:last-child {
  color: #000;
}

.janela-corpo {
  position: relative;
  padding: 3.5cqw 4.3cqw 4.3cqw;
  height: calc(100% - 5.5cqw);
  display: flex;
  flex-direction: column;
}

.janela-app {
  font-size: 4.3cqw;
  font-weight: 700;
  line-height: 1.2;
}

.janela-status {
  margin: 2cqw 0 0;
  font-size: 2.4cqw;
  min-height: 6.4cqw;
  max-width: none;
}

.janela-resultado {
  flex: 1;
  margin-top: 2.2cqw;
  padding: 1.4cqw 1.8cqw;
  background: #fafafa;
  border: 1px solid #7a7a7a;
  font-size: 2.4cqw;
  white-space: pre-line;
  overflow: hidden;
  text-align: left;
}

.janela-progresso {
  margin-top: 1.8cqw;
  height: 2.9cqw;
  border: 1px solid #bcbcbc;
  background: #e6e6e6;
  overflow: hidden;
  position: relative;
}

.janela-progresso span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  background: #06b025;
  animation: marquee 1.6s linear infinite;
}

@keyframes marquee {
  from { left: -30%; }
  to { left: 100%; }
}

.janela-botoes {
  display: flex;
  gap: 2.1cqw;
  margin-top: 2.5cqw;
}

.jbotao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 6.4cqw;
  padding: 0 3cqw;
  border: 1px solid #adadad;
  background: #e1e1e1;
  color: #000;
  font: inherit;
  font-size: 2.4cqw;
  line-height: 1;
  cursor: default;
  transition: background-color 120ms, border-color 120ms;
}

.jbotao:disabled {
  color: #838383;
  background: #cccccc;
  border-color: #bfbfbf;
}

.jbotao.ativo:not(:disabled) {
  background: #cce4f7;
  border-color: #005499;
}

#j-verificar { min-width: 21.4cqw; }
#j-corrigir,
#j-relatorio { min-width: 25cqw; }

.dialogo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
}

.dialogo[hidden] {
  display: none;
}

.dialogo-caixa {
  width: 66%;
  background: #fff;
  border: 1px solid #6e6e6e;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.35);
  font-size: 2.4cqw;
}

.dialogo-barra {
  padding: 1.2cqw 2cqw;
  font-size: 2.15cqw;
  border-bottom: 1px solid #e3e3e3;
}

.dialogo-caixa p {
  margin: 0;
  padding: 3.2cqw 3cqw 3.6cqw;
  max-width: none;
}

.dialogo-botoes {
  display: flex;
  justify-content: flex-end;
  gap: 1.6cqw;
  padding: 2cqw;
  background: #f0f0f0;
}

.dialogo-botoes .jbotao {
  min-width: 14cqw;
}

.j-ok {
  color: var(--ok);
  font-weight: 600;
}

.j-atencao {
  color: var(--carimbo);
  font-weight: 600;
}

/* O que faz / não faz */

.faz {
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.faz-grade {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.lista-faz {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  counter-reset: faz;
}

.lista-faz li {
  position: relative;
  padding: 1.25rem 0 1.25rem 3.25rem;
  border-top: 1px solid var(--linha);
  max-width: 62ch;
}

.lista-faz li:last-child {
  border-bottom: 1px solid var(--linha);
}

.lista-faz li::before {
  counter-increment: faz;
  content: counter(faz);
  position: absolute;
  left: 0;
  top: 1.2rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--papel);
  font-weight: 700;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.lista-faz li > strong:first-child {
  display: block;
  font-size: var(--passo-2);
  margin-bottom: 0.25rem;
  color: var(--texto);
}

.nao-faz {
  background: var(--carimbo-fundo);
  border-radius: var(--raio);
  padding: 1.75rem 1.75rem 1.5rem;
  margin-top: 0.5rem;
}

.nao-faz h2 {
  color: var(--carimbo);
  font-size: var(--passo-2);
}

.nao-faz ul {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.nao-faz li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.75rem;
}

.nao-faz li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 1rem;
  height: 1rem;
  background: var(--carimbo);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4.5 4.5l11 11' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M4.5 4.5l11 11' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nao-faz-nota {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(184, 23, 47, 0.2);
  color: var(--texto-suave);
  font-size: 0.98rem;
}

/* Passos */

.passos {
  background: var(--ink);
  color: var(--papel);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.lista-passos {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem clamp(2rem, 1rem + 4vw, 5rem);
  counter-reset: passo;
}

.lista-passos li {
  position: relative;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  max-width: none;
}

.lista-passos li::before {
  counter-increment: passo;
  content: counter(passo);
  display: block;
  font-size: var(--passo-4);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink-tinta);
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.lista-passos h3 {
  color: var(--papel);
}

.lista-passos p {
  margin: 0.75rem 0 0;
  color: var(--ink-tinta);
  max-width: 48ch;
}

.lista-passos p strong,
.lista-passos q {
  color: var(--papel);
}

.lista-passos q {
  font-style: italic;
  quotes: "“" "”";
}

.rotulo {
  display: inline-block;
  padding: 0.05em 0.5em;
  border-radius: 0.3em;
  background: var(--papel);
  color: var(--ink);
  font-weight: 700;
}

/* Requisitos */

.requisitos {
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.requisitos-grade {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 2rem clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

.requisitos dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2.5rem;
}

.requisitos dl > div {
  padding-top: 1rem;
  border-top: 1px solid var(--linha);
}

.requisitos dt {
  font-weight: 700;
  font-size: var(--passo-2);
}

.requisitos dd {
  margin: 0.4rem 0 0;
  color: var(--texto-suave);
}

/* Perguntas */

.perguntas {
  background: var(--ink-fundo);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.perguntas details {
  max-width: 46rem;
  border-top: 1px solid var(--linha);
}

.perguntas details:first-of-type {
  margin-top: 2rem;
}

.perguntas details:last-of-type {
  border-bottom: 1px solid var(--linha);
}

.perguntas summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 3rem 1.1rem 0;
  font-size: var(--passo-2);
  font-weight: 700;
  position: relative;
}

.perguntas summary::-webkit-details-marker {
  display: none;
}

.perguntas summary::before,
.perguntas summary::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  width: 1.1rem;
  height: 3px;
  margin-top: -1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 260ms var(--suave);
}

.perguntas summary::after {
  transform: rotate(90deg);
}

.perguntas details[open] summary::after {
  transform: rotate(0);
}

.perguntas summary:hover {
  color: var(--ink);
}

.perguntas details p {
  margin: 0 0 1.4rem;
  color: var(--texto-suave);
}

/* Fecho */

.fecho {
  background: var(--ink);
  color: var(--papel);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
}

.fecho-grade {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.fecho p {
  margin: 0;
  font-size: var(--passo-2);
  color: var(--ink-tinta);
  max-width: 44ch;
}

.fecho .botao {
  margin-top: 1rem;
}

/* Rodapé */

.rodape {
  background: var(--ink-deep);
  color: var(--ink-tinta);
  padding-block: 2rem;
  font-size: 0.95rem;
}

.rodape-grade {
  display: flex;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.rodape-texto {
  display: grid;
  gap: 0.45rem;
  max-width: 48rem;
}

.rodape p {
  margin: 0;
}

.rodape-credito {
  color: var(--papel);
}

.rodape nav {
  display: flex;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
}

.rodape a {
  color: var(--papel);
  font-weight: 500;
}

/* Responsivo */

@media (max-width: 56rem) {
  .abertura-grade,
  .faz-grade,
  .requisitos-grade {
    grid-template-columns: minmax(0, 1fr);
  }

  .demo {
    justify-self: stretch;
    max-width: none;
  }

  .abertura h1 {
    max-width: none;
  }
}

@media (max-width: 40rem) {
  .lista-passos,
  .requisitos dl,
  .garantias {
    grid-template-columns: minmax(0, 1fr);
  }

  .topo .faixa {
    justify-content: center;
    text-align: center;
  }

  .topo nav {
    justify-content: center;
  }

  .botao {
    width: 100%;
    justify-content: center;
  }

  .nao-faz {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
