/* ==========================================================
   BASE.CSS — общая основа для всех шаблонов MPD
   Палитра: #102020 · #2D4C4F · #78B4B7 · #D9E9E9 · #83241E
   Меняйте цвета/шрифт здесь — поменяется весь сайт.
   ========================================================== */
:root {
  --c-darkest: #102020;
  --c-teal-dark: #2D4C4F;
  --c-teal: #78B4B7;
  --c-teal-light: #D9E9E9;
  --c-red: #83241E;
  --c-red-hover: #9c2d26;

  --c-bg: #f2f7f7;
  --c-surface: #ffffff;
  --c-surface-2: #e5efef;
  --c-dark: var(--c-darkest);
  --c-dark-2: var(--c-teal-dark);
  --c-dark-3: #3d6266;
  --c-text: var(--c-darkest);
  --c-text-muted: #4a6366;
  --c-text-light: #f2f7f7;
  --c-text-light-muted: #a9cdcf;
  --c-accent: var(--c-teal-light);
  --c-accent-hover: var(--c-teal);
  --c-accent-strong: var(--c-red);
  --c-line: #c5d8d9;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-h1: clamp(2.25rem, 5vw, 4rem);
  --fs-h2: clamp(1.75rem, 3.2vw, 2.75rem);
  --fs-h3: 1.125rem;
  --fs-small: .875rem;

  --container: 1200px;
  --gutter: 24px;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --section-gap: clamp(64px, 9vw, 112px);
}

/* --- Сброс и база --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, blockquote, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-gap); }
.section--dark { background: var(--c-dark); color: var(--c-text-light); }
.section--tint { background: var(--c-surface-2); }
.center { text-align: center; }

/* --- Типографика --- */
.h1 { font-size: var(--fs-h1); font-weight: 600; line-height: 1.05; letter-spacing: -.02em; }
.h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; margin-bottom: 16px; }
.h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; margin-bottom: 8px; }
.lead { font-size: 1.0625rem; color: var(--c-text-muted); max-width: 60ch; }
.section--dark .lead { color: var(--c-text-light-muted); }
.muted { color: var(--c-text-muted); font-size: var(--fs-small); }
.section--dark .muted { color: var(--c-text-light-muted); }
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: var(--fs-small);
  color: var(--c-accent-strong);
  font-weight: 500;
}
.section--dark .eyebrow { color: var(--c-teal); }
.section-head { margin-bottom: 48px; }
.section-head.center .lead { margin-inline: auto; }

/* --- Кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--fs-small); font-weight: 600;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 9px 18px; font-size: .8rem; }
.btn--primary { background: var(--c-red); color: #fff; }
.btn--primary:hover { background: var(--c-red-hover); }
.btn--light { background: var(--c-accent); color: var(--c-text); }
.btn--light:hover { background: var(--c-accent-hover); }
.btn--outline { border-color: currentColor; }
.btn--outline:hover { background: var(--c-accent); color: var(--c-text); border-color: var(--c-accent); }

/* --- Логотип-заглушка --- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.logo__mark {
  min-width: 32px; height: 32px; padding-inline: 6px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--c-red); color: #fff; font-size: .8rem; font-weight: 700;
}

/* --- Шапка --- */
.header { position: sticky; top: 0; z-index: 50; background: var(--c-dark); color: var(--c-text-light); }
.header--light { background: rgba(255,255,255,.92); color: var(--c-text); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.nav__list { display: flex; gap: 28px; }
.nav__link { font-size: var(--fs-small); opacity: .8; transition: opacity .2s, color .2s; }
.nav__link:hover { opacity: 1; color: var(--c-teal); }
.header--light .nav__link:hover { color: var(--c-red); }
.header__actions { display: flex; align-items: center; gap: 12px; }
.burger {
  display: none; width: 40px; height: 40px; border: none; background: transparent;
  flex-direction: column; justify-content: center; gap: 5px; padding: 9px;
}
.burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; }

/* --- Карточки --- */
.card {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--c-line);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(16,32,32,.08); }
/* светлая карточка внутри тёмной секции — возвращаем тёмный текст */
.section--dark .card:not(.card--dark) { color: var(--c-text); }
.section--dark .card:not(.card--dark) .muted { color: var(--c-text-muted); }
.card--dark { background: var(--c-dark-2); border-color: transparent; color: var(--c-text-light); }
.card--dark .muted { color: var(--c-text-light-muted); }
.icon-badge {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--c-teal-light); color: var(--c-red);
  font-weight: 700; font-size: .85rem;
  margin-bottom: 20px;
}

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Заглушки картинок (замените на <img>) --- */
.placeholder {
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--c-teal-light) 0%, var(--c-teal) 60%, var(--c-teal-dark) 100%);
  min-height: 200px;
}
.placeholder--dark { background: linear-gradient(160deg, var(--c-dark-3) 0%, var(--c-teal-dark) 50%, var(--c-darkest) 100%); }
.placeholder--red  { background: linear-gradient(160deg, var(--c-teal-light) 0%, #b9a3a0 55%, var(--c-red) 100%); }

/* --- Формы --- */
.form { display: grid; gap: 12px; }
.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-text);
}
.input:focus { outline: 2px solid var(--c-teal); outline-offset: 1px; }
textarea.input { min-height: 120px; resize: vertical; }

/* --- Подвал --- */
.footer { background: var(--c-dark); color: var(--c-text-light-muted); padding-block: 32px; font-size: var(--fs-small); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-dark-3); color: var(--c-text-light); font-size: .75rem; font-weight: 600;
}
.socials a:hover { background: var(--c-red); }

/* --- Адаптив (общий) --- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .burger { display: flex; }
  .header__actions .btn { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: inherit; padding: 16px var(--gutter) 24px;
    display: none;
  }
  .header { background-color: var(--c-dark); }
  .header--light { background-color: #fff; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 16px; }
  .nav__link { font-size: 1rem; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}
