/*
Theme Name: SapiensLabs
Theme URI: https://sapienslabs.com.br/
Author: Leonardo Fontes de Sales
Author URI: https://sapienslabs.com.br/
Description: Tema clássico editorial da SapiensLabs — paleta Editorial Creme, tipografia em camadas (Antonio · Archivo Narrow · Inter · Fira Mono), fontes self-hosted, toggle claro/escuro. Home com slider + loop. Dark-first friendly.
Version: 2.6.95
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sapienslabs
Tags: classic, editorial, dark-mode, light-mode, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, custom-logo, custom-header, news
*/

/* ══════════════════════════════════════════════════════════
   SELF-HOSTED FONTS — Antonio + Archivo Narrow + Inter + Fira Mono
   Todas as fontes em assets/fonts/. Zero IP do visitante para
   fonts.googleapis.com / fonts.gstatic.com (LGPD-safe). Desde v2.6.4.

   v2.6.28: TTF → WOFF2 (~60% menor). Variantes estáticas
   Antonio/ArchivoNarrow Regular+Bold removidas — variable cobre
   weights 100-900 num único arquivo.
   ══════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Antonio';
  src: url('../fonts/Antonio-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/Antonio-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Archivo Narrow';
  src: url('../fonts/ArchivoNarrow-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/ArchivoNarrow-VariableFont_wght.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo Narrow';
  src: url('../fonts/ArchivoNarrow-Italic-VariableFont_wght.woff2') format('woff2-variations'),
       url('../fonts/ArchivoNarrow-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* Inter — variable font cobre opsz 14-32 + wght 100-900 (roman + italic) */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2-variations'),
       url('../fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2-variations'),
       url('../fonts/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Fira Mono — três pesos estáticos (sem variable font disponível) */
@font-face {
  font-family: 'Fira Mono';
  src: url('../fonts/FiraMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fira Mono';
  src: url('../fonts/FiraMono-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Fira Mono';
  src: url('../fonts/FiraMono-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ══════════════════════════════════════════════════════════
   TOKENS — Editorial Creme (light default) + Dark via data-attr
   ══════════════════════════════════════════════════════════ */
:root {
  --cream:        #f5efe2;
  --cream-deep:   #ebe2cf;
  --ink:          #1a2332;
  --ink-deep:     #0f1620;
  --rule:         #d8cfb9;
  --rule-dark:    #1e2a38;
  --accent:       #0693e3;
  --gold:         #b8874a;
  --red:          #c0392b;
  --muted:        #8a7e64;
  --text-soft:    #4a5365;

  --paper:        var(--cream);
  --paper-deep:   var(--cream-deep);
  --text:         var(--ink);
  --line:         var(--rule);

  /* Camada editorial de prosa (2.6.69) — cópia auditada do DS 1.7.0
     (colors_and_type.css canônico; equivalências no check-tokens-drift.py).
     Nasceu local no tema em 2.6.67 (achados A, D e J do estudo
     audits/2026-07-25-estudo-layout-blog.md) e foi promovida ao canônico.
     Par light aqui, par dark no bloco [data-theme="dark"] abaixo.
     --link separa "cor de link de texto" de "cor de interação" (--accent,
     que segue reservado a CTAs e estados ativos). */
  --link:            #056ba6;    /* = --color-link-deep (5,01:1 sobre o creme) */
  --link-visited:    #4a6a86;    /* = --color-link-visited-deep (4,96:1) */
  --prose-ink:       var(--ink); /* tinta da prosa longa (.entry-content) */
  --prose-measure:   62ch;       /* medida do texto corrido (~71 cpl) */
  --prose-body:      1.18rem;    /* corpo de artigo */
  --prose-leading:   1.75;       /* entrelinha de leitura longa */
  --prose-h2:        1.95rem;    /* escala de artigo — h2 de seção */
  --prose-h3:        1.45rem;    /* escala de artigo — h3 */
  --prose-block-gap: 1.2em;      /* respiro entre blocos de prosa */

  /* Tokens de leitura locais do tema (2.6.67, fora do DS): texto pequeno. */
  --muted-deep:    #6f6549;    /* 5,04:1 — muted p/ texto pequeno (10-11px) */
  --gold-deep:     #8a6230;    /* 4,74:1 — gold p/ texto pequeno (eyebrow) */

  --content-max:  1200px;
  --prose-max:    720px;       /* moldura da coluna de prosa (= DS --prose-max) */

  --f-display:    'Antonio', 'Oswald', sans-serif;
  --f-body:       'Archivo Narrow', sans-serif;
  --f-ui:         'Inter', system-ui, sans-serif;
  --f-mono:       'Fira Mono', ui-monospace, monospace;
}
[data-theme="dark"] {
  --paper:      var(--ink);
  --paper-deep: var(--ink-deep);
  --text:       #ffffff;
  --line:       var(--rule-dark);
  --text-soft:  #b0b8c4;
  --muted:      #6b7a8d;

  /* Par dark da camada de prosa (DS 1.7.0; no tema desde 2.6.67) —
     contrastes sobre o ink: link 4,73:1 · visited 6,35:1 · muted-deep
     5,43:1 · gold 4,96:1. --prose-ink rebaixa a prosa longa de #fff
     (15,8:1, halation em tela escura) para #e0e0e0 (11,96:1). */
  --link:          #0693e3;    /* = --color-link */
  --link-visited:  #8aa8c0;    /* = --color-link-visited */
  --prose-ink:     #e0e0e0;
  --muted-deep:    #8a99ab;
  --gold-deep:     var(--gold);
}

/* ══════════════════════════════════════════════════════════
   RESET + BASE
   ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { max-width: 100%; display: block; }

html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}
a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent); }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; z-index: 9999;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Utility type */
.eyebrow {
  font-family: var(--f-ui);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  /* 2.6.67: gold-deep no light (o gold #b8874a dava 2,78:1 a 11px sobre
     o creme); em dark --gold-deep = --gold, comportamento inalterado. */
  color: var(--gold-deep);
}
.display {
  font-family: var(--f-display);
  font-weight: 900; text-transform: uppercase;
  /* 0.92 → 1.08: utilitário .display usado por títulos de página e blocos;
     entrelinha abaixo de 1 encosta acento/cedilha em caixa-alta (21/08/2026). */
  letter-spacing: 0.01em; line-height: 1.364;
}
.display em { font-style: normal; color: var(--accent); }
.meta {
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}

/* Container */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}
