/* ООО «АМ ГРУПП» — базовые стили.
   Палитра: тёмно-синяя база + один акцент. Ритм отступов кратен 4/8. */

:root {
  --ink: #0b1b28;
  --ink-2: #12293b;
  --ink-3: #1d3d56;
  --slate: #556a7b;
  --slate-2: #8698a6;
  --line: #dde5ea;
  --line-2: #edf2f5;
  --bg: #ffffff;
  --bg-2: #f4f8fa;
  --bg-3: #e9f1f6;
  --accent: #0a93d6;
  --accent-ink: #0a72a8;
  --accent-soft: #e2f2fb;
  --warn: #b4531c;

  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(11, 27, 40, .06), 0 8px 24px rgba(11, 27, 40, .06);
  --shadow-lg: 0 2px 4px rgba(11, 27, 40, .06), 0 18px 48px rgba(11, 27, 40, .12);

  --wrap: 1200px;
  --measure: 68ch;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--bg);
  font-feature-settings: 'tnum' 1, 'kern' 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; letter-spacing: -.02em; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
h3 { font-size: clamp(19px, 2vw, 22px); line-height: 1.25; }
h4 { font-size: 17px; line-height: 1.3; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }
strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 820px; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-dark { background: var(--ink); color: #c9d4e5; }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-soft { background: var(--bg-2); }
.lead { font-size: 20px; line-height: 1.55; color: var(--slate); max-width: var(--measure); }
.muted { color: var(--slate); }
.small { font-size: 14px; }
.center { text-align: center; }
.mw { max-width: var(--measure); }

/* ——— Шапка ——— */
.topbar {
  background: var(--ink);
  color: #9fb0c9;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar .wrap { display: flex; gap: 24px; align-items: center; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #cfdaeb; }
.topbar .spacer { margin-left: auto; }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { flex: 0 0 auto; display: block; }
.logo svg, .logo img { height: 56px; width: auto; display: block; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); padding: 10px 12px; border-radius: var(--r); font-size: 15px;
  font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav a:hover { background: var(--bg-3); text-decoration: none; }
.nav a.active { color: var(--accent-ink); background: var(--accent-soft); }

.has-sub { position: relative; }
.has-sub > .sub {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 320px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 8px; display: none;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { display: block; padding: 10px 12px; font-size: 15px; line-height: 1.35; }
.sub a span { display: block; font-size: 13px; color: var(--slate); }

.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: var(--r); width: 44px; height: 40px; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; }

/* ——— Кнопки ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r); font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--slate-2); }
.btn-light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.btn-light:hover { background: rgba(255, 255, 255, .18); }

/* ——— Хлебные крошки ——— */
.crumbs { font-size: 14px; color: var(--slate); padding: 20px 0 0; }
.crumbs a { color: var(--slate); }
.crumbs span { margin: 0 8px; color: var(--slate-2); }

/* ——— Герой ——— */
.hero { background: linear-gradient(155deg, #08192a 0%, #10314b 52%, #0d4f74 100%); color: #cfdaeb;
  position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: #a9bad4; max-width: 56ch; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-figure img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  background: rgba(10, 147, 214, .14); border: 1px solid rgba(10, 147, 214, .34);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }
.section-dark .eyebrow, .hero .eyebrow { color: #63c6f5; }

/* ——— Показатели ——— */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stats div { background: #fff; padding: 24px; }
.stats b { display: block; font-size: 34px; line-height: 1.1; color: var(--ink); letter-spacing: -.03em; }
.stats span { font-size: 14px; color: var(--slate); }

/* ——— Карточки ——— */
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--slate); font-size: 15px; margin-bottom: 12px; }
.card .more { margin-top: auto; font-weight: 600; font-size: 15px; }
a.card { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.card-num { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .08em; margin-bottom: 12px; }
.card-media { margin: -24px -24px 20px; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden;
  background: var(--bg-3); aspect-ratio: 16 / 10; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.section-dark .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
.section-dark .card p { color: #9fb0c9; }

/* ——— Список-таблица характеристик ——— */
.specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.specs th, .specs td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.specs th { color: var(--slate); font-weight: 500; width: 45%; }
.specs td { color: var(--ink); font-weight: 600; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }

/* ——— Этапы ——— */
.steps { counter-reset: s; display: grid; gap: 0; border-left: 2px solid var(--line-2); }
.steps > li { list-style: none; position: relative; padding: 0 0 28px 28px; margin: 0; }
.steps > li::before { counter-increment: s; content: counter(s); position: absolute; left: -15px; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.steps h4 { margin-bottom: 4px; }
.steps p { color: var(--slate); font-size: 15px; margin: 0; }

/* ——— Заметки ——— */
.note { border-left: 3px solid var(--accent); background: var(--bg-2); padding: 16px 20px;
  border-radius: 0 var(--r) var(--r) 0; margin: 0 0 24px; }
.note p:last-child { margin-bottom: 0; }
.note-warn { border-left-color: var(--warn); }

/* ——— Статьи ——— */
.article { max-width: 760px; }
.article h2 { margin-top: 40px; }
.article h3 { margin-top: 28px; }
.article img { border-radius: var(--r-lg); margin: 24px 0; }
.article-meta { color: var(--slate); font-size: 14px; margin-bottom: 24px; }
.toc { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 24px; margin-bottom: 32px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 15px; }

.post-list { display: grid; gap: 16px; }
.post-item { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: #fff;
  color: inherit; text-decoration: none; }
.post-item:has(img) { grid-template-columns: 220px 1fr; }
.post-item:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.post-item img { border-radius: var(--r); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.post-item h3 { margin-bottom: 6px; }
.post-item p { color: var(--slate); font-size: 15px; margin: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }

/* ——— Форма ——— */
.form { display: grid; gap: 16px; max-width: 560px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--r); font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px;
  border-color: transparent; }
.form .small { color: var(--slate); }

/* ——— CTA ——— */
.cta { background: linear-gradient(135deg, #10293c, #0f5d86); color: #fff; border-radius: var(--r-lg);
  padding: 40px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { color: #b6c6de; margin: 0; max-width: 52ch; }

/* ——— Подвал ——— */
.footer { background: var(--ink); color: #90a1ba; font-size: 15px; padding: 56px 0 32px; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.footer a { color: #b9c7dc; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 24px;
  display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; font-size: 13px; color: #6f8098; }

/* ——— Адаптив ——— */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch;
    padding: 8px 12px 16px; box-shadow: var(--shadow); max-height: 78vh; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; }
  .has-sub > .sub { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 8px 12px;
    min-width: 0; border-left: 2px solid var(--line-2); margin-left: 8px; }
  .sub a { padding: 8px; }
  .sub a span { display: none; }
  .burger { display: block; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .post-item { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; padding: 28px; }
  .topbar .wrap { min-height: 0; padding-top: 8px; padding-bottom: 8px; font-size: 12px; gap: 12px; }
  .topbar .hide-sm { display: none; }
}

@media (max-width: 560px) {
  .logo svg, .logo img { height: 42px; }
  .stats { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 48px; padding-bottom: 48px; }
}

/* Тёмные секции: выделения и ссылки должны оставаться читаемыми */
.section-dark strong { color: #fff; }
.section-dark a { color: #6ec8f2; }
.section-dark .note { background: rgba(255, 255, 255, .06); border-left-color: #6ec8f2; }
.section-dark li { color: #c9d4e5; }
.section-dark .lead { color: #a9bad4; }

/* Продуктовые рендеры показываем целиком, а не кадрируем */
.card-media.contain { background: #f6f8fb; }
.card-media.contain img { object-fit: contain; padding: 12px; }

/* Мобильная типографика: короче строки и мягче кегль */
@media (max-width: 860px) {
  .lead { font-size: 17px; }
  h1 { font-size: clamp(28px, 7vw, 36px); }
  .hero h1 { max-width: none; }
  .stats b { font-size: 28px; }
  .cta { padding: 24px; }
}

/* Ловушка для ботов и подтверждение отправки формы */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-ok { border-left: 3px solid #1f8f4a; background: #eef8f1; padding: 16px 20px;
  border-radius: 0 var(--r) var(--r) 0; margin-bottom: 24px; }

/* Карточки моделей кабин: квадратные рендеры показываем крупнее */
.card-media.contain { aspect-ratio: 4 / 3; }
