/* ==========================================================================
   tokens.css — dé Fabrics "Bento Editorial" design tokens (public site).
   Light theme only. Load after /fonts/fonts.css and before components.css.
   Source: _build/defabrics/reference/b2-editorial/style.css (BUILD-PLAN §3).
   Page stylesheets (public/stylesheets/pages/*.css) use these tokens only:
   no new colours, no new font stacks.
   The admin panel keeps its own tokens in admin-tokens.css.
   ========================================================================== */

:root {
  /* Surfaces */
  --paper: #f7f6f2;        /* page background */
  --tile: #ffffff;         /* default tile */
  --stone: #efede7;        /* stone tile */
  --celadon: #e6eeec;      /* celadon tile */
  --photo-bg: #e2e1dc;     /* behind photos while they load */

  /* Ink and text */
  --ink: #142022;
  --ink-2: #1d2b2d;        /* panels inside ink tiles */
  --text: #142022;
  --muted: #5a6461;        /* secondary text, 5.6:1 on paper */
  --on-ink: #eef2f0;
  --on-ink-muted: #a7b6b3;
  --on-teal: #dbeceb;      /* body text on teal tiles */
  --on-teal-em: #cfe7e8;   /* italic emphasis on teal tiles */

  /* Brand */
  --teal: #327179;
  --teal-deep: #24585f;
  --teal-soft: #9fd0d4;    /* teal on dark backgrounds */
  --vermilion: #c23b22;    /* Chinese signals only (seal, 中国制造, 春节) */

  /* Status (forms, notices) */
  --error: #b3261e;
  --error-bg: #fbeceb;
  --ok: #2c6e49;
  --ok-bg: #e8f3ec;

  /* Lines */
  --line: rgba(20, 32, 34, .1);
  --line-2: rgba(20, 32, 34, .16);
  --line-on-ink: rgba(255, 255, 255, .12);

  /* Shape and rhythm */
  --r: 22px;               /* tiles */
  --r-sm: 14px;            /* images inside tiles, inner panels */
  --r-xs: 10px;            /* menu items, small controls */
  --r-pill: 999px;
  --gap: 16px;             /* bento gap */
  --pad: clamp(22px, 2.6vw, 44px);   /* tile padding */
  --wrap: 1376px;          /* content width */
  --side: clamp(16px, 2.4vw, 32px);  /* page gutter */
  --sec: clamp(88px, 10vw, 160px);   /* space between sections */

  /* Shadows */
  --shadow-bar: 0 0 0 1px var(--line), 0 12px 32px -22px rgba(20, 32, 34, .3);
  --shadow-pop: 0 0 0 1px var(--line), 0 18px 40px -16px rgba(20, 32, 34, .3);
  --shadow-dock: 0 18px 40px -16px rgba(20, 32, 34, .55);
  --shadow-btn: 0 6px 18px -10px rgba(20, 32, 34, .4);

  /* Motion */
  --ease-photo: cubic-bezier(.2, .7, .2, 1);
  --t: .2s;

  /* Type */
  --serif: "Newsreader", "Newsreader Fallback", "Iowan Old Style", Georgia, serif;
  --ui: "Mona Sans", "Onest", "Onest Fallback", system-ui, sans-serif;
  --body: "Onest", "Onest Fallback", system-ui, sans-serif;
  --zh: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --zh-serif: "Noto Serif SC", "Songti SC", "STSong", serif;

  /* Layers */
  --z-dock: 30;
  --z-mnav: 35;
  --z-header: 40;
  --z-consent: 50;
  --z-skip: 60;
}

@media (max-width: 759px) {
  :root { --r: 18px; --gap: 12px; }
}
/* Large headlines: the wide metric fallback (Newsreader's optical size is
   wider at display sizes), so the headline keeps its line breaks while the
   web font loads (Q3-04) */
@media (min-width: 1100px) {
  :root { --serif: "Newsreader", "Newsreader Fallback Wide", "Iowan Old Style", Georgia, serif; }
}

/* Chinese pages: the full Noto Sans SC (fonts-zh.css) before the subset */
:root:lang(zh-Hans) {
  --zh: "Noto Sans SC Full", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "Onest", "Onest Fallback", "Noto Sans SC Full", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ui: "Mona Sans", "Onest", "Onest Fallback", "Noto Sans SC Full", "PingFang SC", system-ui, sans-serif;
  --serif: "Newsreader", "Newsreader Fallback", "Noto Sans SC Full", "PingFang SC", Georgia, serif;
}
/* Korean pages: no Korean web font is shipped — system fonts after the Latin ones */
:root:lang(ko) {
  --body: "Onest", "Onest Fallback", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --ui: "Mona Sans", "Onest", "Onest Fallback", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --serif: "Newsreader", "Newsreader Fallback", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Serif KR", Georgia, serif;
}
