/* Три голоса: Science Gothic — модель и заголовки, Source Serif 4 — рассказ, Geist Mono — числа и байты.
   Geist остаётся только на колпачках в 3D. */

/* ---- шрифты: локальные сабсеты, кириллица проверена ---- */
@font-face { font-family: "Source Serif 4"; src: url(assets/fonts/source-serif-4-400-600-latin.woff2) format("woff2");
  font-weight: 200 900; font-display: swap;
  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: "Source Serif 4"; src: url(assets/fonts/source-serif-4-400-600-cyrillic.woff2) format("woff2");
  font-weight: 200 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Science Gothic"; src: url(assets/fonts/science-gothic-latin.woff2) format("woff2");
  font-weight: 100 900; font-stretch: 50% 200%; font-display: swap;
  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: "Science Gothic"; src: url(assets/fonts/science-gothic-cyrillic.woff2) format("woff2");
  font-weight: 100 900; font-stretch: 50% 200%; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; src: url(assets/fonts/geist-latin.woff2) format("woff2");
  font-weight: 100 900; font-display: swap;
  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: "Geist"; src: url(assets/fonts/geist-cyrillic.woff2) format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; src: url(assets/fonts/geist-mono-latin.woff2) format("woff2");
  font-weight: 100 900; font-display: swap;
  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: "Geist Mono"; src: url(assets/fonts/geist-mono-cyrillic.woff2) format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  /* бумага и чернила: графит с едва заметным уклоном к зелёному свету */
  --color-paper:   oklch(14% 0.006 165);
  --color-paper-2: oklch(17.5% 0.007 165);
  --color-paper-3: oklch(22% 0.008 165);
  --color-ink:     oklch(94% 0.008 165);
  --color-ink-2:   oklch(82% 0.010 165);
  --color-muted:   oklch(66% 0.012 165);
  --color-rule:    oklch(30% 0.010 165);
  --color-rule-2:  oklch(24% 0.009 165);
  --color-focus:   oklch(94% 0.008 165);

  /* свет клавиатуры: candle.cjs, FAMILY на отметке 0.5. Это данные, не декор */
  --led-1: oklch(78.6% 0.205 150.3);
  --led-2: oklch(72.5% 0.161 63.2);
  --led-3: oklch(64.2% 0.147 240);

  --font-display: "Science Gothic", "Geist", system-ui, sans-serif;
  --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* 4pt */
  --space-3xs: 4px;
  --space-2xs: 8px;
  --space-xs:  12px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  32px;
  --space-xl:  48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* шкала 1.333 для интерфейса стенда */
  --text-xs:   13px;
  --text-sm:   15px;
  --text-md:   17px;
  --text-lg:   22px;
  --text-xl:   30px;
  --text-2xl:  40px;
  --text-3xl:  53px;

  --radius-sm: 4px;
  --radius-md: 6px;

  --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-press:   60ms;
  --dur-release: 120ms;
  --dur-led-on:  160ms;
  --dur-led-off: 110ms;
  --dur-short:   150ms;
  --dur-type:    30ms;

  --rule-hair: 1px;
}

/* Шрифт уверенности: у каждой буквы --t = p^0.4 (та же кривая, что яркость клавиши в candle.cjs).
   Ширина 50→200, вес 100→900: уверенная буква широкая и тяжёлая, неожиданная — узкая и тонкая. */
.cf { font-family: var(--font-display); font-kerning: none; }
.cf > .g {
  font-stretch: calc(50% + var(--t, 0.5) * 150%);
  font-weight: calc(100 + var(--t, 0.5) * 800);
}
.cf > .g.nobet { font-stretch: 100%; font-weight: 100; color: var(--color-muted); }
.cf > .g.sp { display: inline-block; width: calc(0.18em + var(--t, 0.5) * 0.32em); }
