/* Design tokens: every colour, typeface, type size and spacing value the page shares lives here.
   Two type families only, both with Japanese support and self-hosted (fonts/, subset to the glyphs the page uses):
     Shippori Mincho B1  the display face: chapter titles, names, KASANE, and every story line
     Zen Kaku Gothic New the UI face: body copy, labels, buttons */

@font-face {
  font-family: "Shippori Mincho B1";
  src: url("../fonts/shippori-mincho-b1-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Shippori Mincho B1";
  src: url("../fonts/shippori-mincho-b1-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("../fonts/zen-kaku-gothic-new-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("../fonts/zen-kaku-gothic-new-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("../fonts/zen-kaku-gothic-new-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Colour: vermilion is the red sun and the torii lacquer, jade belongs to the relics */
  --ink: #0f130e; /* page background, text on the ivory sheet */
  --paper: #ebe5d3; /* main text, the ivory arts sheet: washi, not white */
  --shu: #d9442f; /* vermilion: the sun, the accent word in each title, the primary button */
  --shu-deep: #a3301f; /* the lacquer's shadow */
  --shu-light: #ec6b52;
  --jade: #b7cf9b; /* relics, focus rings */
  --gold: #d9be86; /* the thin frame line on lacquer */
  --muted: #a6a693; /* secondary text */
  --line: rgba(235, 229, 211, 0.18); /* hairlines */

  /* Chapter surfaces, in scroll order */
  --surface-passage: #203931; /* behind the 3D forest while it loads */
  --surface-hero: #13170f;
  --surface-world: #1d2019;
  --surface-revenants: #11150f;
  --surface-districts: #141812;
  --surface-shrine: #091511; /* the closing chapter, which also holds the colophon */

  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-ui: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;

  /* The type scale. Every font-size on the page is one of these. */
  --text-label: 12px; /* labels and buttons: UI face, uppercase, tracked */
  --text-small: 13px; /* captions and fine print */
  --text-body: 15px; /* body copy */
  --text-lead: clamp(18px, 1.45vw, 22px); /* short story lines: aliases, quotes */
  --text-line: clamp(24px, 2.25vw, 34px); /* medium story lines */
  --text-story: clamp(30px, 3.3vw, 54px); /* the big story lines: hero, passage, the beat */
  --text-title: clamp(38px, 6vw, 100px); /* chapter titles */
  --text-name: clamp(56px, 8.4vw, 120px); /* character names: SHION, the widest, still fits the record column */
  --text-hero: 17.6vw; /* the KASANE word */
  --text-glyph: clamp(300px, 44vw, 680px); /* the giant kanji drawn behind a character or the seal */

  --tracking-label: 0.14em;
  --tracking-title: 0.005em;

  /* Space */
  --pad: clamp(22px, 4.5vw, 80px); /* the page's side margin */
  --chrome-top: 26px; /* where the brand and the bell sit */
}

@media (max-width: 760px) {
  :root {
    --text-label: 11px;
    --text-small: 12px;
    --text-body: 14px;
    --pad: 22px;
    --chrome-top: 18px;
  }
}
