/* The Human Need — Design tokens (source of truth: design-system/the-human-need/MASTER.md)
   Loaded globally so every page and shared component (header, Instagram panel,
   footer) resolves the same variables. Previously --sage/--thai/--line lived only
   in home.css, which left other routes without them. */

:root {
  /* Color — warm paper brand */
  --paper: #fbf6ef;
  --paper-raised: #f7f0e6;
  --paper-sunk: #f3eee5;
  --ink: #1e1b17;
  --ink-muted: #6b6257;
  --line: rgb(229 221 210 / 0.87);
  --sage: #657047;
  --on-sage: #fffdf8;
  --clay: #9d7654;
  --clay-ink: #856043;
  --terracotta: #e0918d;
  --tan: #d9bb95;

  /* Legacy aliases kept so existing rules using --stone/--dark-stone/--button/--sage keep working */
  --stone: #c9c9c2;
  --dark-stone: #b7b7af;
  --button: var(--tan);

  /* Type families
     Lora has no Thai glyphs, so "Noto Sans Thai" (loop-less) follows it in the
     display stack: Latin headings stay Lora, Thai headings get the loop-less
     Thai face instead of the browser's looped system serif. --serif and
     --script alias this, so every serif/script heading inherits the fix. */
  --font-display: "Lora", "Noto Sans Thai", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-thai: "Noto Sans Thai", sans-serif;
  --font-brand: "Comfortaa", var(--font-sans);

  /* Legacy type aliases (home.css/story.css/stories.css reference these) */
  --serif: var(--font-display);
  --thai: var(--font-thai);
  --impodi: var(--font-brand);
  --script: var(--font-display); /* Caveat removed; falls back to display serif */

  /* Type scale — 13px floor */
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-display: clamp(2.75rem, 5vw, 4rem);

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Spacing — 8px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur: 240ms;
  --dur-slow: 550ms;

  /* Layout */
  --max: 998px;
  --gutter: 42px;
}

@media (max-width: 767px) {
  :root { --gutter: 20px; }
}
