/* =========================================================
   GAZETA ILUSTRADA DO NLMS — base
   Papel, tinta e um único carimbo laranja.
   ========================================================= */

/* as fontes da referência Miranda, servidas pelo próprio site (pasta /fonts) */
@font-face { font-family: "Canopee"; src: url("../fonts/canopee.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Editorial New"; src: url("../fonts/editorial-new-ultralight.woff2") format("woff2"); font-weight: 200 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Editorial New"; src: url("../fonts/editorial-new-ultralight-italic.woff2") format("woff2"); font-weight: 200 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Editorial New"; src: url("../fonts/editorial-new-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Editorial New"; src: url("../fonts/editorial-new-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
/* só C, G e O: dentro dos títulos em Canopée, essas três letras vêm da Domaine (o detalhe do Miranda) */
@font-face { font-family: "Domaine Display"; src: url("../fonts/domaine-display-condensed-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* cores */
  --papel: #cdc6be;      /* o papel-jornal, o mesmo tom do Miranda */
  --osso: #cdc6be;       /* claro sobre a tinta: números de fundo, legendas */
  --tinta: #1d1d1b;      /* a mesma tinta do logo NLMS */
  --carvao: #69645f;     /* texto secundário */
  --preto: #000;
  --brasa: #c03f13;      /* o carimbo — única cor do sistema */
  --cuche: #f4f1ea;      /* papel brilhante da figurinha */

  /* fontes — o sistema da referência Miranda
     Canopée (VJ Type), PP Editorial New (Pangram Pangram) e Domaine Display (Klim) são pagas.
     Os nomes delas vêm primeiro: com as fontes instaladas ou com os arquivos em /fonts,
     o site usa as originais. Sem elas, entra a Instrument Serif, a gratuita mais próxima. */
  --f-canopee: "Canopee", "Canopée", "Instrument Serif", "Times New Roman", serif;
  --f-editorial: "PP Editorial New", "Editorial New", "Instrument Serif", Georgia, serif;
  --f-domaine: "Domaine Display", "Instrument Serif", Georgia, serif;
  --f-germgoth: "Germgoth", "Bodoni Moda", serif;   /* números grandes */
  /* papéis */
  --f-display: var(--f-canopee);   /* faixas e títulos: sempre em caixa alta */
  --f-texto: var(--f-editorial);   /* texto, navegação, legendas */
  --f-mao: var(--f-editorial);     /* bilhetes à mão: no itálico */
  --peso-display: 400;
  --peso-texto: 300;               /* Editorial New fina, como no Miranda */

  /* formas */
  --r-tag: 2.88px;
  --r-card: 11.52px;
  --sombra: rgba(29, 29, 27, .2) -4px 4px 6px 0;
  --sombra-2: rgba(29, 29, 27, .2) -5px 3px 6px 0;
  --margem: clamp(16px, 2.6vw, 40px);
  --regua: 1px solid var(--tinta);
  --suave: cubic-bezier(.2, .75, .2, 1);

  /* grão do papel (ruído impresso, não gradiente) */
  --grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .11 0 0 0 0 .1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

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

html {
  scrollbar-gutter: stable;   /* a largura não pula quando a rolagem trava durante a chegada */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--tinta);        /* a mesa onde o jornal está */
  color: var(--tinta);
  font: var(--peso-texto) 18px/1.27 var(--f-texto);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
/* a Editorial New trabalha leve: destaque vira itálico, nunca negrito falso */
b, strong { font-weight: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--preto); }

::selection { background: var(--brasa); color: var(--papel); }
/* "marca": o mesmo destaque da seleção do mouse (fundo brasa, letra clara, canto reto), para marcar
   palavras no texto, como um marca-texto do próprio jornal */
/* o triângulo de "play" desenhado aqui: o caractere vira emoji no iPhone */
.tri { display: inline-block; width: .52em; height: .6em; margin-right: .28em; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); vertical-align: .02em; }
.marca { padding: .04em .2em .02em; background: var(--brasa); color: var(--papel); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

:focus-visible {
  outline: 2px dashed var(--brasa);
  outline-offset: 4px;
}

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.pular {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--tinta); color: var(--papel);
  padding: 10px 14px; border-radius: var(--r-tag);
  font: var(--peso-texto) 16px/1 var(--f-texto); letter-spacing: 0;
  text-decoration: none;
}
.pular:focus { top: 12px; }

/* C, G e O redondos dentro dos títulos (ver trocarLetras em util.js) */
.dg { font-family: var(--f-domaine); font-weight: 500; letter-spacing: -.03em; }

.logo-nlms { width: 100%; height: auto; fill: currentColor; }

/* botões editoriais */
.botao {
  appearance: none;
  display: inline-flex; align-items: center; gap: .5em;
  border: 1px solid var(--tinta);
  background: var(--tinta); color: var(--papel);
  font: var(--peso-texto) 18px/1 var(--f-texto);
  letter-spacing: -.01em; text-transform: none;
  padding: 12px 18px 11px;
  border-radius: var(--r-tag);
  cursor: pointer;
  transition: transform .25s var(--suave), background-color .2s, color .2s;
}
.botao:hover { transform: translateY(-2px); }
.botao:active { transform: translateY(0); }
.botao--fantasma { background: transparent; color: var(--tinta); }

.link-texto {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; color: inherit;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}

/* antes do JS montar a cena, a capa espera — e aparece sozinha se o JS falhar */
.js .jornal { visibility: hidden; animation: mostrar-capa 0s 3.5s forwards; }
@keyframes mostrar-capa { to { visibility: visible; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
