/* ==========================================================================
   MAIN.CSS
   Точка входа. Порядок импорта = порядок каскада Atomic Design:
   variables -> reset -> atoms -> molecules -> organisms -> templates
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

@import 'variables.css';
@import 'atoms.css';
@import 'molecules.css';
@import 'organisms.css';
@import 'templates.css';

/* — Reset —————————————————————————————————————————————— */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-secondary);
  background: var(--color-bg-main);
  color: var(--color-text-main);
  line-height: var(--lh-body);
  min-height: 100svh;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul[class], ol[class] { list-style: none; padding: 0; }

/* Видимый фокус для клавиатурной навигации — сохраняется везде */
:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 2px;
}

/* Скип-ссылка для доступности */
.a-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-bg-contrast);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-4);
  z-index: var(--z-modal);
  font-family: var(--font-secondary);
}
.a-skip-link:focus { left: var(--space-3); top: var(--space-3); }

/* Утилита — визуально скрыть, но оставить для скринридеров */
.u-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.u-text-center { text-align: center; }
.u-mt-6 { margin-top: var(--space-6); }
