/* === ЦРБ — Базовые стили === */
:root {
  /* Палитра */
  --blue-900: #0E1F3A;
  --blue-800: #13294B;
  --blue-700: #1B365D;
  --blue-600: #224679;
  --blue-100: #E5EBF3;
  --blue-50:  #F2F5FA;

  --red-700: #8C1217;
  --red-600: #A4161A;
  --red-500: #C41E25;
  --red-100: #F8E5E6;

  --ink-900: #0B0F19;
  --ink-700: #2A3142;
  --ink-500: #5B6479;
  --ink-400: #8A92A6;
  --ink-300: #B7BDCC;
  --ink-200: #D9DDE6;
  --ink-100: #ECEFF4;
  --ink-50:  #F5F7FA;

  --white: #FFFFFF;
  --paper: #FAFBFC;

  /* Типографика */
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Радиусы */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-2xl: 32px;

  /* Тени (очень сдержанные) */
  --shadow-1: 0 1px 2px rgba(14, 31, 58, 0.04), 0 0 0 1px rgba(14, 31, 58, 0.04);
  --shadow-2: 0 4px 16px rgba(14, 31, 58, 0.06), 0 0 0 1px rgba(14, 31, 58, 0.04);
  --shadow-3: 0 12px 32px rgba(14, 31, 58, 0.10);

  /* Сетка */
  --container: 1280px;
  --gutter: 24px;
}

/* ───────────── ПАЛИТРЫ ───────────── */
body[data-palette="graphite"] {
  --blue-900: #0B0F19;
  --blue-800: #1F2937;
  --blue-700: #374151;
  --blue-600: #4B5563;
  --blue-100: #E5E7EB;
  --blue-50:  #F3F4F6;
  --red-700: #991B1B;
  --red-600: #DC2626;
  --red-500: #EF4444;
  --paper:   #F5F5F4;
}
body[data-palette="imperial"] {
  --blue-900: #050E22;
  --blue-800: #0A1F3F;
  --blue-700: #102A57;
  --blue-600: #1A3A6E;
  --blue-100: #DDE4F0;
  --blue-50:  #F0F3F9;
  --red-700: #8C0F11;
  --red-600: #B71C1C;
  --red-500: #DA2F30;
  --paper:   #FAF8F3;
}
body[data-palette="northern"] {
  --blue-900: #06234D;
  --blue-800: #093266;
  --blue-700: #0B3D7B;
  --blue-600: #1052A1;
  --blue-100: #DCE6F4;
  --blue-50:  #EEF2F8;
  --red-700: #8C1419;
  --red-600: #B91C1C;
  --red-500: #DC2C2C;
  --paper:   #EEF2F8;
}

/* ───────────── НАСТРОЕНИЕ ───────────── */
/* Редакционный — крупный hero, акценты курсивом, тонкие eyebrow-линии */
body[data-mood="editorial"] .hero-title {
  font-weight: 500;
  letter-spacing: -0.035em;
  font-size: clamp(44px, 5.6vw, 92px);
  line-height: 0.98;
}
body[data-mood="editorial"] .hero-title em {
  font-style: italic;
  font-weight: 500;
  font-family: 'Manrope', serif;
}
body[data-mood="editorial"] h2 {
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: clamp(32px, 4vw, 56px);
}
body[data-mood="editorial"] h2 em {
  font-style: italic;
  font-weight: 500;
}
body[data-mood="editorial"] .eyebrow,
body[data-mood="editorial"] .eyebrow-light {
  font-weight: 500;
  letter-spacing: 0.18em;
  font-size: 11px;
}
body[data-mood="editorial"] .eyebrow::before,
body[data-mood="editorial"] .eyebrow-light::before { width: 36px; }

/* Постерный — uppercase, плотно, индустриальный ритм */
body[data-mood="poster"] .hero-title,
body[data-mood="poster"] h2 {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  text-wrap: balance;
}
body[data-mood="poster"] h2 { hyphens: manual; }
h1, h2, h3 { min-width: 0; max-width: 100%; }
body[data-mood="poster"] .hero-title { font-size: clamp(36px, 4.4vw, 72px); line-height: 0.96; }
body[data-mood="poster"] .hero-title em { color: var(--red-600); }
body[data-mood="poster"] h2 { font-size: clamp(28px, 3.2vw, 48px); line-height: 1.05; }
body[data-mood="poster"] h3 { text-transform: uppercase; letter-spacing: 0.01em; font-weight: 700; font-size: 18px; }
body[data-mood="poster"] .btn {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-radius: 4px;
}
body[data-mood="poster"] .eyebrow,
body[data-mood="poster"] .eyebrow-light { font-weight: 700; letter-spacing: 0.2em; }
body[data-mood="poster"] .pf-card,
body[data-mood="poster"] .news-cover,
body[data-mood="poster"] .programs-grid,
body[data-mood="poster"] .init-card,
body[data-mood="poster"] .board-card,
body[data-mood="poster"] .map-canvas,
body[data-mood="poster"] .project-card { border-radius: 4px; }

/* ───────────── РИТМ СЕКЦИЙ ───────────── */
/* Плоский — все секции на белом, разделители через линии */
body[data-rhythm="flat"] .section-tone,
body[data-rhythm="flat"] .section-blueish { background: var(--white); }
body[data-rhythm="flat"] .section-dark { background: var(--blue-900); }
body[data-rhythm="flat"] .section + .section { border-top: 1px solid var(--ink-200); }
body[data-rhythm="flat"] .section-dark + .section,
body[data-rhythm="flat"] .section + .section-dark { border-top: none; }

/* Тональный — все «не-dark» секции на едином тёплом paper */
body[data-rhythm="tonal"] .section { background: var(--paper); }
body[data-rhythm="tonal"] .section-dark { background: var(--blue-900); }
body[data-rhythm="tonal"] .partners-tiers { background: transparent; }
body[data-rhythm="tonal"] .programs-grid,
body[data-rhythm="tonal"] .program { background: var(--white); }

/* Контраст — ничего не меняется (дефолт). */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container-wide {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Типографика */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--red-600);
}

.eyebrow-light {
  color: rgba(255,255,255,0.72);
}
.eyebrow-light::before { background: var(--red-500); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; color: var(--blue-900); }
h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.04; font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.3; }
h4 { font-size: 16px; line-height: 1.35; }

p { margin: 0; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-700);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-800); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--blue-900);
  border-color: var(--ink-200);
}
.btn-ghost:hover { border-color: var(--blue-700); color: var(--blue-700); }
.btn-light {
  background: var(--white);
  color: var(--blue-900);
}
.btn-light:hover { background: var(--ink-50); }
.btn-red {
  background: var(--red-600);
  color: var(--white);
}
.btn-red:hover { background: var(--red-700); }

.btn .arrow { width: 16px; height: 16px; transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Reveal — содержимое всегда полностью видимо; анимации появления отключены. */
.reveal,
.reveal-stagger,
.reveal-stagger > *,
.reveal.in,
.reveal-stagger.in > * {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Сетки секций */
.section {
  padding: 120px 0;
  position: relative;
}
.section-tight { padding: 80px 0; }
.section-dark {
  background: var(--blue-900);
  color: var(--white);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-tone { background: var(--paper); }
.section-blueish { background: var(--blue-50); }

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .lead {
  color: var(--ink-500);
  font-size: 18px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .section { padding: 80px 0; }
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 40px; }
}

/* Доп */
.divider {
  height: 1px;
  background: var(--ink-200);
}
.divider-dark {
  height: 1px;
  background: rgba(255,255,255,0.10);
}

/* Линии-фишки */
.tick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-500);
}
.tick-row::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--red-600);
}

/* Tabular numerals */
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* Скрытое содержимое для a11y */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Скроллбар скрыть для горизонтальных полос */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }
