/* Шрифтове, reset, типография.
   Шрифтовете се зареждат от собствения сървър — никаква заявка не тръгва към
   трета страна, което е предпоставка за твърдението в политиката за поверителност. */

@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/literata-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/literata-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golostext-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golostext-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.65;
  font-feature-settings: 'locl' 1;
  /* Фина зърнистост върху хартията — усеща се, не се вижда. */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(28, 27, 25, 0.035) 1px, transparent 0);
  background-size: 4px 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.012em;
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
}

h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }

p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }

strong, b { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--sp-6) 0;
}

ul, ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-6); }
li { margin-bottom: var(--sp-2); }

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.05em 0.3em;
}

.quote {
  border-left: 3px solid var(--rule-strong);
  padding: var(--sp-2) var(--sp-4);
  margin: 0 0 var(--sp-4);
  color: var(--ink-2);
  font-size: var(--t-sm);
  white-space: pre-wrap;
}

svg { width: 1em; height: 1em; display: block; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius);
}

/* Заглавията получават фокус само програмно, за да ги прочете екранният четец при смяна
   на екрана. Пръстен около тях изглежда като поле за въвеждане и обърква — махаме го,
   без това да засяга истинските интерактивни елементи по-горе. */
:where(h1, h2)[tabindex='-1']:focus,
:where(h1, h2)[tabindex='-1']:focus-visible {
  outline: none;
  box-shadow: none;
}

.shell {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.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;
}

.muted { color: var(--ink-muted); }
.small { font-size: var(--t-sm); }
.xsmall { font-size: var(--t-xs); }

/* Бутони ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font: inherit;
  font-weight: 500;
  padding: 0.8em 1.5em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn[disabled] {
  background: var(--paper-3);
  color: var(--ink-faint);
  cursor: not-allowed;
  border-color: var(--rule);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--rule-strong);
}
.btn--ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn--ghost[disabled] { background: transparent; }
.btn--lg { font-size: var(--t-md); padding: 0.85em 1.8em; }

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