/* ============================================================
   ЦЕННОСТЬ ЖИЗНИ — MAIN.CSS
   Переменные, сброс, базовые стили, типографика, утилиты
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Цвета */
  --lime: #C7D400;
  --lime-dark: #A8B200;
  --lime-light: #F2F7C8;
  --lime-muted: #E4EF6A;
  --dark-bg: #1E3A2F;
  --dark-bg-2: #27482F;
  --text: #1A1C18;
  --text-soft: #3A3D30;
  --text-muted: #5D6054;
  --surface: #FFFFFF;
  --surface-alt: #F6F7F2;
  --border: #E2E5D8;
  --telegram: #229ED9;
  --whatsapp: #25D366;
  --error: #D94040;
  --success: #3DB870;

  /* Типографика */
  --font: 'Manrope', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Радиусы */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Тени */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.12);

  /* Переходы */
  --transition: 200ms ease;
  --transition-slow: 400ms ease;

  /* Отступы контейнера */
  --container-px: clamp(16px, 5vw, 80px);
  --section-py: clamp(60px, 8vw, 100px);

  /* Header */
  --header-h: 72px;
}

/* ── Сброс ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--surface);
  line-height: 1.65;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Контейнер ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1440px; }

/* ── Секции ── */
.section { padding: var(--section-py) 0; }
.section--dark { background: #F5F2EE; color: #1A1C18; }
.section--alt  { background: var(--surface-alt); }
.section--lime { background: var(--lime); }

/* ── Заголовки секций ── */
.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lime-dark);
  margin-bottom: 12px;
}
.section-tag::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px;
}
.section-tag::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px;
}
.section--dark .section-tag { color: #2D5A3D; }

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}
.section--dark .section-title { color: #1A1C18; }
.section-sub {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.section--dark .section-sub { color: #5D6054; }

/* ── Типографика ── */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 800; line-height: 1.2; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); font-weight: 700; line-height: 1.3; }
h4 { font-size: 1.125rem; font-weight: 700; }
p  { line-height: 1.7; }

/* ── Утилиты ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }
.gap-4 { gap: 1rem; }

/* ── Grid & Flex утилиты ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
/* Выравнивание карточек по высоте внутри грида */
.grid-2 > *, .grid-3 > *, .grid-4 > * { align-self: stretch; }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Дисклеймер (ФЗ-38) ── */
.disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border-left: 3px solid var(--border);
  line-height: 1.5;
}
.section--dark .disclaimer {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.5);
  border-color: rgba(255,255,255,.15);
}

/* ── Анимации появления ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Скроллбар ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-alt); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Хлебные крошки ── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: 16px 0;
}
.breadcrumb a:hover { color: var(--lime-dark); }
.breadcrumb-sep { color: var(--border); }

/* ── Page Hero (внутренние страницы) ── */
.page-hero {
  background: var(--dark-bg);
  color: #fff;
  padding: calc(var(--header-h) + 40px) 0 60px;
}
.page-hero__tag {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--lime);
  margin-bottom: 16px;
}
.page-hero__title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
}
.page-hero__sub {
  font-size: var(--text-md);
  color: rgba(255,255,255,.65);
  max-width: 600px;
}
.page-hero .breadcrumb {
  margin-bottom: 24px;
  color: rgba(255,255,255,.45);
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.65); }
.page-hero .breadcrumb a:hover { color: var(--lime); }
