/* Nuri: "Hanji" design tokens, copied from design/prototype/css/tokens.css.
   Source of truth: CORE DOCS/design-philosophy.md §4 to §7. Keep the two files in step. */

:root {
  /* §4.1 Paper & ink */
  --paper-0: #FEFEF4;
  --paper-1: #FFFFFB;
  --paper-2: #F6F3E7;
  --ink-900: #4D2721;
  --ink-700: #6E5550;
  --ink-500: #8D7E7A;   /* 3.8:1 on paper: icons, placeholders, large text only. Small text uses ink-700. */
  --ink-300: #B6A7A2;
  --line: #E6DDD6;
  --line-strong: #CCC0BA;

  /* §4.2 Blush (primary) and §4.3 apricot (secondary) */
  --blush-500: #FEC1BB;
  --blush-600: #F4A09A; /* pressed state only: 2.0:1 on paper, never text */
  --blush-soft: #FDEEEC;
  --on-blush: #4D2721;
  --apricot-500: #FDD4AB;
  --apricot-soft: #FEF4E8;

  /* §4.4 The Theatre */
  --theatre: #1A1210;
  --theatre-scrim: rgb(26 18 16 / 0.55);
  --theatre-text: #FFFFFF;
  --theatre-blush: #FFB3AC;
  --theatre-2: #261B18;          /* NEW: raised surface inside the Theatre */
  --theatre-dim: rgb(255 255 255 / 0.62);  /* NEW: secondary text in the Theatre (7.4:1) */
  --theatre-faint: rgb(255 255 255 / 0.38);

  /* §4.6 Semantic */
  --success: #5A8A63;
  --success-soft: #E9F0E7;
  --warning: #C79043;
  --warning-soft: #FBF0DF;
  --danger: #B5564B;      /* destructive actions only */
  --danger-soft: #F7E4E0;

  /* §6 Radii, space, stroke, shadow */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;
  --gutter: 20px;
  --stroke: 2px;
  --border: 1.5px;
  --shadow-lift: 0 4px 16px rgb(77 39 33 / 0.06);

  /* §5 Type. SF Pro Rounded for Latin (ui-rounded in Safari; Nunito stands in elsewhere),
     Pretendard for hangul. Latin faces come first and carry no hangul, so hangul falls through
     to Pretendard in the same run: the §5 mixed-script rule, done by the font stack. */
  --font-latin: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  --font-ko: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-ui: ui-rounded, "SF Pro Rounded", "Nunito", "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-system: -apple-system, "SF Pro Text", system-ui, sans-serif; /* iOS system chrome only */

  /* §7 Motion. Springs live in JS (core.js: SPRING). These are the CSS curves for non-gesture motion. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  color-scheme: light;
}

/* §4.5 Paper, dark variant: warm brown-black, never blue-black. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper-0: #1C1512;
    --paper-1: #261D19;
    --paper-2: #160F0D;
    --ink-900: #F7EFEA;
    --ink-700: #CDBCB6;
    --ink-500: #A2918B;     /* NEW dark value, 5.9:1 */
    --ink-300: #6A5A55;     /* NEW */
    --line: #3A2D28;
    --line-strong: #52423C; /* NEW */
    --blush-soft: #3B2523;  /* NEW */
    --apricot-soft: #392A1E;/* NEW */
    --success-soft: #1F2B21;
    --warning-soft: #33281A;
    --danger-soft: #3A211D;
    --shadow-lift: 0 4px 16px rgb(0 0 0 / 0.28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper-0: #1C1512;
  --paper-1: #261D19;
  --paper-2: #160F0D;
  --ink-900: #F7EFEA;
  --ink-700: #CDBCB6;
  --ink-500: #A2918B;
  --ink-300: #6A5A55;
  --line: #3A2D28;
  --line-strong: #52423C;
  --blush-soft: #3B2523;
  --apricot-soft: #392A1E;
  --success-soft: #1F2B21;
  --warning-soft: #33281A;
  --danger-soft: #3A211D;
  --shadow-lift: 0 4px 16px rgb(0 0 0 / 0.28);
  color-scheme: dark;
}

