/* Шаблоны.doc — doctemplates.ru */

/* ---------- Шрифты (self-hosted, cyrillic+latin) ---------- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/plex-sans-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/plex-sans-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/plex-sans-600-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(fonts/plex-sans-600-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/plex-sans-700-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/plex-sans-700-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/plex-mono-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/plex-mono-400-latin.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/plex-mono-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/plex-mono-500-latin.woff2) format('woff2'); }

/* ---------- Токены ----------
   Синий — фирменный цвет мира MS Word (продукт делает Word-документы),
   жёлтый 1С — точечный маркер «данные из 1С» (закладки шаблона).       */
:root {
  --paper: #FFFFFF;
  --ink: #1A1D21;
  --muted: #5A6068;
  --hairline: #E3E6EA;
  --word: #2B579A;
  --word-dark: #1E4076;
  --word-wash: #EFF3FA;
  --onec: #FFD500;
  --onec-wash: #FFF7CC;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', 'Consolas', monospace;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(26, 29, 33, .08), 0 8px 24px rgba(26, 29, 33, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--word); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--onec); outline-offset: 2px; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h2 {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section { padding: 64px 0; }
.section-sub { color: var(--muted); margin-bottom: 36px; max-width: 640px; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.brand {
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.brand .doc { color: var(--word); }

.topnav { display: flex; gap: 20px; margin-left: auto; }

.topnav a {
  font-size: 15px;
  text-decoration: none;
  color: var(--muted);
}

.topnav a:hover { color: var(--word); }

.topbar .tg-btn {
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--word);
  border-radius: var(--radius);
  padding: 8px 16px;
  white-space: nowrap;
  transition: background-color .15s ease;
}

.topbar .tg-btn:hover { background: var(--word-dark); }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 48px; }

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.hero .sub {
  font-size: clamp(20px, 3vw, 24px);
  color: var(--word);
  font-weight: 600;
  margin: 6px 0 22px;
}

.check-list { list-style: none; }

.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--word) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center/11px no-repeat;
}

.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 26px;
  border-radius: var(--radius);
  border: 2px solid var(--word);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.btn-primary { background: var(--word); color: #fff; }
.btn-primary:hover { background: var(--word-dark); border-color: var(--word-dark); }
.btn-ghost { background: transparent; color: var(--word); }
.btn-ghost:hover { background: var(--word-wash); }

/* Видео-плашка (фасад: превью → плеер по клику) */
.video-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--word-wash);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 0;
}

.video-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }

.video-facade .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--word) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><polygon points="8 5 20 12 8 19"/></svg>') 55% center/26px no-repeat;
  box-shadow: 0 4px 16px rgba(30, 64, 118, .4);
  transition: transform .15s ease;
}

.video-facade:hover .play { transform: scale(1.08); }

.video-facade .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px 8px;
  text-align: left;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(transparent, rgba(26, 29, 33, .75));
}

.video-facade iframe, .video-facade video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Сигнатура: живой шаблон ---------- */
.livedemo { background: var(--word-wash); border-block: 1px solid var(--hairline); }

.livedemo .container { padding-top: 56px; padding-bottom: 56px; }

.livedemo-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr;
  gap: 28px;
  align-items: center;
  margin-top: 32px;
}

.card-1c {
  background: #fff;
  border: 1px solid var(--hairline);
  border-top: 5px solid var(--onec);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  font-size: 15px;
}

.card-1c .cap {
  font-family: var(--mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: 10px;
}

.card-1c table { border-collapse: collapse; width: 100%; }
.card-1c td { padding: 4px 0; vertical-align: top; }
.card-1c td:first-child { color: var(--muted); padding-right: 16px; white-space: nowrap; }

.livedemo-arrow {
  font-weight: 700;
  color: var(--word);
  text-align: center;
  font-size: 15px;
  white-space: nowrap;
}

.livedemo-arrow .word-btn {
  display: inline-block;
  background: var(--onec);
  border-radius: 4px;
  padding: 6px 14px;
  color: var(--ink);
  font-size: 14px;
  box-shadow: 0 1px 2px rgba(26,29,33,.25);
  margin-bottom: 6px;
}

.doc-sheet {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: 30px 34px;
  font-size: 15px;
  line-height: 1.7;
  position: relative;
}

.doc-sheet::before {
  content: "W";
  position: absolute;
  top: -1px;
  right: 14px;
  background: var(--word);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 4px 9px 6px;
  border-radius: 0 0 4px 4px;
}

.doc-sheet h3 { text-align: center; font-size: 16px; margin-bottom: 12px; }

.field {
  display: inline-block;
  background: var(--onec-wash);
  border-bottom: 2px solid var(--onec);
  border-radius: 2px;
  padding: 0 4px;
  font-family: var(--mono);
  font-size: 13.5px;
  transition: background-color .4s ease, border-color .4s ease;
}

.doc-sheet.filled .field {
  background: transparent;
  border-color: transparent;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
}

.livedemo .note { margin-top: 22px; color: var(--muted); font-size: 15px; }

/* ---------- О решении ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
}

.about-grid p { margin-bottom: 14px; }

.badge-compat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--hairline);
  border-left: 5px solid var(--onec);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  font-family: inherit;
}

.badge-compat:hover { background: var(--onec-wash); }

/* ---------- Преимущества ---------- */
.pluses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.plus-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: #fff;
}

.plus-card b { color: var(--ink); }
.plus-card p { color: var(--muted); }
.plus-card p b { color: var(--ink); }

/* ---------- Кейсы ---------- */
.case {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  margin-bottom: 14px;
  background: #fff;
  overflow: hidden;
}

.case summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  font-size: 19px;
  font-weight: 600;
}

.case summary::-webkit-details-marker { display: none; }

.case summary::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background: var(--word-wash) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%232B579A" stroke-width="3" stroke-linecap="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>') center/14px no-repeat;
  border-radius: 4px;
  transition: transform .2s ease;
}

.case[open] summary::before { transform: rotate(45deg); }
.case[open] summary { border-bottom: 1px solid var(--hairline); }

.case-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 22px;
}

.case-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }

.case-shots img, .zoomable {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  cursor: zoom-in;
  display: block;
}

.case-text p { margin-bottom: 12px; }
.case-text ul { margin: 0 0 12px 22px; }

/* ---------- 3 шага ---------- */
.steps { background: var(--word-wash); border-block: 1px solid var(--hairline); }

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

.step {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step .n {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--word);
}

.step h3 { font-size: 17px; line-height: 1.3; }
.step img { border: 1px solid var(--hairline); border-radius: 4px; cursor: zoom-in; }

.btn-video {
  margin-top: auto;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--word);
  background: none;
  border: 1px solid var(--word);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
}

.btn-video::before { content: "▶ "; font-size: 11px; }
.btn-video:hover { background: var(--word-wash); }

/* ---------- Отзывы ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.review {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  gap: 16px;
  background: #fff;
}

.review img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
}

.review blockquote { font-size: 15.5px; margin-bottom: 8px; }
.review .who { color: var(--muted); font-size: 14px; }

/* ---------- Сравнение версий ---------- */
.tablewrap { overflow-x: auto; }

.compare {
  border-collapse: collapse;
  width: 100%;
  font-size: 15.5px;
  min-width: 640px;
}

.compare th, .compare td {
  border: 1px solid var(--hairline);
  padding: 10px 16px;
}

.compare th { background: var(--word-wash); font-size: 16px; }
.compare th:first-child { text-align: left; }
.compare td:nth-child(2), .compare td:nth-child(3) { text-align: center; width: 160px; }
.compare th:nth-child(3) { background: var(--word); color: #fff; }

.compare .yes {
  display: inline-block;
  width: 20px; height: 20px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%232B579A" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>') center/contain no-repeat;
}

/* ---------- Цены ---------- */
.prices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.price-card.featured { border-color: var(--word); box-shadow: var(--shadow); }

.price-card .head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--hairline);
}

.price-card.featured .head { background: var(--word); color: #fff; }

.price-card .head h3 { font-size: 18px; line-height: 1.3; }

.price-card .head .price {
  font-size: 30px;
  font-weight: 700;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.price-card .body { padding: 18px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.price-card ol { margin: 0 0 18px 20px; color: var(--muted); font-size: 15px; }
.price-card ol li { margin-bottom: 6px; }
.price-card .btn { margin-top: auto; text-align: center; }

.oferta-line { margin-top: 22px; text-align: center; color: var(--muted); font-size: 15px; }

/* ---------- Заказ / CTA ---------- */
.order { background: var(--word); color: #fff; text-align: center; }
.order h2 { color: #fff; }
.order p { color: rgba(255, 255, 255, .85); max-width: 560px; margin: 0 auto 26px; }
.order .btn { border-color: #fff; background: #fff; color: var(--word); }
.order .btn:hover { background: var(--onec); border-color: var(--onec); color: var(--ink); }

/* ---------- Контакты ---------- */
.contacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  font-size: 17px;
}

.contacts-grid .item { display: flex; align-items: baseline; gap: 10px; }
.contacts-grid .label { font-family: var(--mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Футер ---------- */
footer {
  border-top: 1px solid var(--hairline);
  padding: 26px 0 40px;
  font-size: 14.5px;
  color: var(--muted);
}

footer .container { display: flex; flex-wrap: wrap; gap: 12px 36px; align-items: baseline; }
footer a { color: var(--muted); }
footer .copy { margin-left: auto; }

/* ---------- Лайтбокс и видео-оверлей ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 24, 31, .85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  cursor: zoom-out;
}

.overlay.open { display: flex; }

.overlay img {
  max-width: 94vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  background: #fff;
}

.overlay .player {
  width: min(960px, 94vw);
  aspect-ratio: 16 / 9;
  cursor: default;
}

.overlay .player iframe, .overlay .player video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
  background: #000;
}

.overlay .close {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 34px;
  line-height: 1;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Страница «Видео» ---------- */
.vid-group {
  font-size: 20px;
  font-weight: 600;
  margin: 34px 0 16px;
  padding-left: 12px;
  border-left: 5px solid var(--onec);
}

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

.vid-card {
  font: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 0 0 14px;
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.vid-card:hover { border-color: var(--word); box-shadow: var(--shadow); }

.vid-card .thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--word-wash);
  overflow: hidden;
}

.vid-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.vid-card .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--word) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><polygon points="8 5 20 12 8 19"/></svg>') 55% center/20px no-repeat;
  box-shadow: 0 3px 12px rgba(30, 64, 118, .4);
  transition: transform .15s ease;
}

.vid-card:hover .play { transform: scale(1.1); }

.vid-card .dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(26, 29, 33, .78);
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 2px 7px;
  border-radius: 4px;
}

.vid-card .t {
  display: block;
  padding: 12px 16px 0;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.4;
}

/* ---------- Мобильная ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 32px; }
  .livedemo-grid { grid-template-columns: 1fr; gap: 16px; }
  .livedemo-arrow { transform: rotate(90deg); margin: 4px auto; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-grid .main-img { max-width: 260px; margin: 0 auto; }
  .steps-grid, .vid-grid { grid-template-columns: repeat(2, 1fr); }
  .pluses-grid, .reviews-grid { grid-template-columns: 1fr; }
  .prices-grid { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .topbar .tg-btn { margin-left: auto; }
}

@media (max-width: 560px) {
  .section { padding: 44px 0; }
  .steps-grid, .vid-grid { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .case-shots { grid-template-columns: repeat(4, 1fr); }
}
