/* RGT Legal OS — folha única.
   Direção: cruzamento entre o artefato jurídico (papel, margens generosas, serifa,
   numeração) e a ferramenta técnica (monoespaçada, árvore de arquivos, estados
   verificáveis). Sem azul corporativo, sem gradiente roxo. */

@font-face {
  font-family: 'Newsreader';
  src: url('fontes/newsreader-latin.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

:root {
  --papel: #EDEAE3;
  --papel-fundo: #E4E0D6;
  --tinta: #1B1A17;
  --tinta-suave: #55524A;
  --tinta-tenue: #6B6757;  /* 4.6:1 sobre o papel — texto pequeno precisa passar em AA */
  --linha: #CFC9BA;
  --vinho: #6E2436;
  --ocre: #8A4B2A;
  --oliva: #4A5B33;

  /* Cor do foco de teclado. As seções escuras sobrescrevem — outline vinho
     sobre fundo grafite é invisível, e é justamente onde fica o formulário. */
  --foco: var(--vinho);

  --serifa: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Mono', 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --medida: 34rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- tipografia ---------- */

h1, h2, h3 {
  font-family: var(--serifa);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.3rem); }

p { margin: 0 0 1.1em; max-width: var(--medida); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--vinho); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 600; }

.mono {
  font-family: var(--mono);
  font-size: 0.82em;
  letter-spacing: -0.01em;
}

/* ---------- acessibilidade ---------- */

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

/* Seções de fundo escuro herdam um foco claro por cascata de variável. */
.problema, .fundadores { --foco: var(--papel); }

.pular {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--tinta);
  color: var(--papel);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.pular:focus { left: 0.5rem; top: 0.5rem; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- estrutura ---------- */

.faixa { padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); border-top: 1px solid var(--linha); }
.faixa:first-of-type { border-top: 0; }
.interno { max-width: 68rem; margin: 0 auto; }

.secao__rotulo {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--tinta-tenue);
  display: block;
  margin-bottom: 0.9rem;
}

/* ---------- hero ---------- */

.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }

.hero__grade {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .hero__grade { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4.5rem; }
}

.marca {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta);
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  display: block;
}
.marca b { font-weight: 600; }
.marca span { color: var(--tinta-tenue); }

.sobrelinha {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocre);
  margin-bottom: 1.1rem;
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--tinta-suave);
  margin-top: 1.4rem;
  max-width: 33rem;
}

.acoes { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.1rem; }

.botao {
  display: inline-block;
  font: inherit;
  font-size: 0.97rem;
  font-weight: 500;
  padding: 0.78rem 1.5rem;
  border: 1.5px solid var(--tinta);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.botao--forte { background: var(--tinta); color: var(--papel); }
.botao--forte:hover { background: var(--vinho); border-color: var(--vinho); }

.botao--fraco { background: transparent; color: var(--tinta); }
.botao--fraco:hover { background: var(--tinta); color: var(--papel); }

.microtexto {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--tinta-tenue);
  margin-top: 1.5rem;
  line-height: 1.6;
}

/* ---------- elemento de assinatura: a pasta do caso ---------- */

.pasta {
  background: var(--papel-fundo);
  border: 1px solid var(--linha);
  border-radius: 3px;
  padding: 1.4rem 1.3rem 1.5rem;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.75vw, 0.8rem);
  line-height: 1.95;
  overflow-x: auto;
}

.pasta__topo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--linha);
  padding-bottom: 0.7rem;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tinta-tenue);
}

.pasta pre { margin: 0; font: inherit; white-space: pre; }

.pasta .ramo { color: var(--tinta-tenue); }
.pasta .dir { color: var(--tinta); font-weight: 600; }
.pasta .orig { color: var(--tinta-suave); }
.pasta .art { color: var(--tinta); }

.nota {
  color: var(--ocre);
  font-style: normal;
}
.nota--ok { color: var(--oliva); }

.pasta__legenda {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--linha);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--tinta-suave);
}

/* revelação em sequência dos artefatos, uma só vez */
.revela { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .revela { opacity: 0; transform: translateY(4px); }
  .js .revela.visivel {
    opacity: 1;
    transform: none;
    transition: opacity 420ms ease, transform 420ms ease;
  }
}

/* ---------- problema ---------- */

.problema { background: var(--tinta); color: var(--papel); border-top: 0; }
.problema h2 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); max-width: 22ch; }
.problema p { color: #C9C4B8; max-width: 40rem; font-size: 1.08rem; margin-top: 1.6rem; }
.problema .secao__rotulo { color: #8C8578; }

/* ---------- demonstração ---------- */

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--papel-fundo);
  border: 1px solid var(--linha);
  border-radius: 3px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  overflow: hidden;
}

.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video__espera { max-width: 30rem; }
.video__selo {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocre);
  display: block;
  margin-bottom: 0.8rem;
}
.video__espera p { color: var(--tinta-suave); font-size: 0.95rem; margin: 0 auto; }

.roteiro-video {
  list-style: none;
  counter-reset: passo;
  padding: 0;
  margin: 1.8rem 0 0;
  display: grid;
  gap: 0.55rem;
  max-width: 44rem;
}
.roteiro-video li {
  counter-increment: passo;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.97rem;
  color: var(--tinta-suave);
}
.roteiro-video li::before {
  content: counter(passo, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--tinta-tenue);
}

/* ---------- como funciona ---------- */

.trio { display: grid; gap: 2.4rem; margin-top: 2.6rem; }
@media (min-width: 52rem) { .trio { grid-template-columns: repeat(3, 1fr); gap: 2.6rem; } }

.trio h3 { margin-bottom: 0.8rem; max-width: 20ch; }
.trio p { font-size: 0.98rem; color: var(--tinta-suave); }
.trio__item { border-top: 2px solid var(--tinta); padding-top: 1.1rem; }

/* ---------- lista do que está incluído ---------- */

.inclui { list-style: none; padding: 0; margin: 2.2rem 0 0; max-width: 46rem; }
.inclui li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--linha);
  font-size: 0.99rem;
}
.inclui li:first-child { border-top: 1px solid var(--linha); }

.etiqueta {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.etiqueta--agora { color: var(--oliva); }
.etiqueta--roteiro { color: var(--tinta-tenue); }

.inclui__nota { font-size: 0.85rem; color: var(--tinta-tenue); margin-top: 1.3rem; max-width: 46rem; }

/* ---------- transparência ---------- */

.transparencia { background: var(--papel-fundo); }
.transparencia blockquote {
  margin: 1.8rem 0 0;
  padding-left: clamp(1rem, 2.5vw, 1.6rem);
  border-left: 3px solid var(--ocre);
  font-family: var(--serifa);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  max-width: 42rem;
}

/* ---------- fundadores ---------- */

.fundadores { background: var(--tinta); color: var(--papel); }
.fundadores h2 { max-width: 20ch; }
.fundadores p { color: #C9C4B8; }
.fundadores .secao__rotulo { color: #8C8578; }

.oferta { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 0.6rem; max-width: 38rem; }
.oferta li { display: grid; grid-template-columns: 1.2rem 1fr; gap: 0.7rem; font-size: 0.99rem; color: #DAD5C9; }
.oferta li::before { content: '—'; color: #8C8578; font-family: var(--mono); }

.formulario { margin-top: 2.4rem; max-width: 34rem; }
.formulario__linha { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.campo {
  flex: 1 1 15rem;
  font: inherit;
  font-size: 1rem;
  padding: 0.78rem 0.9rem;
  background: var(--papel);
  color: var(--tinta);
  border: 1.5px solid var(--papel);
  border-radius: 2px;
}
.campo::placeholder { color: var(--tinta-tenue); }

.botao--claro { background: var(--papel); color: var(--tinta); border-color: var(--papel); }
.botao--claro:hover { background: var(--ocre); border-color: var(--ocre); color: var(--papel); }
.botao--claro:disabled { opacity: 0.55; cursor: progress; }

.formulario__aviso { font-size: 0.8rem; color: #8C8578; margin-top: 0.9rem; line-height: 1.6; }
.formulario__aviso a { color: #C9C4B8; }

.resposta {
  margin-top: 1.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: 2px;
  font-size: 0.95rem;
  border: 1px solid;
}
.resposta[hidden] { display: none; }
.resposta--ok { border-color: var(--oliva); background: rgba(74, 91, 51, 0.16); color: #D6E0C4; }
.resposta--erro { border-color: var(--ocre); background: rgba(138, 75, 42, 0.16); color: #EBCDBB; }

/* ---------- perguntas ---------- */

.perguntas { margin-top: 2.4rem; max-width: 46rem; display: grid; gap: 1.9rem; }
.perguntas h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; margin-bottom: 0.45rem; }
.perguntas p { font-size: 0.99rem; color: var(--tinta-suave); }

/* ---------- páginas de documento (termos, privacidade) ---------- */

.legal .interno { max-width: 44rem; }
.legal h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); }
.legal h2 {
  font-size: clamp(1.1rem, 2vw, 1.24rem);
  margin: 2.6rem 0 0.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--linha);
}
.legal p { font-size: 0.99rem; color: var(--tinta-suave); max-width: 40rem; }
.legal__data {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--tinta-tenue);
  margin-top: 0.9rem;
}
a.marca { text-decoration: none; }

/* ---------- rodapé ---------- */

.rodape {
  border-top: 1px solid var(--linha);
  padding: 2.8rem var(--gutter);
  font-size: 0.85rem;
  color: var(--tinta-suave);
}
.rodape__grade {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
  align-items: baseline;
}
.rodape nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.rodape p { margin: 0; }

@media print {
  .video, .formulario { display: none; }
}
