/**
 * ============================================================
 * ANOTAÊ! COMUNICAÇÕES — Design Tokens
 * ============================================================
 * Versão: 1.0.0
 * Revisão: Alina Wheeler (brand-squad) + Marty Neumeier (brand-squad)
 * Estrutura: Brad Frost Atomic System
 * Produção: UI Engineer (design-squad)
 *
 * USO EM NOVOS PROJETOS:
 *   <link rel="stylesheet" href="[path]/tokens.css" />
 *   ou @import url('[path]/tokens.css');
 *
 * Todos os valores vêm daqui. Zero magic numbers nos componentes.
 * ============================================================
 */

@import url("https://fonts.googleapis.com/css2?family=Asap+Condensed:ital,wght@1,500;1,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap");

:root {
  /* ==========================================================
     CORES — Hierarquia Unificada
     (Alina Wheeler: 1 sistema, não 3 documentos separados)
     ==========================================================

     Papel de cada família:
     --ink-*      →  Primário da marca / UI escuro / texto
     --page-*     →  Backgrounds / superfícies neutras quentes
     --note-*     →  Acentos de categoria / contexto / diversidade

     Acentos de nota (usar UM por contexto, nunca todos juntos):
     --note-purple  →  conteúdo, estratégia, digital
     --note-blue    →  tecnologia, social, dados
     --note-green   →  resultado, crescimento, sucesso
     --note-yellow  →  destaque, atenção, energia
     --note-red     →  alerta, urgência, erro
  ========================================================== */

  /* --- Família Ink (Laranja/Âmbar — alma do lápis) --- */
  --ink-50: #fff8ee;
  --ink-100: #feefd3;
  --ink-200: #fdd89a;
  --ink-300: #f7ae42; /* âmbar lápis — leve, acolhedor     */
  --ink-400: #f58723; /* laranja lápis — energia, primário  */
  --ink-500: #e07318;
  --ink-600: #c46010;
  --ink-700: #9e4c0d;
  --ink-800: #7a3a0a;
  --ink-900: #5a2b07;

  /* --- Família Dark (Quase-preto quente — não frio) --- */
  --dark-50: #f5f4f2;
  --dark-100: #e9e8e5;
  --dark-200: #cccac5;
  --dark-300: #9e9e9e; /* cinza logo                        */
  --dark-400: #71706d;
  --dark-500: #51524f; /* cinza escuro logo                 */
  --dark-600: #3d3c39;
  --dark-700: #302f32; /* quase-preto logo                  */
  --dark-800: #282828; /* preto principal da marca          */
  --dark-900: #141414;

  /* --- Família Page (Neutros quentes — backgrounds) --- */
  --page-50: #fafaf8;
  --page-100: #f5f2ee;
  --page-200: #ede8df;
  --page-300: #e7e2cf; /* creme — background padrão da marca */
  --page-400: #d4cdb8;
  --page-500: #cac6b8; /* bege médio                        */
  --page-600: #a39c8a; /* cinza-quente                      */
  --page-700: #7e7869;
  --page-800: #5a5549;
  --page-900: #3a3630;

  /* --- Acentos de Nota (usar UM por contexto) --- */
  --note-purple: #5332f7;
  --note-purple-light: #7b5ff9;
  --note-purple-bg: #f0edff;

  --note-blue: #0090f9;
  --note-blue-light: #39aaff;
  --note-blue-bg: #e6f4ff;

  --note-green: #22c55f;
  --note-green-light: #4dd47d;
  --note-green-bg: #eafbf1;

  --note-yellow: #ebb30b;
  --note-yellow-light: #f2c93a;
  --note-yellow-bg: #fef9e7;

  --note-red: #ef4444;
  --note-red-light: #f87171;
  --note-red-bg: #fef2f2;

  /* ==========================================================
     CORES SEMÂNTICAS — Papéis de UI
     (Referenciam sempre os tokens acima — nunca valores diretos)
  ========================================================== */

  --color-brand: var(--ink-400); /* laranja principal     */
  --color-brand-light: var(--ink-300); /* âmbar suave           */
  --color-brand-dark: var(--ink-600); /* laranja escuro        */
  --color-brand-bg: var(--ink-50); /* fundo de marca        */

  --color-text-primary: var(--dark-800); /* #282828 — corpo texto */
  --color-text-secondary: var(--page-600); /* #A39C8A — secundário  */
  --color-text-muted: var(--page-500); /* #CAC6B8 — desativado  */
  --color-text-inverse: #ffffff; /* sobre fundos escuros  */
  --color-text-on-brand: #ffffff; /* sobre laranja         */

  --color-bg: var(--page-300); /* #E7E2CF — creme base  */
  --color-surface: #ffffff; /* cards, modais         */
  --color-surface-raised: var(--page-100); /* superfície elevada    */
  --color-border: var(--page-400); /* bordas suaves         */
  --color-border-focus: var(--ink-400); /* foco interativo       */

  --color-success: var(--note-green);
  --color-success-bg: var(--note-green-bg);
  --color-warning: var(--note-yellow);
  --color-warning-bg: var(--note-yellow-bg);
  --color-error: var(--note-red);
  --color-error-bg: var(--note-red-bg);
  --color-info: var(--note-blue);
  --color-info-bg: var(--note-blue-bg);

  /* ==========================================================
     TIPOGRAFIA
     Display:  Asap Condensed 700 Italic  (títulos, hero, impacto)
     Accent:   Asap Condensed 500 Italic  (subtítulos, labels, destaques)
     Body:     DM Sans 300–600            (corpo, UI, interface)
  ========================================================== */

  --font-display: "Asap Condensed", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  --font-weight-display: 700; /* Asap Condensed Bold Italic   */
  --font-weight-accent: 500; /* Asap Condensed Medium Italic */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  /* Escala tipográfica — Major Third (1.25) */
  --text-2xs: 0.625rem; /*  10px */
  --text-xs: 0.75rem; /*  12px */
  --text-sm: 0.875rem; /*  14px */
  --text-base: 1rem; /*  16px */
  --text-lg: 1.125rem; /*  18px */
  --text-xl: 1.25rem; /*  20px */
  --text-2xl: 1.5rem; /*  24px */
  --text-3xl: 1.875rem; /*  30px */
  --text-4xl: 2.25rem; /*  36px */
  --text-5xl: 3rem; /*  48px */
  --text-6xl: 3.75rem; /*  60px */
  --text-7xl: 4.5rem; /*  72px */

  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-loose: 1.75;

  /* Letter spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;
  --tracking-widest: 0.14em;

  /* ==========================================================
     ESPAÇAMENTO — Grid 8pt
  ========================================================== */

  --space-px: 1px;
  --space-0-5: 0.125rem; /*  2px */
  --space-1: 0.25rem; /*  4px */
  --space-2: 0.5rem; /*  8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-7: 1.75rem; /* 28px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-14: 3.5rem; /* 56px */
  --space-16: 4rem; /* 64px */
  --space-20: 5rem; /* 80px */
  --space-24: 6rem; /* 96px */
  --space-28: 7rem; /* 112px */
  --space-32: 8rem; /* 128px */

  /* ==========================================================
     BORDER RADIUS
     Filosofia: arredondado generoso — amigável mas não infantil
  ========================================================== */

  --radius-none: 0;
  --radius-xs: 0.25rem; /*  4px — ícones pequenos       */
  --radius-sm: 0.5rem; /*  8px — chips, tags           */
  --radius-md: 0.75rem; /* 12px — inputs, selects       */
  --radius-lg: 1rem; /* 16px — cards, botões         */
  --radius-xl: 1.5rem; /* 24px — cards grandes         */
  --radius-2xl: 2rem; /* 32px — modais, popovers      */
  --radius-full: 9999px; /* pill — badges, avatares      */

  /* ==========================================================
     SOMBRAS
     Tonalidade: quente (usa dark-800 como base, não #000)
  ========================================================== */

  --shadow-xs: 0 1px 2px rgba(40, 40, 40, 0.06);
  --shadow-sm:
    0 2px 6px rgba(40, 40, 40, 0.08), 0 1px 2px rgba(40, 40, 40, 0.04);
  --shadow-md:
    0 4px 16px rgba(40, 40, 40, 0.1), 0 2px 4px rgba(40, 40, 40, 0.06);
  --shadow-lg:
    0 8px 28px rgba(40, 40, 40, 0.12), 0 4px 8px rgba(40, 40, 40, 0.07);
  --shadow-xl:
    0 16px 48px rgba(40, 40, 40, 0.14), 0 8px 16px rgba(40, 40, 40, 0.08);
  --shadow-2xl: 0 24px 64px rgba(40, 40, 40, 0.18);

  /* Sombra colorida — laranja (para botão primário em hover) */
  --shadow-brand: 0 6px 20px rgba(245, 135, 35, 0.32);

  /* ==========================================================
     TRANSIÇÕES
  ========================================================== */

  --transition-instant: 80ms ease;
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-bounce: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ==========================================================
     Z-INDEX — Escala nomeada
  ========================================================== */

  --z-below: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  /* ==========================================================
     LAYOUT
  ========================================================== */

  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --container-pad: var(--space-6);

  --section-pad-y: var(--space-20);
  --section-pad-y-sm: var(--space-12);

  /* ==========================================================
     BREAKPOINTS (referência — usar em @media manualmente)
     sm:  640px
     md:  768px
     lg:  1024px
     xl:  1280px
     2xl: 1536px
  ========================================================== */
}

/* ==========================================================
   TEMAS — data-theme
   Apenas as variáveis semânticas mudam entre temas.
   Os tokens primitivos (--ink-*, --page-*, etc.) ficam
   em :root e nunca mudam — são a fonte da verdade.
========================================================== */

[data-theme="light"] {
  --color-brand: var(--ink-400);
  --color-brand-light: var(--ink-300);
  --color-brand-dark: var(--ink-600);
  --color-brand-bg: var(--ink-50);

  --color-text-primary: var(--dark-800);
  --color-text-secondary: var(--page-600);
  --color-text-muted: var(--page-500);
  --color-text-inverse: #ffffff;
  --color-text-on-brand: #ffffff;

  --color-bg: var(--page-300);
  --color-surface: #ffffff;
  --color-surface-raised: var(--page-100);
  --color-border: var(--page-400);
  --color-border-focus: var(--ink-400);

  --color-success: var(--note-green);
  --color-success-bg: var(--note-green-bg);
  --color-warning: var(--note-yellow);
  --color-warning-bg: var(--note-yellow-bg);
  --color-error: var(--note-red);
  --color-error-bg: var(--note-red-bg);
  --color-info: var(--note-blue);
  --color-info-bg: var(--note-blue-bg);

  /* Sombras — tom quente, sobre fundo claro */
  --shadow-xs: 0 1px 2px rgba(40, 40, 40, 0.06);
  --shadow-sm: 0 2px 6px rgba(40, 40, 40, 0.08), 0 1px 2px rgba(40, 40, 40, 0.04);
  --shadow-md: 0 4px 16px rgba(40, 40, 40, 0.10), 0 2px 4px rgba(40, 40, 40, 0.06);
  --shadow-lg: 0 8px 28px rgba(40, 40, 40, 0.12), 0 4px 8px rgba(40, 40, 40, 0.07);
  --shadow-xl: 0 16px 48px rgba(40, 40, 40, 0.14), 0 8px 16px rgba(40, 40, 40, 0.08);
  --shadow-brand: 0 6px 20px rgba(245, 135, 35, 0.32);
}

[data-theme="dark"] {
  --color-brand: var(--ink-400);
  --color-brand-light: var(--ink-300);
  --color-brand-dark: var(--ink-500);
  --color-brand-bg: rgba(245, 135, 35, 0.12);

  /* Textos sobre fundo escuro */
  --color-text-primary: var(--dark-100);   /* quase-branco quente  */
  --color-text-secondary: var(--dark-300); /* cinza médio          */
  --color-text-muted: var(--dark-400);     /* cinza desativado     */
  --color-text-inverse: var(--dark-800);
  --color-text-on-brand: #ffffff;

  /* Superfícies escuras usando a paleta dark da marca */
  --color-bg: var(--dark-900);             /* #141414 — base       */
  --color-surface: var(--dark-800);        /* #282828 — cards      */
  --color-surface-raised: var(--dark-700); /* #302F32 — elevado    */
  --color-border: var(--dark-600);         /* #3D3C39 — bordas     */
  --color-border-focus: var(--ink-400);

  /* Acentos de nota — versões adaptadas para dark */
  --color-success: var(--note-green-light);
  --color-success-bg: rgba(34, 197, 95, 0.15);
  --color-warning: var(--note-yellow-light);
  --color-warning-bg: rgba(235, 179, 11, 0.15);
  --color-error: var(--note-red-light);
  --color-error-bg: rgba(239, 68, 68, 0.15);
  --color-info: var(--note-blue-light);
  --color-info-bg: rgba(0, 144, 249, 0.15);

  /* Sombras — mais densas, usam o preto real */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55), 0 4px 10px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 56px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.35);
  --shadow-brand: 0 6px 24px rgba(245, 135, 35, 0.4);
}

/* ==========================================================
   RESET MÍNIMO — incluir junto com tokens.css
========================================================== */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}
input,
textarea,
select {
  font: inherit;
}

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

/* ==========================================================
   CLASSES UTILITÁRIAS BÁSICAS — Atoms de tipografia
========================================================== */

.text-display {
  font-family: var(--font-display);
  font-weight: var(--font-weight-display);
  font-style: italic;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.text-accent {
  font-family: var(--font-display);
  font-weight: var(--font-weight-accent);
  font-style: italic;
  line-height: var(--leading-snug);
}

.text-body {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-normal);
}

.text-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Brand color utility */
.brand-orange {
  color: var(--color-brand);
}
.bg-brand {
  background-color: var(--color-brand);
  color: var(--color-text-on-brand);
}
.bg-page {
  background-color: var(--color-bg);
}
.bg-surface {
  background-color: var(--color-surface);
}
