/* Proposta Cartórios Online: tokens, tipografia, estrutura das folhas e efeitos */

@font-face { font-family: "Zodiak"; src: url("../fonts/zodiak-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Zodiak"; src: url("../fonts/zodiak-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Zodiak"; src: url("../fonts/zodiak-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Zodiak"; src: url("../fonts/zodiak-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Gambetta"; src: url("../fonts/gambetta-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Gambetta"; src: url("../fonts/gambetta-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Gambetta"; src: url("../fonts/gambetta-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragmentmono-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../fonts/switzer-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --papel: #f3f2ef;
  --papel-2: #e9e7e1;
  --tinta: #070707;
  --tinta-2: #3d3d3b;
  --cinza: #6e6d69;
  --cinza-claro: #9c9c9c;
  --linha: rgba(7, 7, 7, 0.16);
  --marca-texto: rgba(7, 7, 7, 0.12);
  --co-verde: #2d482e;
  --co-oliva: #84814f;
  --co-salvia: #a5a48d;
  --co-claro: #f4f6f4;
  --disp: "Zodiak", "Times New Roman", serif;
  --texto: "Gambetta", Georgia, serif;
  --mono: "Fragment Mono", ui-monospace, monospace;
  --pad: clamp(20px, 4.2vw, 72px);
  --t-hero: clamp(56px, 11vw, 196px);
  --t-h1: clamp(38px, 5.6vw, 96px);
  --t-h2: clamp(28px, 3.4vw, 56px);
  --t-lead: clamp(17px, 1.45vw, 24px);
  --t-corpo: clamp(15px, 1.1vw, 18px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--papel); scroll-snap-type: y mandatory; -webkit-text-size-adjust: 100%; }
body { background: var(--papel); color: var(--tinta); font-family: var(--texto); font-size: var(--t-corpo); line-height: 1.45; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
em, i.en { font-style: italic; }

/* textura de papel: ruído fino em SVG, sem gradiente */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.progresso { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--tinta); transform-origin: left; transform: scaleX(0); z-index: 60; }

/* folha = uma tela */
.folha { position: relative; min-height: 100svh; scroll-snap-align: start; overflow: hidden; display: flex; flex-direction: column; padding: 0 var(--pad); }
.folha-topo, .folha-pe { position: relative; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0 0; }
.folha-pe { margin-top: auto; padding: 0 0 20px; border-top: 1px solid var(--linha); padding-top: 12px; }
.folha-corpo { position: relative; z-index: 4; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 0; }
.rub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--cinza); }
.marca-scout { display: inline-flex; align-items: center; gap: 10px; font-family: "Switzer", var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; }
.marca-scout img { width: 22px; height: 22px; }
.folha.escura { background: var(--tinta); color: var(--papel); }
.folha.escura .rub { color: var(--cinza-claro); }
.folha.escura .folha-pe { border-top-color: rgba(243, 242, 239, 0.18); }

/* tipografia */
.h-hero { font-family: var(--disp); font-weight: 700; font-size: var(--t-hero); line-height: 0.88; letter-spacing: -0.035em; }
.h1 { font-family: var(--disp); font-weight: 700; font-size: var(--t-h1); line-height: 0.98; letter-spacing: -0.025em; }
.h2 { font-family: var(--disp); font-weight: 700; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.02em; }
.h1 em, .h2 em, .h-hero em { font-weight: 400; }
.lead { font-size: var(--t-lead); line-height: 1.38; max-width: 40ch; color: var(--tinta-2); }
.folha.escura .lead { color: #c9c8c3; }
.nota { font-style: italic; font-size: 15px; color: var(--cinza); max-width: 46ch; }
.olho { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 18px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* efeito contorno -> preenchimento (duas camadas empilhadas) */
.of { position: relative; display: inline-block; }
.of-s { color: transparent; -webkit-text-stroke: 1.2px currentColor; }
.of-f { position: absolute; left: 0; top: 0; width: 100%; color: inherit; clip-path: inset(0% 0% 0% 0%); }
.folha.escura .of-s { -webkit-text-stroke-color: var(--papel); }

/* marca-texto */
mark.hl { color: inherit; background: linear-gradient(var(--marca-texto), var(--marca-texto)) no-repeat 0 88% / 100% 46%; padding: 0 2px; }

/* risco animado */
.risco { position: relative; display: inline-block; }
.risco-l { position: absolute; left: -3%; right: -3%; top: 54%; height: 2px; background: currentColor; transform-origin: left center; }

/* odômetro */
.odo { display: inline-flex; overflow: hidden; height: 1em; line-height: 1; vertical-align: top; }
.odo-d { display: block; height: 1em; overflow: hidden; }
.odo-c { display: flex; flex-direction: column; }
.odo-c span { height: 1em; line-height: 1; display: block; }

/* carimbo */
.carimbo { position: absolute; z-index: 6; width: clamp(120px, 13vw, 210px); aspect-ratio: 1; color: var(--tinta); pointer-events: none; }
.carimbo svg { width: 100%; height: 100%; }
.carimbo text { font-family: var(--mono); font-size: 9.4px; letter-spacing: 0.18em; fill: currentColor; }

/* fotos */
.foto { position: relative; overflow: hidden; background: #cfcdc7; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.legenda { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cinza); margin-top: 8px; }

.botao { display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border: 1.5px solid var(--tinta); font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; transition: background 0.25s, color 0.25s; }
.botao:hover { background: var(--tinta); color: var(--papel); }
.botao.cheio { background: var(--tinta); color: var(--papel); }
.botao.cheio:hover { background: transparent; color: var(--tinta); }
.folha.escura .botao { border-color: var(--papel); }
.folha.escura .botao.cheio { background: var(--papel); color: var(--tinta); }

.dica { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 6; }

@media (max-width: 820px) {
  html { scroll-snap-type: y proximity; }
  .folha-topo .rub.so-desk { display: none; }
  .carimbo { width: 116px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* modo PDF: uma folha por página, estado final, sem navegação */
@page { size: 1600px 900px; margin: 0; }
html.pdf { scroll-snap-type: none; }
html.pdf .folha { width: 1600px; height: 900px; min-height: 0; break-after: page; page-break-after: always; }
html.pdf .nav, html.pdf .progresso, html.pdf .dica { display: none; }
html.pdf body::before { display: none; }
