/* ============================================================
   Koro Design System — Tokens & Foundation
   Valores fixos. As cores dinâmicas (--primary, --accent-brand)
   são injetadas via <style> inline pelo base.html a partir do
   model Branding (white-label).
   ============================================================ */

:root {
  /* Cores neutras fixas (foundation) */
  --background:         #FFFFFF;
  --foreground:         #0A0A0A;
  --muted:              #F5F5F5;
  --muted-foreground:   #737373;
  --border:             #EEEEEE;
  --border-strong:      #D4D4D4;

  /* Estados */
  --success:            #00A67E;
  --warning:            #F59E0B;
  --destructive:        #B91C1C;

  /* Geometria */
  --radius:             4px;
  --radius-pill:        999px;

  /* Spacing (múltiplos de 4px) */
  --space-1:            4px;
  --space-2:            8px;
  --space-3:            12px;
  --space-4:            16px;
  --space-5:            20px;
  --space-6:            24px;
  --space-8:            32px;
  --space-10:           40px;
  --space-12:           48px;
  --space-16:           64px;

  /* Tipografia */
  --font-sans:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:          ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-xs:            12px;
  --text-sm:            13px;
  --text-base:          15px;
  --text-lg:            18px;

  /* Sombras (quase invisíveis) */
  --shadow-sm:          0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow:             0 2px 8px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-fast:    0.15s ease;
  --transition:         0.2s ease;

  /* Valores padrão — sobrescritos pelo Branding via <style> inline no <head> */
  --primary:            #0A0A0A;
  --primary-hover:      #262626;
  --primary-foreground: #FFFFFF;
  --accent-brand:       #660099;
}

/* Reset + base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; tab-size: 4; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografia ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--foreground); }

h1 { font-size: clamp(1.75rem, 2vw + 1rem, 2.25rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 1.5vw + 0.75rem, 1.875rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.25; }
h3 { font-size: clamp(1.25rem, 1vw + 0.5rem, 1.5rem); font-weight: 500; line-height: 1.3; }
h4 { font-size: clamp(1rem, 0.75vw + 0.5rem, 1.25rem); font-weight: 500; line-height: 1.4; }
h5 { font-size: 1rem; font-weight: 500; line-height: 1.4; }
h6 { font-size: 0.875rem; font-weight: 500; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); }

p { margin: 0 0 var(--space-4); }

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

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code {
  background: var(--muted);
  padding: 2px 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Utilitários simples --------------------------------------------------- */
.text-muted { color: var(--muted-foreground); }
.text-small { font-size: var(--text-sm); }
.text-xs    { font-size: var(--text-xs); }

.stack      { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-sm   { display: flex; flex-direction: column; gap: var(--space-2); }
.row-center { display: flex; align-items: center; gap: var(--space-2); }
.row-between{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }

/* Focus ring padrão (acessibilidade) */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Seleção de texto */
::selection { background: var(--primary); color: var(--primary-foreground); }
