/*
Theme Name: Filimartis
Theme URI: https://filimartis.com.br/
Author: Filimartis
Author URI: https://filimartis.com.br/
Description: Tema institucional base da Filimartis para sites WordPress personalizados. Instalação em uso: site institucional Fortisagro.
Version: 2.2.5
Text Domain: filimartis
Requires at least: 6.5
Requires PHP: 8.0
License: Proprietary
*/

/* As variáveis de cor e de fonte abaixo têm o MESMO valor do theme.json,
   mas lidas a partir de --wp--preset--color/font-family--*, que é o que o
   WordPress realmente gera (em #global-styles-inline-css, no <head> de
   toda página) a partir do theme.json — e que Aparência ▸ Design ▸
   Estilos passa a sobrescrever quando alguém muda uma cor ou fonte por
   ali. Sem essa ponte, esse painel existiria mas não mudaria nada aqui:
   o cabeçalho, o rodapé, os botões e as seções usam estas variáveis, não
   as cores "soltas" que os blocos nativos leem diretamente. O valor
   depois da vírgula é só o retrocesso (mesmo hex de sempre) para quando
   o preset correspondente não existir por algum motivo. */
:root {
  /* --- Cores da marca (extraídas do SVG do logotipo Fortisagro) --- */
  --brand-blue: var(--wp--preset--color--brand-blue, #2074ba);     /* primária: cabeçalho, títulos de destaque, links */
  --brand-green: var(--wp--preset--color--brand-green, #02914b);   /* apoio: realces, ícones, detalhes */
  --brand-yellow: var(--wp--preset--color--brand-yellow, #fec708); /* destaque/ação: CTA, foco, acentos */

  /* Compatibilidade com nomes antigos do tema-base */
  --brand-primary: var(--brand-blue);
  --brand-dark: var(--wp--preset--color--surface-dark, #12222e);
  --brand-light: var(--wp--preset--color--surface-muted, #f4f6f8);
  --brand-white: var(--wp--preset--color--surface, #ffffff);

  /* --- Neutros (escolha de design derivada da paleta) --- */
  --surface: var(--wp--preset--color--surface, #ffffff);
  --surface-muted: var(--wp--preset--color--surface-muted, #f4f6f8);
  --surface-dark: var(--wp--preset--color--surface-dark, #12222e);
  --text-color: var(--wp--preset--color--text, #1b2a38);
  --text-strong: var(--wp--preset--color--surface-dark, #12222e); /* sem preset próprio — segue "Superfície escura" */
  --text-muted: var(--wp--preset--color--text-muted, #5a6b78);
  --text-on-dark: var(--wp--preset--color--text-on-dark, #e8eef2);
  --border: var(--wp--preset--color--border, #e2e8ec);

  /* --- Estados interativos (sem preset — contraste validado manualmente, ver README) --- */
  --link: #1c6aa8;          /* azul levemente escurecido: 4.5:1 sobre branco */
  --link-hover: #12507f;
  --focus-ring: #12222e;    /* anel escuro; par amarelo usado sobre fundo claro */
  --focus-ring-offset: #ffffff;

  /* --- Layout (sem equivalente em Estilos — exige código, ver guia) --- */
  --container: 1200px;
  --container-narrow: 760px;
  --header-height: 76px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 180ms ease;
  --shadow-soft: 0 1px 2px rgba(18, 34, 46, .06), 0 8px 24px rgba(18, 34, 46, .06);

  /* --- Tipografia --- */
  --font-body: var(--wp--preset--font-family--body, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  --font-head: var(--wp--preset--font-family--heading, "Sora", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

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

html {
  scroll-behavior: smooth;
  /* Compensa o cabeçalho fixo ao navegar por âncoras */
  scroll-padding-top: calc(var(--header-height) + 16px);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--link-hover); }

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-main { min-height: 60vh; }

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