/*
Theme Name: Cannalize Theme
Theme URI: https://cannalize.com.br
Author: Cannalize
Author URI: https://cannalize.com.br
Description: Tema WordPress leve e customizado para o portal Cannalize. Construído sem page builder, com foco em SEO técnico, Core Web Vitals, E-E-A-T e mobile-first. Substitui a stack Elementor por templates nativos.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Tested up to: 6.6
Text Domain: cannalize
*/

/* =========================================================
   1. DESIGN TOKENS
   Ajuste as cores para a identidade visual real da marca.
   ========================================================= */
:root {
  /* Cor - ajustar para paleta oficial da Cannalize */
  --color-bg: #ffffff;
  --color-bg-alt: #f7f7f5;
  --color-text: #1a1a1a;
  --color-text-muted: #55554f;
  --color-primary: #2f6b3a;      /* verde institucional - placeholder */
  --color-primary-dark: #234f2b;
  --color-accent: #c9a227;       /* dourado/CTA - placeholder */
  --color-border: #e4e4e0;
  --color-link: var(--color-primary-dark);

  /* Tipografia */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-body);

  --fs-body: 1rem;            /* 16px */
  --fs-body-lg: 1.125rem;     /* 18px - preferencial para artigos longos */
  --fs-small: 0.875rem;       /* 14px - metadados, legendas */
  --fs-h1-mobile: 1.75rem;    /* 28px */
  --fs-h1-desktop: 2.5rem;    /* 40px */
  --fs-h2-mobile: 1.375rem;   /* 22px */
  --fs-h2-desktop: 1.75rem;   /* 28px */
  --fs-h3-mobile: 1.125rem;   /* 18px */
  --fs-h3-desktop: 1.375rem;  /* 22px */

  --lh-body: 1.65;
  --lh-heading: 1.25;

  /* Espaçamento (escala 4px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;

  /* Layout */
  --content-max-width: 720px;   /* ~65-75 caracteres por linha */
  --page-max-width: 1200px;
  --radius: 8px;
  --touch-target: 44px;

  /* Breakpoints de referência (usar em media queries) */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* =========================================================
   2. RESET MÍNIMO
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
}
img, picture, video, svg { max-width: 100%; height: auto; display: block; }
/* iframes (embeds) só recebem max-width — a altura deve respeitar o que
   cada provedor define (Spotify, LinkedIn etc. usam alturas fixas próprias;
   forçar height:auto quebraria esses embeds). */
iframe { max-width: 100%; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
ul, ol { padding-left: 1.2em; }

/* =========================================================
   3. TIPOGRAFIA
   ========================================================= */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--fs-h1-mobile); }
h2 { font-size: var(--fs-h2-mobile); margin-top: var(--space-6); }
h3 { font-size: var(--fs-h3-mobile); margin-top: var(--space-4); }

@media (min-width: 768px) {
  h1 { font-size: var(--fs-h1-desktop); }
  h2 { font-size: var(--fs-h2-desktop); }
  h3 { font-size: var(--fs-h3-desktop); }
}

.entry-content { font-size: var(--fs-body-lg); }
.entry-content p { margin: 0 0 var(--space-3); max-width: 68ch; }
.entry-content ul, .entry-content ol { max-width: 68ch; margin-bottom: var(--space-3); }

/* =========================================================
   4. LAYOUT BASE
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.content-narrow {
  max-width: var(--content-max-width);
  margin-inline: auto;
}

/* =========================================================
   5. ACESSIBILIDADE / TOQUE
   ========================================================= */
a.button, button, input[type="submit"] {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  padding: var(--space-2) var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  cursor: pointer;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  z-index: 999;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }
