/* LifePlusWisdom design tokens — "Modern Illustrated Editorial".
   Single source of truth for colour, type, space and motion. Every stylesheet
   (site, ritual, journal, watch, play) reads these; do not hard-code colours elsewhere.
   Text/background pairs below meet WCAG AA (4.5:1) unless marked "decorative". */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* Surfaces */
  --paper: #FBF7EF;        /* page */
  --paper-2: #F3ECDD;      /* alternate band */
  --surface: #FFFFFF;      /* raised panel */
  --line: #DDD3C0;         /* hairlines, borders (decorative) */
  --line-strong: #8A7F6C;  /* form-control borders (3:1 on paper) */

  /* Ink */
  --ink: #23201C;          /* body text */
  --ink-2: #5A534A;        /* secondary text */
  --ink-inverse: #FBF7EF;

  /* Brand */
  --terracotta: #A8492A;   /* links, primary accent */
  --terracotta-strong: #8C3A1F; /* hover */
  --moss: #4A6636;         /* success, "practice" accent */
  --forest: #2C4631;       /* primary button background */
  --gold: #C9973F;         /* decorative only: rules, illustration */
  --sky: #DCE6E4;          /* illustration wash, decorative */

  /* Pillar accents for Watch/Play (text-safe on paper) */
  --pillar-mind: #6B4A8C;
  --pillar-money: #2F6B4F;
  --pillar-science: #1F5F8B;
  --pillar-story: #A8492A;
  --pillar-body: #9A3B52;
  --pillar-nature: #4A6636;

  /* Feedback */
  --ok: #2F6B3A;
  --ok-bg: #E6F0E2;
  --warn: #8A5A00;
  --warn-bg: #FBF0D6;
  --danger: #A32A2A;
  --danger-bg: #F8E3E0;
  --focus: #1F5FBF;

  --shadow-1: 0 1px 2px rgba(35, 32, 28, .06), 0 4px 14px rgba(35, 32, 28, .05);
}

[data-theme="dark"] {
  color-scheme: dark;

  --paper: #14171A;
  --paper-2: #1B2024;
  --surface: #20262B;
  --line: #343B41;
  --line-strong: #7C858C;

  --ink: #EFE9DD;
  --ink-2: #B9B1A3;
  --ink-inverse: #14171A;

  --terracotta: #EBA283;
  --terracotta-strong: #F4B89E;
  --moss: #A9C48E;
  --forest: #CFE0BD;       /* primary button background in dark; pair with --ink-inverse */
  --gold: #D9B36A;
  --sky: #24313A;

  --pillar-mind: #C4A8E0;
  --pillar-money: #8FCFAE;
  --pillar-science: #8FC4EA;
  --pillar-story: #EBA283;
  --pillar-body: #EE9FB2;
  --pillar-nature: #A9C48E;

  --ok: #9AD0A2;
  --ok-bg: #1E2F22;
  --warn: #E8C36A;
  --warn-bg: #33290F;
  --danger: #F1A19A;
  --danger-bg: #3A1D1B;
  --focus: #8DB8FF;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
}

:root {
  /* Type. Fonts are self-hosted (OFL); no third-party font requests. */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-indic: "Noto Serif Devanagari", "Noto Sans Devanagari", "Kohinoor Devanagari", "Mangal", serif;

  /* Modular scale 1.25, fluid at the top end */
  --text-xs: .8125rem;   /* 13px: captions, never for body */
  --text-sm: .9375rem;   /* 15px */
  --text-md: 1.0625rem;  /* 17px body */
  --text-lg: 1.25rem;
  --text-xl: 1.5625rem;
  --text-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  --leading-tight: 1.15;
  --leading-body: 1.65;
  --measure: 66ch;        /* long-form line length */

  /* Space: 4px base */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 7rem;

  --radius-1: 4px;
  --radius-2: 10px;
  --radius-pill: 999px;

  --page-max: 72rem;      /* outer grid */
  --page-pad: clamp(1rem, 4vw, 2.5rem);
  --tap: 44px;            /* minimum touch target */

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 480ms;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; }
}
