/* ==========================================================================
   base.css — фундамент проекта
   Подключение шрифта, дизайн-токены, сброс стилей, типографика, утилиты.
   Порядок подключения: base.css -> layout.css -> components.css -> pages.css -> theme.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   Шрифт Arimo (OFL, метрически совместим с Arial/Helvetica)
   Локальные woff2-файлы: вариативный вес 400–700, подмножества по unicode-range.
   Лицензия: assets/fonts/arimo/OFL.txt
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Arimo";
  src: url("../fonts/arimo/arimo-cyrillic-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Arimo";
  src: url("../fonts/arimo/arimo-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Arimo";
  src: url("../fonts/arimo/arimo-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Arimo";
  src: url("../fonts/arimo/arimo-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  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;
}

/* --------------------------------------------------------------------------
   Дизайн-токены
   -------------------------------------------------------------------------- */
:root {
  /* Шрифт */
  --font-main: "Arimo", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

  /* Цвета бренда (взяты из логотипа) */
  --c-navy: #283850;
  --c-navy-900: #1b2739;
  --c-navy-800: #223147;
  --c-green: #48a850;
  --c-green-dark: #3b8f42;
  --c-green-soft: #eef7ef;

  /* Нейтральные цвета */
  --c-white: #ffffff;
  --c-text: #283850;
  --c-muted: #64707f;
  --c-muted-light: #8b95a3;
  --c-border: #e4e9ef;
  --c-border-strong: #d3dae3;
  --c-surface: #f6f8fa;
  --c-surface-2: #eef2f6;

  /* Сетка */
  --container: 1240px;
  --gutter: 24px;
  --header-h: 112px;

  /* Радиусы и тени */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(40, 56, 80, 0.06);
  --shadow: 0 12px 32px rgba(40, 56, 80, 0.08);
  --shadow-lg: 0 24px 60px rgba(40, 56, 80, 0.14);

  /* Анимации */
  --transition: 0.25s ease;
}

/* --------------------------------------------------------------------------
   Сброс стилей
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background-color: var(--c-white);
  color: var(--c-text);
  font-family: var(--font-main);
  /* Основной текст чуть ниже среднего размера: 15px на десктопе */
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-locked {
  overflow: hidden;
}

body.lightbox-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* --------------------------------------------------------------------------
   Типографика
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 500;
  line-height: 1.18;
  color: var(--c-navy);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.95rem, 1.25rem + 2.4vw, 3.15rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.35vw, 2.35rem);
  line-height: 1.14;
}

h3 {
  font-size: clamp(1.125rem, 1.02rem + 0.35vw, 1.3125rem);
}

h4 {
  font-size: 1.0625rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--c-green-dark);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background-color: var(--c-green);
}

.lead {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--c-muted);
}

.text-sm {
  font-size: 0.8125rem;
  line-height: 1.6;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1.5;
}

.text-muted {
  color: var(--c-muted);
}

.text-center {
  text-align: center;
}

/* --------------------------------------------------------------------------
   Доступность
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid rgba(72, 168, 80, 0.45);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background-color: var(--c-green);
  color: var(--c-white);
}

.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Утилиты сетки
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 6vw, 96px);
}

.section--tight {
  padding-block: clamp(40px, 4vw, 64px);
}

.section--surface {
  background-color: var(--c-surface);
}

.section--navy {
  background-color: var(--c-navy-900);
  color: var(--c-white);
}

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--c-white);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(28px, 3vw, 44px);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head--center .eyebrow {
  justify-content: center;
}

.section__head p {
  margin-top: 16px;
}

.section__foot {
  margin-top: clamp(28px, 3vw, 40px);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack > * + * {
  margin-top: var(--stack-gap, 16px);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 26px;
}

.actions-row--center {
  justify-content: center;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 14px;
}

/* --------------------------------------------------------------------------
   Плавное появление блоков (класс .reveal добавляет main.js).
   Без JS элементы видны сразу.
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Адаптив базовых сеток
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid--4,
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 18px;
  }

  body {
    font-size: 0.875rem;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }
}

