/* =============================================================================
   Дизайн-токены — извлечены 1:1 из dev/css/main.css клиента (shop-stream).
   Без Tailwind-сборки: только их CSS-переменные, шрифт и фоновый паттерн.
   ============================================================================= */
@import './suisse.css';

:root {
  --font-sans: "Suisse Int'l", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-sm: 14px;
  --text-base: 16px;
  --text-md: 18px;
  --text-lg: 24px;
  --text-xl: 32px;
  --text-2xl: 48px;

  /* светлая тема */
  --bg: hsl(0, 0%, 93%);
  --bg-light: hsl(0, 0%, 96%);
  --pattern: hsl(210, 9%, 91%);
  --pattern-stroke: #ffffff;
  --accent: hsl(210, 89%, 62%);
  --contrast: hsl(0, 0%, 100%);
  --border: hsl(210, 9%, 91%);

  --text-primary: hsl(0, 0%, 8%);
  --text-secondary: hsl(207, 9%, 44%);
  --text-tertiary: hsl(204, 13%, 79%);
  --text-on-accent: #ffffff;

  /* статусы */
  --status-yellow: hsl(43, 81%, 69%);
  --status-blue: hsl(221, 88%, 82%);
  --status-gray: hsl(208, 19%, 80%);
  --status-green: hsl(145, 44%, 64%);
  --status-red: hsl(1, 68%, 68%);
  --status-dark-gray: hsla(208, 7%, 44%, 1);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-xl: 8px;
  --radius-full: 9999px;
}

html.dark {
  --bg: hsl(0, 0%, 6%);
  --bg-light: hsl(0, 0%, 11%);
  --pattern: hsl(0, 0%, 11%);
  --pattern-stroke: #1c1c1c;
  --accent: hsl(210, 89%, 62%);
  --contrast: hsl(0, 0%, 11%);
  --border: hsl(0, 0%, 45%);

  --text-primary: hsl(0, 1%, 93%);
  --text-secondary: hsl(2, 2%, 45%);
  --text-tertiary: hsl(0, 0%, 31%);
  --text-on-accent: #101010;
}

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

html {
  font-family: var(--font-sans);
  line-height: 1.5;
  font-weight: 400;
  color-scheme: light dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  background-color: var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  color: var(--text-primary);
  background-color: var(--bg);
  font-family: var(--font-sans);
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* Фоновый паттерн клиента (тот же Pattern.svg с их сайта).
   На их сайте он подключён как CSS mask + background-color, но внешний SVG-mask
   блокируется Chromium при открытии страницы локально (file://) → паттерн пропадал.
   В макете рисуем тот же SVG как background-image (его линии — белые), а цвет под
   тему задаём фильтром: на свету инвертируем в тёмные линии, в тёмной теме — белые.
   При деплое под http(s) можно вернуться к их mask-схеме 1:1. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url('../images/Pattern.svg');
  background-size: 100vw auto;
  background-repeat: repeat-y;
  background-position: top center;
  filter: invert(1);   /* белые линии → тёмные (для светлой темы) */
  opacity: 0.10;
}
html.dark body::before {
  filter: none;        /* белые линии как есть (для тёмной темы) */
  opacity: 0.08;
}

::selection {
  background-color: hsl(210, 89%, 85%);
  color: hsl(210, 89%, 20%);
}
html.dark ::selection {
  background-color: hsl(210, 40%, 25%);
  color: hsl(210, 80%, 90%);
}

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