/* ==========================================================================
   base.css — типографика, утилиты, тонкая стилизация скроллбаров
   --------------------------------------------------------------------------
   Reset + базовые свойства лежат в layout.css (там же контейнер и сетка).
   Этот файл — про текст, ссылки и мелкие утилитарные классы.
   ========================================================================== */

/* ----- Заголовки ----------------------------------------------------------*/

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

/* ----- Параграф / inline ------------------------------------------------- */

p {
  font-family: var(--font-body);
  line-height: 1.55;
}

strong { font-weight: 600; }
em     { font-style: italic; font-family: var(--font-decor); }

small {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover  { color: var(--color-accent-soft); }
a:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ----- Утилитные классы --------------------------------------------------- */

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

.text-accent { color: var(--color-accent); }
.text-muted  { color: var(--color-text-muted); }
.text-dim    { color: var(--color-text-dim); }
.text-display{ font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; }
.text-decor  { font-family: var(--font-decor); font-style: italic; }

/* ----- Кнопки (универсальный API) ---------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap-min);
  padding: 0 var(--sp-5);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    background-color var(--transition-fast),
    color           var(--transition-fast),
    border-color    var(--transition-fast),
    transform       var(--transition-fast);
}

.btn:active     { transform: scale(0.97); }
.btn:disabled   { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--color-accent);
  color: var(--c-black);
}
.btn--primary:hover:not(:disabled) {
  background: var(--c-cream);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

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

/* ----- Скроллбары в фирменных тонах -------------------------------------- */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(209, 176, 102, 0.3) transparent;
}
*::-webkit-scrollbar         { width: 8px; height: 8px; }
*::-webkit-scrollbar-track   { background: transparent; }
*::-webkit-scrollbar-thumb   {
  background: rgba(209, 176, 102, 0.3);
  border-radius: var(--radius-pill);
}
*::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ----- Reduced motion ---------------------------------------------------- */

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