/*
 * UnoChat design tokens — shared by marketing site, admin panel and docs.
 * Two themes on one set of component styles: dark (default) and light.
 * Cyrillic note: Plus Jakarta Sans has no basic Cyrillic glyphs (Google's
 * own build only ships a "cyrillic-ext" subset covering historic ranges),
 * so the body stack falls back to the OS UI font for ru/pl/de text —
 * JetBrains Mono does carry full Cyrillic, so labels stay on-brand.
 */

@font-face {
  font-family: 'Plus Jakarta Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/assets/fonts/jakarta-cyrillic-ext.woff2') format('woff2-variations');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Plus Jakarta Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/assets/fonts/jakarta-latin-ext.woff2') format('woff2-variations');
  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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/assets/fonts/jakarta-latin.woff2') format('woff2-variations');
  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: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jbmono-cyrillic-ext.woff2') format('woff2-variations');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jbmono-cyrillic.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jbmono-latin-ext.woff2') format('woff2-variations');
  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-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/assets/fonts/jbmono-latin.woff2') format('woff2-variations');
  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: 'Orbitron Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url('/assets/fonts/orbitron-latin.woff2') format('woff2-variations');
}

:root {
  --font: 'Plus Jakarta Sans Variable', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --display: 'Orbitron Variable', var(--font);

  --max: 1240px;
  --pad-x: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(2.75rem, 5vw, 4.5rem);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --topbar-h: 72px;
  --ticker-h: 34px;
}

/* ---------------------------------------------------------------- dark --- */
:root,
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0b0e13;
  --bg-elev: #141922;
  --bg-panel: #1a2029;
  --bg-panel-hover: #202834;
  --line: rgba(148, 180, 190, 0.14);
  --line-strong: rgba(79, 216, 196, 0.32);
  --text: #e6f0f2;
  --muted: #8b9aa6;
  --accent: #4fd8c4;
  --accent-ink: #07100f;
  --accent-dim: rgba(79, 216, 196, 0.13);
  --accent-hover: #79e6d6;
  --signal: #ffb547;
  --signal-dim: rgba(255, 181, 71, 0.14);
  --danger: #f08a8a;
  --danger-dim: rgba(240, 138, 138, 0.14);
  --ok: #7ed4a5;
  --ok-dim: rgba(126, 212, 165, 0.14);
  --shadow-glow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --overlay: rgba(6, 8, 11, 0.72);
}

/* --------------------------------------------------------------- light --- */
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f7f8;
  --bg-elev: #ffffff;
  --bg-panel: #ffffff;
  --bg-panel-hover: #eef2f3;
  --line: rgba(20, 32, 38, 0.10);
  --line-strong: rgba(10, 107, 92, 0.30);
  --text: #131a1e;
  --muted: #5b6b72;
  /* Darker than brand teal/amber so text/buttons clear WCAG AA 4.5:1 on white. */
  --accent: #0a6b5c;
  --accent-ink: #ffffff;
  --accent-dim: rgba(10, 107, 92, 0.10);
  --accent-hover: #085a4e;
  --signal: #8f5608;
  --signal-dim: rgba(143, 86, 8, 0.10);
  --danger: #c0392b;
  --danger-dim: rgba(192, 57, 43, 0.09);
  --ok: #1e8e5a;
  --ok-dim: rgba(30, 142, 90, 0.10);
  --shadow-glow: 0 20px 44px rgba(20, 30, 34, 0.10);
  --overlay: rgba(20, 28, 32, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono {
  font-family: var(--mono);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
