/* =============================================================================
   base.css — fonts, a modern reset, the page ground, type, links, the focus
   ring and the icon/number helpers every page uses. Fonts are served from
   /assets/fonts (spec §4.2); nothing is fetched from a third party.
   ============================================================================= */

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/nunito-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/nunito-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/nunito-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: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/inter-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;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100vh; min-height: 100dvh; }
  img, picture, video, canvas, svg { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  ul[class], ol[class] { list-style: none; padding: 0; }
  table { border-collapse: collapse; }
  fieldset { min-width: 0; padding: 0; border: 0; }
  legend { padding: 0; }
  p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
}

@layer base {
  html {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-weight: var(--fw-body);
    font-size: 100%;
    line-height: var(--lh);
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-size: var(--fs-15);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  @media (max-width: 699.98px) {
    body { font-size: var(--fs-16); }
    input, select, textarea { font-size: var(--fs-16); }
  }

  h1, h2, h3, h4 { font-weight: var(--fw-heavy); line-height: var(--lh-tight); }
  h1 { font-size: var(--fs-24); }
  h2 { font-size: var(--fs-20); }
  h3 { font-size: var(--fs-18); }
  h4 { font-size: var(--fs-16); }

  a { color: var(--primary); text-underline-offset: 2px; }
  a:hover { color: var(--primary-hover); }

  :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
  :focus:not(:focus-visible) { outline: none; }

  ::selection { background: var(--primary-soft); }

  [hidden] { display: none !important; }

  svg.i {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
  .muted { color: var(--muted); }

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

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