/* ============================================================
   AdygnetID — базовый слой: сброс, типографика, ссылки, футер.
   Зависит от токенов в theme.css. Подключать после theme.css.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 17px;
  letter-spacing: 0;
  line-height: 1.47;
  margin: 0;
}

a {
  color: var(--blue);
}

/* :where() обнуляет специфичность обёртки до (0,0,0,1) — как у светлого `a` —
   чтобы классы (.nav-link-next, .btn-main/.btn-soft) перебивали цвет ссылок и в тёмной теме */
:where([data-theme="dark"]) a {
  color: var(--primary-on-dark);
}

/* Заголовки набираются дисплейным начертанием с «эппловским» тайтом */
h1,
.hero-title,
.section-title h2,
.auth-title,
.status-title {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
}

.shell {
  display: block;
  min-height: 100vh;
}

.eyebrow {
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.24;
  margin-bottom: 14px;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  /* нижний отступ растёт под home-indicator на iPhone */
  padding: 24px max(22px, calc((100vw - 1180px) / 2 + 22px)) calc(24px + var(--safe-bottom));
}

.footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--icon-blue);
}

.legal {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 18px 0 0;
}

.legal a {
  color: var(--blue);
  text-decoration: none;
}

/* Доступность: уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
