/*
 * Оформление справки под бренд Lumen поверх стандартной темы Diplodoc.
 * Значения — те же, что в landing/src/styles/tokens.css (брендбук, разделы
 * 04 — цвет, 06 — типографика). Тема сборщика построена на переменных
 * Gravity UI (`--g-*`): перекрашиваем их, а не селекторы вёрстки.
 */

/* Шрифты лежат рядом: их кладёт scripts/fonts.mjs из @fontsource перед сборкой. */
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/inter-cyrillic-400-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/inter-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/inter-cyrillic-600-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/inter-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Manrope';
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/manrope-cyrillic-700-normal.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/manrope-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}

.g-root {
  --lumen-cyan: #17c9ce;
  --lumen-cyan-deep: #0e8a90;
  --lumen-midnight: #0b1622;
  --lumen-slate-500: #5b6873;
  --lumen-mist: #e7ecee;
  --lumen-cloud: #f4f7f8;

  --lumen-font-display: 'Manrope', system-ui, 'Segoe UI', sans-serif;
  --lumen-font-body: 'Inter', system-ui, 'Segoe UI', sans-serif;

  --g-font-family-sans: var(--lumen-font-body);
  --g-text-body-font-family: var(--lumen-font-body);
  --g-text-header-font-family: var(--lumen-font-display);
  --g-text-subheader-font-family: var(--lumen-font-display);
  --g-text-display-font-family: var(--lumen-font-display);
}

/* Светлая тема: на светлом акцент — глубокий циан, ради контраста текста. */
.g-root.g-root_theme_light {
  --g-color-text-primary: var(--lumen-midnight);
  --g-color-text-secondary: var(--lumen-slate-500);
  --g-color-text-link: var(--lumen-cyan-deep);
  --g-color-text-link-hover: var(--lumen-midnight);
  --g-color-text-brand: var(--lumen-cyan-deep);
  --g-color-base-brand: var(--lumen-cyan-deep);
  --g-color-base-brand-hover: var(--lumen-midnight);
  --g-color-line-brand: var(--lumen-cyan-deep);
  --g-color-base-selection: rgba(23, 201, 206, 0.14);
  --g-color-base-selection-hover: rgba(23, 201, 206, 0.22);
  --g-color-line-generic: var(--lumen-mist);
  --g-color-base-generic-ultralight: var(--lumen-cloud);
}

/* Тёмная тема: полночный фон, акцент — яркий циан. */
.g-root.g-root_theme_dark {
  --g-color-base-background: var(--lumen-midnight);
  --g-color-text-link: var(--lumen-cyan);
  --g-color-text-link-hover: #7fe7ea;
  --g-color-text-brand: var(--lumen-cyan);
  --g-color-base-brand: var(--lumen-cyan-deep);
  --g-color-line-brand: var(--lumen-cyan);
  --g-color-base-selection: rgba(23, 201, 206, 0.18);
}

/* Заголовки статьи и название справки в оглавлении — дисплейным шрифтом. */
.g-root .yfm h1,
.g-root .yfm h2,
.g-root .yfm h3,
.g-root .yfm h4,
.g-root .dc-doc-page-title,
.g-root .dc-toc__top-header {
  font-family: var(--lumen-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.g-root .yfm,
.g-root .dc-toc,
.g-root .dc-mini-toc {
  font-family: var(--lumen-font-body);
}

.g-root .yfm img {
  border-radius: 14px;
}
