/* Oitosete Soluções · base do formulário de diagnóstico e da área /admin (16/11/2026, [provisório])
   Copiada do protótipo do site (3 PLANEJAMENTO/site/prototipo/estilo.css, 11/11) para o formulário parecer parte dele:
   as 7 cores, os tons vivos, a Gasoek nos títulos, o papel recortado com sombra curta, o quadriculado da planta.
   Identidade: DIRETRIZES.md §4 e §7. Texto só creme ou café, e só nos pares que passam no AA. */

/* Títulos: a GasoekOne (SIL OFL, Google Fonts; licença em fontes/OFL-GasoekOne.txt), o mesmo arquivo do site desde 16/11:
   o recorte latino em WOFF2 (20 KB), servido do próprio site. */
@font-face {
  font-family: "Gasoek One";
  src: url("fontes/GasoekOne-latin.woff2") format("woff2");
  font-display: swap;
}
/* Texto e rótulos: Archivo Regular e Bold (SIL OFL; licença em fontes/OFL-Archivo.txt), como o site e a marca desde
   16/11 (DIRETRIZES §4). O peso 500 cai na Regular (não há Medium). */
@font-face {
  font-family: "Archivo";
  src: url("fontes/Archivo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fontes/Archivo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --creme: #FFF4EC; --cafe: #20100C; --terra: #47271A; --marinho: #1C304F; --verde: #0D371E; --vinho: #721510; --ocre: #C9A226;
  --terra-v: #AF471D; --marinho-v: #1D56AF; --verde-v: #157A3D; --vinho-v: #C4251C; --ocre-v: #E7B823;
  --papel: #FAF6EE;
  --f-titulo: "Gasoek One", "Arial Black", Arial, sans-serif;
  --f-texto: "Archivo", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --f-maquina: "Courier New", Courier, monospace;
  --margem: clamp(16px, 4.5vw, 48px);
  --corte: polygon(0.6% 5%, 3% 0, 51% 2.5%, 97.5% 0, 100% 7%, 99.3% 52%, 100% 95%, 96.5% 100%, 49% 97%, 2.5% 100%, 0 93%, 0.7% 48%);
  --corte-largo: polygon(0.3% 1.6%, 2% 0, 50% 1%, 98.4% 0, 100% 2.4%, 99.6% 50%, 100% 98%, 97.8% 100%, 50% 98.8%, 1.6% 100%, 0 97.6%, 0.5% 50%);
  --corte-folha: polygon(0.4% 0.5%, 2% 0, 50% 0.3%, 98.4% 0, 100% 0.6%, 99.7% 50%, 100% 99.5%, 97.8% 100%, 50% 99.7%, 1.6% 100%, 0 99.4%, 0.4% 50%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--marinho); }  /* fundo no html: o do body fica no body e o grão se mistura com ele */
body {
  margin: 0; overflow-x: clip;
  background: var(--marinho); color: var(--creme);
  font: 500 1.0625rem/1.55 var(--f-texto);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; }
ul, ol { padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--foco, var(--creme)); outline-offset: 4px; border-radius: 2px; }
[hidden] { display: none !important; }

.pular { position: absolute; left: 16px; top: -200px; z-index: 100; background: var(--creme); color: var(--cafe); padding: 12px 18px; font-weight: 700; --foco: var(--cafe); }
.pular:focus { top: 16px; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.deco { position: absolute; pointer-events: none; user-select: none; height: auto; }

/* fundo: marinho com o quadriculado da planta (a folha do planejamento) e o grão do papel */
.planta { position: relative; isolation: isolate; background: linear-gradient(to bottom, var(--marinho) 0%, #1C4483 100%) fixed, var(--marinho); }
.planta::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(255, 244, 236, .22) 2px, transparent 2px) 0 0 / 225px 225px,
    linear-gradient(to bottom, rgba(255, 244, 236, .22) 2px, transparent 2px) 0 0 / 225px 225px,
    linear-gradient(to right, rgba(255, 244, 236, .10) 1px, transparent 1px) 0 0 / 45px 45px,
    linear-gradient(to bottom, rgba(255, 244, 236, .10) 1px, transparent 1px) 0 0 / 45px 45px;
}
.planta::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("img/papel-escuro.jpg") 0 0 / 512px 512px; mix-blend-mode: soft-light;
}

/* ---------- papel recortado: forma (::after) e sombra curta (::before) ---------- */
.botao, .tira, .tarja, .folha { position: relative; isolation: isolate; }
.botao::before, .botao::after, .tira::after, .tarja::after, .folha::before, .folha::after {
  content: ""; position: absolute; inset: 0; z-index: -1; clip-path: var(--corte); pointer-events: none;
}
.botao::before { background: rgba(8, 10, 24, .30); transform: translate(4px, 6px); }
.botao::after, .tira::after, .tarja::after { background: var(--fundo-papel); }
.folha::before { clip-path: var(--corte-folha); transform: translate(7px, 10px); background: rgba(8, 10, 24, .28); }
.folha::after {
  clip-path: var(--corte-folha);
  background: url("img/papel-claro.jpg") 0 0 / 512px 512px, var(--papel);
  background-blend-mode: multiply, normal;
}

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: .8em 1.35em; border: 0; background: transparent; cursor: pointer;
  font: 700 1.0625rem/1.15 var(--f-texto); text-align: center; text-decoration: none;
  color: var(--bt-texto); --fundo-papel: var(--bt-fundo);
}
.botao svg { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.botao--dm { --bt-fundo: var(--vinho-v); --bt-texto: var(--creme); }        /* creme sobre vinho vivo: 5,3:1 */
.botao--form { --bt-fundo: var(--ocre-v); --bt-texto: var(--cafe); }       /* café sobre ocre vivo: 9,9:1 */
.botao--creme { --bt-fundo: var(--creme); --bt-texto: var(--cafe); }       /* café sobre creme: 17:1 */
.botao--marinho { --bt-fundo: var(--marinho-v); --bt-texto: var(--creme); } /* creme sobre marinho vivo: 6,5:1 */
.botao--vinho { --bt-fundo: var(--vinho-v); --bt-texto: var(--creme); }    /* 5,3:1 */
/* no papel: botão de contorno café (a borda passa no 3:1 de componente; o texto, 16:1) */
.botao--linha { --bt-texto: var(--cafe); border: 2px solid var(--cafe); border-radius: 2px; background: rgba(255, 244, 236, .55); }
.botao--linha::before, .botao--linha::after { display: none; }
.botao--pequeno { min-height: 44px; padding: .55em 1em; font-size: .95rem; }
.botao[disabled], .botao[aria-disabled="true"] { cursor: progress; opacity: .75; }

/* ---------- papeizinhos datilografados e tarja ---------- */
.tira {
  display: inline-block; padding: .55em 1em .5em;
  font: 700 1rem/1.1 var(--f-maquina); color: var(--cafe); letter-spacing: -.01em;
  --fundo-papel: var(--papel); transform: rotate(var(--rot, -1.2deg));
}
.tarja {
  display: inline-block; padding: .5em .75em .45em;
  font: 700 .875rem/1 var(--f-texto); letter-spacing: .06em; text-transform: uppercase;
  color: var(--cafe); --fundo-papel: var(--ocre-v);
}

/* ---------- topo ---------- */
.topo { position: sticky; top: 0; z-index: 50; background: rgba(28, 48, 79, .97); color: var(--creme); --foco: var(--creme); box-shadow: 0 1px 0 rgba(255, 244, 236, .12); }
.topo__barra { max-width: 1240px; margin: 0 auto; padding: 10px var(--margem); display: flex; align-items: center; gap: 12px 24px; }
.topo__logo { display: block; margin-right: auto; padding: 4px 0; }
.topo__logo img { height: 44px; width: auto; }
@media (max-width: 599px) {
  .topo__logo img { height: 36px; }
  .topo .botao--pequeno { padding: .5em .8em; font-size: .9rem; gap: .4em; }
}

/* ---------- rodapé ---------- */
.rodape { position: relative; padding: 48px var(--margem) 40px; background: #2B1610; color: var(--creme); font-size: .95rem; --foco: var(--creme); }
.rodape::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: url("img/papel-escuro.jpg") 0 0 / 512px 512px; mix-blend-mode: soft-light; }
.rodape__dentro { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; display: grid; gap: 8px; }
.rodape img { height: 52px; width: auto; margin-bottom: 12px; }

/* ---------- motion (DIRETRIZES §7, 11/11): papel colado em degraus de 12 quadros por segundo ----------
   Só sob .movimento, que o <head> liga quando o aparelho não pede "reduzir movimento". O texto aparece na hora:
   a animação mexe só posição e giro, nunca esconde o conteúdo. */
@keyframes colar { from { translate: var(--dx, 0px) var(--dy, -22px); rotate: var(--r, -2.2deg); } to { translate: 0 0; rotate: 0deg; } }
.movimento .botao { transition: translate .12s steps(2, end), rotate .12s steps(2, end); }
.movimento .botao::before { transition: translate .12s steps(2, end); }
@media (hover: hover) {
  .movimento .botao:hover { translate: -2px -3px; rotate: -.6deg; }
  .movimento .botao:hover::before { translate: 3px 4px; }
}
.movimento .botao:active { translate: 1px 2px; rotate: 0deg; }
.movimento .botao:active::before { translate: -2px -3px; }

@media print {
  .topo { position: static; }
  .deco, .planta::before, .planta::after { display: none; }
}
