/* Hallmark · tokens · theme: custom · axes: light / roman-serif / warm (seal red) */

/* Newsreader (OFL) and IBM Plex Sans (OFL), self-hosted so the page renders the same inside and outside mainland China. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../../assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The latin subset has no dagger; this 1 KB face supplies † for co-corresponding marks. Must stay after the latin face. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../../assets/fonts/newsreader-dagger-opsz-normal.woff2") format("woff2");
  unicode-range: U+2020-2021;
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("../../assets/fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../../assets/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  /* Paper and ink — warm, tinted toward the seal-red anchor */
  --color-paper: oklch(97.4% 0.008 82);
  --color-paper-2: oklch(94.8% 0.011 80);
  --color-rule: oklch(87% 0.012 75);
  --color-rule-strong: oklch(78% 0.014 70);
  --color-muted: oklch(50% 0.014 60);
  --color-ink-2: oklch(36% 0.012 55);
  --color-ink: oklch(20% 0.012 50);

  /* One accent: seal red. Used for the top-rank mark, active filter, link hover, focus. */
  --color-accent: oklch(51% 0.17 31);
  --color-accent-deep: oklch(44% 0.15 31);
  --color-accent-ink: var(--color-paper);
  --color-focus: oklch(54% 0.2 31);
  --color-select: oklch(90% 0.045 45);

  /* Faces. CJK falls back to a Song face where one is installed, otherwise to the system Hei face. */
  --font-serif: "Newsreader", "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "PingFang SC", "Microsoft YaHei", serif;
  --font-sans: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;

  /* Type scale — five sizes, major third around a 17 px reading size */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.375rem, 1.2rem + 0.9vw, 1.625rem);
  --text-display: clamp(2.75rem, 2rem + 3.4vw, 4.5rem);

  --leading-tight: 1.04;
  --leading-snug: 1.3;
  --leading-body: 1.62;
  --leading-cjk: 1.85;

  --tracking-display: -0.022em;
  --tracking-label: 0.08em;

  /* 4-pt spacing scale */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 9rem;

  /* Document grid: a margin rail for dates and the portrait, a reading column for everything else */
  --rail: clamp(8rem, -2rem + 16vw, 13rem);
  --gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  --measure: 43rem;
  --page-gutter: clamp(1.25rem, 5vw, 3rem);

  --rule-hair: 1px solid var(--color-rule);
  --rule-strong: 1px solid var(--color-rule-strong);
  --radius-none: 0;

  /* Motion — micro only; the page itself does not move */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 200ms;

  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 200;
  --z-toast: 500;
}
