/* ==========================================================
   MPD — стили сайта
   base.css — общая основа (кнопки, карточки, сетка колонок).
   Здесь — фирменная палитра MPD и стили секций.
   ========================================================== */

/* 1. ПАЛИТРА MPD (из логотипа) — переопределяет base.css */
:root {
  --c-navy: #0B2A55;        /* основной тёмно-синий */
  --c-navy-dark: #081C3A;   /* фон тёмных секций */
  --c-navy-2: #14386B;      /* карточки и hover на тёмном */
  --c-teal: #178F85;        /* бирюзовый акцент */
  --c-teal-hover: #12776F;
  --c-teal-light: #DCEFEC;
  --c-steel: #5D6E82;       /* серо-синий (лист документа в логотипе) */
  --c-accent-light: #5CC4B9; /* светлый бирюзовый на тёмном */

  --c-bg: #F4F7FA;
  --c-surface-2: #E8EEF4;
  --c-dark: var(--c-navy-dark);
  --c-dark-2: var(--c-navy-2);
  --c-dark-3: #24497D;
  --c-text: #0F1E33;
  --c-text-muted: #55657A;
  --c-text-light: #F4F7FA;
  --c-text-light-muted: #A9B8CC;
  --c-accent: var(--c-teal-light);
  --c-accent-hover: #C4E4DF;
  --c-accent-strong: var(--c-teal);
  --c-red: var(--c-teal);          /* в base.css «красный» = основной акцент */
  --c-red-hover: var(--c-teal-hover);
  --c-line: #D3DCE6;

  /* сетка на фоне */
  --grid-size: 80px;
  --grid-line: rgba(11, 42, 85, .06);
  --grid-line-dark: rgba(255, 255, 255, .06);
}

/* 2. СЕТКА НА ФОНЕ — добавьте класс .has-grid любой секции */
.has-grid {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center top;
}
.section--dark.has-grid {
  background-image:
    linear-gradient(var(--grid-line-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-dark) 1px, transparent 1px);
}

/* 3. ОБЩЕЕ */
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: var(--c-teal-light); color: var(--c-text); border-color: var(--c-teal-light); }
.section--dark .eyebrow { color: var(--c-accent-light); }
.icon-badge { color: var(--c-red); }
.placeholder { background: linear-gradient(160deg, var(--c-teal-light) 0%, #8fc9c2 50%, var(--c-teal) 100%); }
.placeholder--navy { background: linear-gradient(160deg, #3a5f8f 0%, var(--c-navy) 60%, var(--c-navy-dark) 100%); }
.placeholder--mix  { background: linear-gradient(160deg, var(--c-teal-light) 0%, var(--c-steel) 55%, var(--c-navy) 100%); }
.link-arrow { display: inline-flex; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--c-red); }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* 4. ШАПКА — светлая, под цветной логотип */
.header { background: rgba(255,255,255,.95); color: var(--c-text); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-line); }
.header__inner { min-height: 76px; }
.logo img { height: 40px; width: auto; }
.nav__link:hover { color: var(--c-red); }
@media (max-width: 960px) { .header, .nav { background-color: #fff; } }

/* 5. HERO */
.hero { padding-top: clamp(56px, 8vw, 104px); }
.hero__inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero__title {
  display: flex; flex-direction: column;
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__brand { font-size: clamp(4.5rem, 12vw, 9rem); line-height: .95; letter-spacing: -.03em; }
.hero__accent { color: var(--c-accent-light); font-size: clamp(1.5rem, 2.8vw, 2.25rem); line-height: 1.15; letter-spacing: 0; margin-top: 12px; }
.hero__text { color: var(--c-text-light-muted); max-width: 52ch; margin-bottom: 36px; }
.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 50% at 70% 30%, rgba(23,143,133,.55), transparent 70%),
    linear-gradient(160deg, var(--c-navy-2) 0%, var(--c-navy) 55%, var(--c-navy-dark) 100%);
  border: 1px solid var(--c-dark-3);
  overflow: hidden;
}
/* мелкая сетка внутри картинки-заглушки */
.hero__visual::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero__badge {
  position: absolute; left: 24px; bottom: 24px;
  background: #fff; color: var(--c-text);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; flex-direction: column;
}
.hero__badge strong { font-size: 1.75rem; color: var(--c-red); line-height: 1.1; }
.hero__badge span { font-size: .8rem; color: var(--c-text-muted); }

/* 6. SERVICES */
.services { padding-top: 0; }

/* 7. ABOUT + STATS */
.about__inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; margin-bottom: 64px; }
.about__photo { aspect-ratio: 1; min-height: 0; }
.about .lead + .lead { margin-top: 16px; }
.about .h2 { max-width: 18ch; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); background: rgba(255,255,255,.6); }
.stats__item { position: relative; padding: 28px 24px 32px; }
.stats__item + .stats__item { border-left: 1px solid var(--c-line); }
.stats__item + .stats__item::before,
.stats__item + .stats__item::after {
  content: ""; position: absolute; left: -6px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--c-teal); background: var(--c-bg);
}
.stats__item + .stats__item::before { top: -6px; }
.stats__item + .stats__item::after { bottom: -6px; }
.stats__value { display: block; font-size: clamp(2rem, 3.4vw, 2.75rem); font-weight: 700; color: var(--c-navy); line-height: 1; margin-bottom: 12px; }
.stats__label { display: block; font-size: .85rem; color: var(--c-text-muted); max-width: 22ch; }

/* 8. LABS BANNER */
.labs { padding-bottom: 0; }
.labs__card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(23,143,133,.35), transparent 70%),
    var(--c-navy);
  color: var(--c-text-light);
}
.labs__card .eyebrow { color: var(--c-accent-light); }
.labs__card .lead { color: var(--c-text-light-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { background: var(--c-navy-2); border: 1px solid var(--c-dark-3); font-size: .8rem; padding: 7px 14px; border-radius: 8px; }

/* 9. PROBLEMS */
.problem {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 16px 16px 22px;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.problem:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11,42,85,.08); }
.problem__img { aspect-ratio: 16 / 9; min-height: 0; border-radius: var(--radius-sm); margin-bottom: 18px; }
.problem__num {
  align-self: flex-start;
  font-size: .75rem; font-weight: 600; color: var(--c-red);
  background: var(--c-teal-light); border-radius: 6px; padding: 3px 8px; margin-bottom: 12px;
}
.problem .muted { flex-grow: 1; margin-bottom: 16px; }

/* 10. PROCESS + TIMELINE */
.process__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.process .h2 { max-width: 16ch; }
.badge-card { margin-top: 36px; background: var(--c-teal-light); border-radius: var(--radius); padding: 24px; max-width: 280px; }
.badge-card__value { display: block; font-size: 2.5rem; font-weight: 700; color: var(--c-red); line-height: 1; margin-bottom: 14px; }
.badge-card__text { font-size: .85rem; color: var(--c-text-muted); }
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px; background: var(--c-line); }
.timeline__item {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.timeline__item + .timeline__item { margin-top: 16px; }
.timeline__item::before {
  content: ""; position: absolute; left: -32px; top: 24px;
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--c-teal); background: var(--c-bg);
}

/* 11. CONTACT */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.contact .lead { margin-bottom: 28px; }
.contact__list { display: grid; gap: 8px; }
.contact__list li { display: flex; flex-direction: column; gap: 2px; padding: 18px 22px; border-radius: var(--radius); background: var(--c-navy-2); font-weight: 600; }

/* 12. FOOTER */
.footer__logo { display: inline-flex; }
.footer__logo img { height: 40px; width: auto; }

/* 13. АДАПТИВ */
@media (max-width: 960px) {
  .hero__inner, .about__inner, .labs__card, .process__inner, .contact { grid-template-columns: 1fr; }
  .hero__visual { max-width: 420px; aspect-ratio: 4 / 3; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(3) { border-left: none; }
  .stats__item:nth-child(n+3) { border-top: 1px solid var(--c-line); }
  .stats__item:nth-child(3)::before, .stats__item:nth-child(3)::after { display: none; }
}
@media (max-width: 600px) {
  .logo img { height: 32px; }
  .stats { grid-template-columns: 1fr; }
  .stats__item + .stats__item { border-left: none; border-top: 1px solid var(--c-line); }
  .stats__item + .stats__item::before, .stats__item + .stats__item::after { display: none; }
  .btn-group .btn { flex: 1 1 100%; }
}
