/* ============================================================
   BASE.CSS — переменные, reset, типографика
   ============================================================ */

/* ----- CSS-переменные (тема) ----- */
:root {
  /* Цвета — фон */
  --bg-main: #0d0d11;
  --bg-header: #13131a;
  --bg-card: #1a1a24;
  --bg-card-2: #181820;
  --bg-footer: #09090d;
  --bg-input: #1b1b24;

  /* Цвета — текст */
  --text-main: #ffffff;
  --text-muted: #b0b0b8;
  --text-dim: #6b6b75;
  --text-faint: #4a4a52;

  /* Цвета — акценты */
  --accent-cyan: #00e5ff;
  --accent-indigo: #6366f1;
  --accent-orange: #f65e1d;
  --accent-blue: #3b82f6;
  --accent-purple: #a855f7;
  --accent-green: #25d366;
  --accent-telegram: #0088cc;
  --accent-pink: #ec4899;
  --accent-amber: #fbbf24;
  --accent-red: #ef4444;
  --accent-teal: #14b8a6;
  --accent-deep-orange: #f97316;
  --accent-deep-purple: #8b5cf6;

  /* Границы */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);

  /* Радиусы */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Тени */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.6);

  /* Переходы */
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Шрифты */
  --font-main:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono:
    "SF Mono", "Monaco", "Inconsolata", "Fira Code", "Courier New", monospace;

  /* Размеры контейнера */
  --container-max: 1280px;
  --container-pad: 24px;

  /* Шапка / футер */
  --header-h: 70px;
  --footer-h: 60px;
}

/* ----- Reset ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ----- Типографика ----- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
}
h2 {
  font-size: clamp(22px, 3vw, 32px);
}
h3 {
  font-size: clamp(18px, 2.5vw, 24px);
}
h4 {
  font-size: clamp(16px, 2vw, 20px);
}

p {
  color: var(--text-muted);
}

/* ----- Скроллбар (Webkit) ----- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #2a2a34;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a44;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #2a2a34 var(--bg-main);
}

/* ----- Утилиты ----- */
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}

/* ----- Уважение к настройкам пользователя ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
