/*
 * DESIGN TOKENS — the one file to edit for a visual rebrand.
 * All colours, fonts, radii and shadows used by site.css and the hero
 * illustration come from here. Light theme is primary; the dark block
 * below is a warm "night garden" palette used when the visitor's
 * system prefers dark.
 */
:root {
  color-scheme: light dark;

  /* Fonts — system stacks only (no Google-hosted assets; loads in mainland China). */
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans", sans-serif;
  --font-heading: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, serif;
  --font-heading-zh: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, Georgia, serif;

  /* Core palette (light) */
  --bg: #fbf7ec;            /* warm cream page */
  --bg-alt: #f2eedf;        /* alternating section */
  --surface: #fffdf6;       /* cards */
  --surface-soft: #edf2e8;  /* sage tint */
  --ink: #23392e;           /* main text — 11:1 on --bg */
  --muted: #53655a;         /* secondary text — ≥5.5:1 on --bg */
  --line: #dde3d3;
  --accent: #315340;        /* deep green buttons */
  --accent-hover: #224331;
  --on-accent: #fffaf0;
  --sage: #8aa68f;
  --autumn: #94501f;        /* warm eyebrow text — ≥5:1 on --bg */
  --autumn-soft: #f4e2c6;
  --candle: #f2b25c;
  --focus: #2f6b4c;
  --danger: #9b2c22;
  --success: #2c6143;
  --placeholder-border: #b9a98a;

  /* Shape & depth */
  --radius-sm: .6rem;
  --radius: 1.1rem;
  --radius-lg: 1.8rem;
  --shadow: 0 10px 34px rgb(29 54 37 / 10%), 0 2px 8px rgb(29 54 37 / 6%);
  --shadow-soft: 0 4px 18px rgb(29 54 37 / 8%);
  --content: 72rem;
  --reading: 40rem;

  /* Hero illustration (day) */
  --hero-sky-top: #f7e7c6;
  --hero-sky-bottom: #e3ecd8;
  --hero-orb: #fff3d6;
  --hero-orb-opacity: .9;
  --hero-rainbow-opacity: .32;
  --hero-star-opacity: 0;
  --hero-hill-far: #bfd2bb;
  --hero-hill-mid: #9fbf9a;
  --hero-hill-shade: rgb(35 70 45 / 12%);
  --hero-ground: #88ad84;
  --hero-ground-shade: rgb(35 70 45 / 14%);
  --hero-tree-green: #5f8f63;
  --hero-tree-deep: #3f6e4c;
  --hero-tree-autumn: #e1a83f;
  --hero-tree-autumn-2: #c9822e;
  --hero-trunk: #7a5a3f;
  --hero-stone: #ece4d3;
  --hero-stone-edge: #cfc4ad;
  --hero-memorial: #d9d2c3;
  --hero-memorial-top: #ebe6da;
  --hero-wax: #fbf3e2;
  --hero-brick: #b9614a;
  --hero-flower-pink: #f1a7b5;
  --hero-flower-white: #fff8ee;
  --hero-flower-yellow: #f4cf5d;
  --hero-dog: #fbf8f1;
  --hero-dog-shade: #e9e1d2;
  --hero-shadow: rgb(35 60 40 / 18%);
  --hero-lamp: #3f8f86;
  --hero-glow-opacity: .55;
  --hero-lamp-glow-opacity: 0;
}

:lang(zh) {
  --font-heading: var(--font-heading-zh);
}

/* Japanese and Korean get their own system fonts: Han characters are drawn differently per language, so a Chinese
   font listed first would show Japanese text with Chinese glyph shapes. */
:lang(ja) {
  --font-body: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", sans-serif;
  --font-heading: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Source Han Serif JP", serif;
}
:lang(ko) {
  --font-body: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-heading: AppleMyungjo, "Nanum Myeongjo", "Noto Serif KR", "Source Han Serif KR", Batang, serif;
}

/* Warm night-garden palette */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15241f;
    --bg-alt: #1b2d27;
    --surface: #213730;
    --surface-soft: #263f36;
    --ink: #f4ecdb;          /* 13:1 on --bg */
    --muted: #c9ccbb;        /* ≥9:1 on --bg */
    --line: #34503f;
    --accent: #eab874;       /* candlelight buttons */
    --accent-hover: #f4c98d;
    --on-accent: #1b2a22;
    --sage: #9cb89f;
    --autumn: #f0b77d;
    --autumn-soft: #3a3326;
    --candle: #f5bd67;
    --focus: #f3cf95;
    --danger: #ff9c8f;
    --success: #9fd8b0;
    --placeholder-border: #8a7d64;
    --shadow: 0 10px 34px rgb(0 0 0 / 30%), 0 2px 8px rgb(0 0 0 / 20%);
    --shadow-soft: 0 4px 18px rgb(0 0 0 / 25%);

    --hero-sky-top: #1d3540;
    --hero-sky-bottom: #2f4d4c;
    --hero-orb: #f3ead0;
    --hero-orb-opacity: .85;
    --hero-rainbow-opacity: 0;
    --hero-star-opacity: .85;
    --hero-hill-far: #2d4a45;
    --hero-hill-mid: #2a443a;
    --hero-hill-shade: rgb(0 0 0 / 16%);
    --hero-ground: #2f4a37;
    --hero-ground-shade: rgb(0 0 0 / 18%);
    --hero-tree-green: #3d6249;
    --hero-tree-deep: #2b4a37;
    --hero-tree-autumn: #a27a35;
    --hero-tree-autumn-2: #8a6029;
    --hero-trunk: #4c3a2b;
    --hero-stone: #8d8a7b;
    --hero-stone-edge: #6d6b5f;
    --hero-memorial: #7d796c;
    --hero-memorial-top: #8f8a7c;
    --hero-wax: #f3e6cb;
    --hero-brick: #7c4537;
    --hero-flower-pink: #b9808b;
    --hero-flower-white: #d8d2c4;
    --hero-flower-yellow: #c4a64f;
    --hero-dog: #ece6da;
    --hero-dog-shade: #cbc2b2;
    --hero-shadow: rgb(0 0 0 / 30%);
    --hero-lamp: #4aa296;
    --hero-glow-opacity: .9;
    --hero-lamp-glow-opacity: .7;
  }
}
