/* base.css — сброс и базовая типографика. Опирается только на tokens.css. */

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

html,
body,
#root {
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--fg-default);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* «Живой» тёплый градиент канваса (как hero на emailzavr.com) */
.app-main {
  background-image: var(--grad-canvas);
  background-attachment: fixed;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  line-height: var(--lh-tight);
  color: var(--c-ink-800);
  font-family: var(--font-sans);
}

/* Заголовки — serif Gelasio (editorial-стиль emailzavr.com) */
h1 { font-family: var(--font-serif); font-size: var(--fs-h1); font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
h2 { font-family: var(--font-serif); font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* утилиты */
.u-muted { color: var(--fg-muted); }
.u-subtle { color: var(--fg-subtle); }
.u-mono { font-family: var(--font-mono); }
.u-nowrap { white-space: nowrap; }
.u-row { display: flex; align-items: center; gap: var(--sp-2); }
.u-col { display: flex; flex-direction: column; }
.u-grow { flex: 1 1 auto; }
.u-wrap { flex-wrap: wrap; }
.u-spread { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
