/* ============================================================
   Base — reset, контейнер, типографика, утилиты, кнопки
   ============================================================ */

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

* { margin: 0; }

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

body {
  font-family: var(--ff-base);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: var(--lh-body);
  color: var(--c-primary);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

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

h1, h2, h3 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

/* ---------- Контейнер ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-inline);
}

/* ---------- Заголовки ---------- */
.h1 { font-size: var(--fs-display); line-height: var(--lh-display); }
.h2 { font-size: var(--fs-h2); line-height: var(--lh-display); }
.h3 { font-size: var(--fs-h3); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: var(--space-xs) var(--space-md);
  font-family: var(--ff-base);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: var(--lh-base);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: opacity .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { opacity: .9; }

.btn--primary  { background: var(--c-primary); color: var(--c-white); }
.btn--accent   { background: var(--c-accent);  color: var(--c-white); }
.btn--outline  { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--outline:hover { background: var(--c-primary); color: var(--c-white); opacity: 1; }

.btn--block { width: 100%; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !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;
}
