/* ==========================================================================
   ZEREK · Threads design system — V16 palette (премиум-уголь + амбер)
   Dark by default. Monochrome with amber accent. Inter + Newsreader.
   Migrated 2026-05-04 (Кисa).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,500&display=swap');

:root {
  /* Background — премиум-уголь V16 (мягче чем чёрный) */
  --color-bg: #1A1A22;
  --color-bg-card: #22222C;
  --color-bg-elevated: #2C2C38;
  --color-bg-hover: #363644;
  --color-bg-wash: #1E1E26;

  /* Text */
  --color-text-primary: #F5F5F0;
  --color-text-secondary: #B5B5BC;
  --color-text-tertiary: #7A7A82;
  --color-text-inverse: #1A1A22;

  /* Border */
  --color-border: rgba(255,255,255,0.07);
  --color-border-light: rgba(255,255,255,0.04);

  /* Accent — V16 амбер (заменяет Threads-blue) */
  --color-accent: #E8A04C;
  --color-accent-hover: #F0823E;

  /* Semantic — V16 calibrated */
  --color-success: #5FB87C;
  --color-error:   #E85454;
  --color-warning: #E8C84C;
  --color-like:    #E85454;

  /* Button */
  --color-btn-primary-bg: #E8A04C;
  --color-btn-primary-text: #1A1A22;
  --color-btn-secondary-bg: transparent;
  --color-btn-secondary-border: rgba(255,255,255,0.07);

  /* Typography — Inter (тело) + Newsreader (заголовки) */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: 'Newsreader', Georgia, serif;
  --font-mono:    "JetBrains Mono", "SF Mono", "Roboto Mono", "Menlo", monospace;
  --font-xs:  11px;
  --font-sm:  13px;
  --font-base: 15px;
  --font-lg:  17px;
  --font-xl:  20px;
  --font-xxl: 24px;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  20px;
  --space-2xl: 24px;
  --space-3xl: 32px;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  color-scheme: dark;
}

/* ==========================================================================
   Reset / base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
* { transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-family);
  font-size: var(--font-base);
  line-height: 1.4;
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  color: var(--color-text-primary);
  letter-spacing: -0.3px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }

::selection {
  background: rgba(0, 149, 246, 0.3);
  color: var(--color-text-primary);
}

::-webkit-scrollbar { width: 0; height: 0; }

img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ==========================================================================
   Accessibility
   ========================================================================== */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
