/* Rocksosint · design tokens
 * Único arquivo com valor cru de cor, fonte, espaço, raio e movimento.
 * Componentes consomem só os semânticos (--bg, --text, --accent...). Ver DESIGN.md.
 * Hallmark · genre: atmospheric · theme: custom (stone / bone / wine, hue 20) · display: Cabinet Grotesk · body: Switzer
 */

:root {
  /* Primitivos · pedra (preto quente, matiz 20) */
  --stone-950: oklch(12.5% 0.006 20);
  --stone-900: oklch(16% 0.008 20);
  --stone-850: oklch(20% 0.010 20);
  --stone-800: oklch(24% 0.011 20);
  --stone-700: oklch(30% 0.012 20);
  --stone-500: oklch(50% 0.012 20);
  --stone-400: oklch(64% 0.010 20);
  --stone-200: oklch(85% 0.008 20);

  /* Primitivos · osso (papel do relatório) */
  --bone-50: oklch(96.5% 0.006 40);
  --bone-100: oklch(92% 0.008 40);
  --bone-300: oklch(80% 0.010 40);
  --ink-900: oklch(19% 0.010 20);
  --ink-600: oklch(42% 0.012 20);

  /* Primitivos · vinho (o veio) */
  --wine-900: oklch(22% 0.075 18);
  --wine-700: oklch(33% 0.115 18);
  --wine-500: oklch(53% 0.180 23); /* ≈ #BE2E36 */

  /* Primitivos · estado funcional (só app: ponto de status real) */
  --signal-ok: oklch(74% 0.110 150);
  --signal-warn: oklch(80% 0.120 80);
  /* Erro de sistema no app: laranja-avermelhado, distinto do vinho (vinho = achado/marca) */
  --signal-danger: oklch(70% 0.150 40);

  /* Semânticos · material pedra (padrão) */
  --bg: var(--stone-950);
  --surface-1: var(--stone-900);
  --surface-2: var(--stone-850);
  --surface-3: var(--stone-800);
  --line: var(--stone-700);
  --line-strong: var(--stone-500);
  --text: var(--stone-200);
  --text-muted: var(--stone-400);
  --text-strong: var(--bone-50);
  --text-inverse: var(--ink-900);
  --accent: var(--wine-500);
  --accent-fill: var(--wine-700);
  /* Texto de destaque no mesmo vermelho sólido da marca (o vinho claro lia como rosa lavado).
     Contraste ~3,3:1 no fundo pedra: usar em número, ícone e texto grande, não em parágrafo */
  --accent-text: var(--wine-500);
  --on-accent: var(--bone-50);
  --focus: var(--wine-500);
  --danger: var(--wine-500);
  --ok: var(--signal-ok);
  --warn: var(--signal-warn);
  --scrim: oklch(12.5% 0.006 20 / 0.72);
  --scrim-soft: oklch(12.5% 0.006 20 / 0.5);

  /* Tipografia */
  --font-display: "Cabinet Grotesk", "Switzer", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Switzer", ui-sans-serif, system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.25rem;
  --text-lg: 1.5625rem;
  --text-xl: 1.9531rem;
  --text-2xl: 2.4414rem;
  --text-display-s: clamp(2.25rem, 3.6vw + 1rem, 3.8rem);
  --text-display: clamp(2.75rem, 5vw + 1rem, 5.25rem);

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-heavy: 800;

  --leading-tight: 1.0;
  --leading-snug: 1.2;
  --leading-body: 1.55;
  --tracking-display: -0.035em;
  --tracking-heading: -0.02em;
  --tracking-label: 0.12em;
  --measure: 65ch;

  /* Espaço (4pt) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --sheet-tab-h: 32px;  /* altura da aba de dossiê das folhas (landing) */
  --content-max: 76rem;

  /* Raio (varia por papel, nunca pílula em botão) */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-sheet: 32px;

  /* Borda */
  --rule: 1px;

  /* Elevação: só a folha que cobre outra projeta sombra */
  --shadow-sheet: 0 -28px 60px -24px oklch(5% 0.01 20 / 0.7);
  --shadow-pop: 0 18px 40px -18px oklch(5% 0.01 20 / 0.75), 0 2px 6px oklch(5% 0.01 20 / 0.4);

  /* Movimento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  /* Camadas */
  --z-sheet: 1;
  --z-nav: 50;
  --z-popover: 100;
  --z-modal: 200;
  --z-toast: 300;

  color-scheme: dark;
}

/* Materiais de folha: trocam só os semânticos, componentes não mudam */
.sheet--bone {
  --bg: var(--bone-50);
  --surface-1: var(--bone-100);
  --surface-2: oklch(89% 0.009 40);
  --surface-3: oklch(86% 0.010 40);
  --line: var(--bone-300);
  --line-strong: oklch(62% 0.012 30);
  --text: var(--ink-900);
  --text-muted: var(--ink-600);
  --text-strong: var(--ink-900);
  --text-inverse: var(--bone-50);
  --accent: var(--wine-700);
  --accent-fill: var(--wine-700);
  --accent-text: var(--wine-700);
  --focus: var(--wine-700);
  --danger: var(--wine-700);
  color-scheme: light;
}

.sheet--coal {
  --bg: var(--stone-900);
  --surface-1: var(--stone-850);
  --surface-2: var(--stone-800);
  --surface-3: var(--stone-700);
}

.sheet--wine {
  --bg: var(--wine-900);
  --surface-1: oklch(26% 0.085 18);
  --surface-2: oklch(30% 0.095 18);
  --surface-3: oklch(34% 0.100 18);
  --line: oklch(40% 0.090 18);
  --line-strong: oklch(55% 0.080 20);
  --text: oklch(90% 0.020 20);
  --text-muted: oklch(78% 0.040 20);
  --text-strong: var(--bone-50);
  --accent: var(--bone-50);
  --accent-fill: var(--bone-50);
  --accent-text: var(--bone-50);
  --on-accent: var(--wine-900);
  --focus: var(--bone-50);
}
