/* ============================================================
   АБС — Автоматизация Бизнес-систем
   Статический сайт abs43.ru
   ============================================================ */

:root {
  --primary: #8e1b1b;
  --primary-2: #a52626;
  --primary-dark: #6b1010;
  --gold: #c8a34a;
  --gold-2: #e2c483;
  --gold-soft: #f7edd7;
  --ink: #161a1f;
  --ink-2: #2c333b;
  --muted: #5d6773;
  --line: #e7e1d8;
  --line-2: #f0ebe3;
  --bg: #ffffff;
  --soft: #faf6f0;
  --soft-2: #f4eee5;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(22, 26, 31, 0.05), 0 6px 16px -8px rgba(22, 26, 31, 0.12);
  --shadow-md: 0 24px 48px -24px rgba(22, 26, 31, 0.35), 0 2px 4px rgba(22, 26, 31, 0.04);
  --container: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--gold-2); color: var(--ink); }

:focus-visible { outline: 3px solid rgba(200, 163, 74, 0.7); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 0.55em;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.4em; }
strong { font-weight: 700; }

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

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(12px);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--gold) 50%, var(--primary) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo img { height: 44px; width: auto; }
.logo:hover { text-decoration: none; }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 100%; }

.nav a {
  display: inline-block;
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }

.nav a.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(142, 27, 27, 0.8);
}

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 88% -12%, #fbefd4 0%, rgba(251, 239, 212, 0) 62%),
    radial-gradient(700px 420px at 4% 110%, #f5e7d8 0%, rgba(245, 231, 216, 0) 60%),
    linear-gradient(180deg, #fffdf9 0%, #faf3e7 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 76px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 64px;
  align-items: center;
}

.hero h1 { font-size: clamp(2rem, 3.6vw, 2.9rem); max-width: 16em; margin-bottom: 0.5em; }

.hero .lead {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 0;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  box-shadow: 0 1px 2px rgba(22, 26, 31, 0.04);
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* Карточка-визитка в первом экране */

.hero-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-md);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  right: 30px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--gold), var(--primary));
}

.hero-card__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-card__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(200, 163, 74, 0.18);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 20px;
  margin-top: 24px;
}

.stat b {
  display: block;
  font-size: 1.55rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.stat span {
  display: block;
  margin-top: 5px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.hero-card__foot {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 0.86rem;
  color: var(--muted);
}

/* ---------- Секции ---------- */

.section { padding: 76px 0; }
.section--soft { background: var(--soft); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }

.section-head { max-width: 46em; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 0.4em; }
.section-head p { color: var(--muted); margin-bottom: 0; }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8802f;
  margin-bottom: 12px;
}

.page-head {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(760px 400px at 86% -20%, #fbefd4 0%, rgba(251, 239, 212, 0) 65%),
    linear-gradient(180deg, #fffdf9 0%, #faf3e7 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 52px;
}
.page-head h1 { margin-bottom: 0.25em; }
.page-head p { color: var(--muted); margin: 0; max-width: 54em; font-size: 1.06rem; }

/* ---------- Сетки и карточки ---------- */

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #ded5c7; }

.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.card--accent { border-top: 3px solid var(--gold); background: linear-gradient(180deg, #fffdf8 0%, #fff 45%); }

.notice {
  border-left: 4px solid var(--primary);
  background: #fff;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
}

/* ---------- Списки с маркерами ---------- */

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 0.65em;
  line-height: 1.5;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8a34a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.checklist--2 { display: grid; grid-template-columns: 1fr; gap: 0 28px; }
@media (min-width: 640px) { .checklist--2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Товары ---------- */

.product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #ded5c7; }

.product__media {
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product__media img { width: 100%; height: 200px; object-fit: contain; }

.product__body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product__body h3 { margin: 0; font-size: 1.25rem; }
.product__body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.product__body p a { font-weight: 600; }

.product__tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d5f1b;
  background: rgba(200, 163, 74, 0.16);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ---------- Таблицы ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th {
  background: var(--soft);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
tbody tr:nth-child(even) td { background: #fdfbf7; }
tr:last-child td { border-bottom: none; }
td.num, th.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

.price-note { font-size: 0.9rem; color: var(--muted); margin-top: 12px; }

/* ---------- Реквизиты ---------- */

.dl {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.dl dt, .dl dd { margin: 0; padding: 15px 20px; border-bottom: 1px solid var(--line-2); }
.dl dt { background: var(--soft); font-weight: 600; color: var(--muted); font-size: 0.94rem; }
.dl dd { font-weight: 500; }
.dl > :nth-last-child(-n+2) { border-bottom: none; }

/* ---------- Контакты ---------- */

.contacts { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.contact-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.contact-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold), var(--primary));
}

.contact-card .label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}
.contact-card .value { font-size: 1.08rem; font-weight: 600; margin-top: 8px; line-height: 1.5; }

/* ---------- Клиенты ---------- */

.clients-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding: 8px 0;
}
.clients-logos img {
  height: 52px;
  width: auto;
  opacity: 0.72;
  filter: grayscale(1);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.clients-logos img:hover { opacity: 1; filter: none; }

/* ---------- Документ (политика) ---------- */

.doc { max-width: 54em; }
.doc h2 { margin-top: 2.2em; font-size: 1.3rem; padding-left: 16px; border-left: 3px solid var(--gold); }
.doc h3 { margin-top: 1.6em; font-size: 1.02rem; }
.doc p, .doc li { font-size: 0.97rem; color: var(--ink-2); }
.doc .updated { color: var(--muted); font-size: 0.9rem; }

/* ---------- CTA ---------- */

.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #7d1414 0%, #9d2020 48%, #5e0d0d 100%);
  color: #fff;
  padding: 60px 0;
}
.cta::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -110px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 163, 74, 0.35) 0%, rgba(200, 163, 74, 0) 66%);
  pointer-events: none;
}
.cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { color: rgba(255, 255, 255, 0.8); margin: 0; max-width: 40em; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Подвал ---------- */

.site-footer {
  background: #14171b;
  color: #b6b0a7;
  padding: 58px 0 28px;
  font-size: 0.95rem;
}
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr 1fr; }
.site-footer a { color: #f0e6d2; }
.site-footer a:hover { color: #fff; }
.site-footer h4 {
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 14px;
}
.site-footer p { margin: 0 0 8px; }
.footer-brand .footer-logo { height: 40px; width: auto; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: 0.92; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8d8880;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  border: 1px solid transparent;
  box-shadow: 0 12px 24px -14px rgba(142, 27, 27, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  cursor: pointer;
}
.btn:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -14px rgba(142, 27, 27, 0.95);
}

.btn--ghost {
  background: #fff;
  color: var(--primary);
  border-color: #e3d8c8;
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { background: var(--soft); color: var(--primary-dark); border-color: #d6c9b6; }

.btn--light { background: #fff; color: var(--primary); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.7); }
.btn--light:hover { background: #fff6f1; color: var(--primary-dark); }

.btn--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); box-shadow: none; }
.btn--outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }

/* ---------- Адаптив ---------- */

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 560px; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 52px; }
  .section { padding: 52px 0; }
  .page-head { padding: 40px 0 36px; }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-height: 0;
    padding: 12px 0 10px;
  }
  .logo img { height: 36px; }
  .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(90deg, #000 88%, rgba(0, 0, 0, 0) 100%);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 7px 12px; font-size: 0.9rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { padding-bottom: 4px; border-bottom: none; }
  .dl dd { padding-top: 4px; }

  .cta__inner { flex-direction: column; align-items: flex-start; }
  .hero__actions .btn { flex: 1 1 auto; }
}

@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .stat-grid { gap: 18px 14px; }
  .stat b { font-size: 1.35rem; }
  .product__media img { height: 170px; }
  .badges .badge { font-size: 0.8rem; }
}

@media print {
  .site-header, .site-footer, .nav, .btn, .cta, .hero-card { display: none; }
}
