/* Токены дизайна. В компонентах используются только они: цвета, шрифты, отступы, радиусы, тени.
   Тёмная тема: по системной настройке и вручную через data-theme на <html>. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/onest-latin.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: "Onest";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* Цвета: светлая тема */
  --c-bg: #f6f8fc;
  --c-surface: #ffffff;
  --c-surface-2: #eaeff8;
  --c-ink: #14203a;
  --c-ink-2: #4a5878;
  --c-line: #dbe2ef;
  --c-line-strong: #6b7a99;
  --c-accent: #2563eb;
  --c-accent-hover: #1d4ed8;
  --c-on-accent: #ffffff;
  --c-accent-soft: #e3ebfd;
  --c-accent-ink: #1e40af;
  --c-pay: #ff9478;
  --c-on-pay: #3a1308;
  --c-danger: #b42318;
  --c-danger-soft: #fde8e5;
  --c-focus: #2563eb;
  --c-brand: #1b3a9c;
  --c-brand-2: #2c58d6;
  --c-on-brand: #ffffff;
  --c-on-brand-2: #d3e0ff;
  --c-scrim: rgb(15 23 42 / 0.55);
  --shadow-card: 0 1px 2px rgb(20 32 58 / 0.06), 0 10px 28px -14px rgb(20 32 58 / 0.2);
  --shadow-lift: 0 2px 4px rgb(20 32 58 / 0.08), 0 18px 36px -16px rgb(20 32 58 / 0.28);

  /* Шрифты */
  --font-sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-heavy: 800;

  /* Шкала текста */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  --fs-3xl: clamp(2rem, 1.35rem + 3vw, 3.5rem);
  --lh-tight: 1.15;
  --lh-snug: 1.3;
  --lh-body: 1.55;

  /* Отступы */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Форма: карточки, поля и кнопки одного радиуса, значки и чипы таблеткой */
  --r-card: 1rem;
  --r-ctl: 0.75rem;
  --r-lg: 1.5rem;
  --r-pill: 999px;

  /* Размеры */
  --w-page: 80rem;
  --w-prose: 42rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --tap: 3rem;
  --tap-min: 2.75rem;
  --header-h: 4rem;
  --w-aside: 21rem;
  --w-filters: 17.5rem;

  /* Слои */
  --z-sticky: 20;
  --z-menu: 25;
  --z-bar: 30;
  --z-drawer: 40;
  --z-skip: 50;

  /* Движение */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --c-bg: #0f172a;
    --c-surface: #111c33;
    --c-surface-2: #1a2744;
    --c-ink: #e2e8f4;
    --c-ink-2: #a3b1cc;
    --c-line: #24324f;
    --c-line-strong: #6a7ca0;
    --c-accent: #5b8def;
    --c-accent-hover: #7ba3f5;
    --c-on-accent: #071433;
    --c-accent-soft: #1b2f5c;
    --c-accent-ink: #a9c3ff;
    --c-pay: #ff9a7d;
    --c-on-pay: #2b0f06;
    --c-danger: #ff8d80;
    --c-danger-soft: #3b1b18;
    --c-focus: #7ba3f5;
    --c-brand: #1a2c63;
    --c-brand-2: #25397c;
    --c-on-brand: #eef3ff;
    --c-on-brand-2: #b7c8f0;
    --c-scrim: rgb(2 6 23 / 0.66);
    --shadow-card: 0 0 0 1px rgb(255 255 255 / 0.03), 0 14px 30px -16px rgb(2 6 23 / 0.7);
    --shadow-lift: 0 0 0 1px rgb(255 255 255 / 0.05), 0 22px 40px -18px rgb(2 6 23 / 0.8);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0f172a;
  --c-surface: #111c33;
  --c-surface-2: #1a2744;
  --c-ink: #e2e8f4;
  --c-ink-2: #a3b1cc;
  --c-line: #24324f;
  --c-line-strong: #6a7ca0;
  --c-accent: #5b8def;
  --c-accent-hover: #7ba3f5;
  --c-on-accent: #071433;
  --c-accent-soft: #1b2f5c;
  --c-accent-ink: #a9c3ff;
  --c-pay: #ff9a7d;
  --c-on-pay: #2b0f06;
  --c-danger: #ff8d80;
  --c-danger-soft: #3b1b18;
  --c-focus: #7ba3f5;
  --c-brand: #1a2c63;
  --c-brand-2: #25397c;
  --c-on-brand: #eef3ff;
  --c-on-brand-2: #b7c8f0;
  --c-scrim: rgb(2 6 23 / 0.66);
  --shadow-card: 0 0 0 1px rgb(255 255 255 / 0.03), 0 14px 30px -16px rgb(2 6 23 / 0.7);
  --shadow-lift: 0 0 0 1px rgb(255 255 255 / 0.05), 0 22px 40px -18px rgb(2 6 23 / 0.8);
}
