/* Shintenberg — ink, paper and one gold. Colours are chosen by role; pages never use raw hex.
   The source of these tokens is design/ota/tokens.css; the @font-face rules are in globals.css. */
:root {
  /* Surfaces */
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f3f0e8;
  --surface-3: #e9e5d9;
  --ink-panel: #16150f;
  --ink-panel-fg: #f6f3e8;
  --ink-panel-muted: #b3ae9c;
  --ink-panel-border: #37352a;

  /* Text */
  --fg: #16150f;
  --fg-2: #3a382f;
  --muted: #666356;

  /* Lines */
  --border: #e3dfd3;
  --border-strong: #c8c3b3;
  --control-border: #8b8676;

  /* The one accent: gold. Text on it is always ink. */
  --accent: #ffc928;
  --accent-hover: #f5ba0c;
  --accent-active: #e3aa00;
  --accent-on: #16150f;
  --accent-soft: #fff3c7;
  --accent-soft-fg: #5c4300;
  --accent-line: #b78a00;

  /* States. Always paired with text, never colour alone. */
  --success: #1c6a45;
  --success-soft: #e3f3ea;
  --warn: #8a4a00;
  --warn-soft: #fdead2;
  --danger: #b02a21;
  --danger-soft: #fbe7e4;

  /* Type */
  --font-display: "Space Grotesk", "Shintenberg Sans TC", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-body: "Shintenberg Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Space Grotesk", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 18px;
  --text-lg: 22px;
  --text-xl: 28px;
  --text-2xl: 40px;
  --text-3xl: 56px;
  --text-4xl: 76px;
  --leading-body: 1.7;
  --leading-tight: 1.14;

  /* Space, 4px base */
  --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;
  --space-24: 96px;
  --container-max: 1200px;
  --gutter: clamp(20px, 4vw, 40px);

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;
  --elev-1: 0 1px 2px rgb(22 21 15 / 6%), 0 0 0 1px var(--border);
  --elev-2: 0 10px 30px -12px rgb(22 21 15 / 18%), 0 0 0 1px var(--border);
  --elev-3: 0 28px 60px -24px rgb(22 21 15 / 30%), 0 0 0 1px var(--border);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg);

  /* Motion: state feedback only. */
  --motion-fast: 120ms;
  --motion-base: 200ms;
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  color-scheme: light;
}

:lang(en) { --leading-body: 1.6; }
:lang(ja) {
  --font-display: "Space Grotesk", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --leading-body: 1.8;
  line-break: strict;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11100c;
    --surface: #1a1913;
    --surface-2: #22201a;
    --surface-3: #2c2a21;
    --ink-panel: #1f1e17;
    --ink-panel-fg: #f6f3e8;
    --ink-panel-muted: #b3ae9c;
    --ink-panel-border: #3a382c;
    --fg: #f6f3e8;
    --fg-2: #d6d2c3;
    --muted: #a6a18f;
    --border: #322f25;
    --border-strong: #4a4738;
    --control-border: #8b8676;
    --accent: #ffc928;
    --accent-hover: #ffd657;
    --accent-active: #ffe07f;
    --accent-on: #16150f;
    --accent-soft: #3a2f0a;
    --accent-soft-fg: #ffe08a;
    --accent-line: #ffc928;
    --success: #7fd3a8;
    --success-soft: #14301f;
    --warn: #ffc27a;
    --warn-soft: #3a2710;
    --danger: #ff9f95;
    --danger-soft: #401b17;
    --elev-1: 0 0 0 1px var(--border);
    --elev-2: 0 10px 30px -12px rgb(0 0 0 / 60%), 0 0 0 1px var(--border);
    --elev-3: 0 28px 60px -24px rgb(0 0 0 / 70%), 0 0 0 1px var(--border-strong);
    color-scheme: dark;
  }
}
