/* «Оттиск» — единый стиль сайта. Локальный файл, внешних зависимостей нет.
   Палитра — препресс: бумага, краска CMYK, приводочные метки. */

:root {
  --paper: #f7f5ef;
  --card: #ffffff;
  --ink: #1d1a16;
  --muted: #6f695d;
  --line: #e4e0d4;
  --cyan: #00a3d9;
  --magenta: #e0007e;
  --yellow: #f2c500;
  --key: #26221d;
  --ok: #2f7d4f;
  --warn: #9a6b00;
  --err: #b3372c;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--ink); }
a:hover { color: var(--magenta); }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: 40px; margin: 0 0 14px; }
h2 { font-size: 28px; margin: 0 0 10px; }
h3 { font-size: 20px; margin: 0 0 8px; }

p { margin: 0 0 12px; }

code, pre, .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- CMYK-полоса (фирменная линия) ---------- */

.colorbar {
  display: flex;
  height: 4px;
}
.colorbar i { flex: 1; }
.colorbar i:nth-child(1) { background: var(--cyan); }
.colorbar i:nth-child(2) { background: var(--magenta); }
.colorbar i:nth-child(3) { background: var(--yellow); }
.colorbar i:nth-child(4) { background: var(--key); }

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

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15.5px;
  font-weight: 550;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--magenta);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 7px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

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

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.06s ease, box-shadow 0.12s ease, background 0.12s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 26px; font-size: 17px; }

.btn-primary {
  background: var(--key);
  color: #fff;
}
.btn-primary:hover { background: #000; color: #fff; }
.btn-primary:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.linklike {
  color: var(--magenta);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.site-footer {
  margin-top: 72px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 28px;
  padding-bottom: 28px;
  align-items: flex-start;
}
.footer-brand { font-weight: 750; }
.footer-inner nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-inner nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.footer-inner nav a:hover { color: var(--ink); }
.footer-note { color: var(--muted); font-size: 14.5px; }

/* ---------- Герой ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 64px 0 48px;
}
.hero .lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 24px;
}
.hero-art svg { width: 100%; height: auto; display: block; }

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

.section { padding: 40px 0; }
.section-title { margin-bottom: 6px; }
.section-lead {
  color: var(--muted);
  max-width: 46em;
  margin-bottom: 26px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15.5px; margin: 0; }
.card .card-mark {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}
.mark-c { background: var(--cyan); }
.mark-m { background: var(--magenta); }
.mark-y { background: var(--yellow); color: var(--ink); }
.mark-k { background: var(--key); }

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--magenta);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

.pro-strip {
  background: var(--key);
  color: #f1ede2;
  border-radius: var(--radius);
  padding: 30px 30px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.pro-strip h2 { color: #fff; }
.pro-strip p { color: #cfc8b8; margin: 6px 0 0; max-width: 40em; }
.pro-strip .btn-primary { background: var(--yellow); color: var(--key); }
.pro-strip .btn-primary:hover { background: #ffd83d; color: var(--key); }

/* ---------- Конвертер ---------- */

.converter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.conv-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  align-items: start;
}

.dropzone {
  border: 2px dashed #c9c3b2;
  border-radius: var(--radius);
  background: #fbfaf6;
  padding: 34px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--magenta);
  outline: none;
}
.dropzone.drag {
  border-color: var(--cyan);
  background: #f0fbff;
}
.dz-title { font-weight: 700; font-size: 17px; margin-top: 10px; }
.dz-hint { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.samples-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.samples-label { color: var(--muted); font-size: 14.5px; }
.sample-thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  object-fit: cover;
  transition: border-color 0.1s ease, transform 0.06s ease;
}
.sample-thumb:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.preview-pane {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    repeating-conic-gradient(#f1efe7 0% 25%, #fbfaf6 0% 50%) 0 0 / 22px 22px;
}
.preview-pane img {
  max-width: 100%;
  max-height: 340px;
  border-radius: 6px;
  box-shadow: 0 2px 14px rgba(29, 26, 22, 0.14);
  background: #fff;
}
.preview-pane img[hidden] { display: none; }
.preview-empty { color: var(--muted); font-size: 15px; }
.preview-empty.gone { display: none; }

.conv-controls { display: flex; flex-direction: column; gap: 14px; }

.field {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 14px;
  margin: 0;
}
.field legend {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 6px;
}
.field select,
.field input[type="number"] {
  font-family: inherit;
  font-size: 15.5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.field input[type="range"] { width: 100%; accent-color: var(--magenta); }
.field-hint { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

.radio, .checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  margin-right: 16px;
  cursor: pointer;
}
.radio input, .checkbox input { accent-color: var(--cyan); }

.dims {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.dims label {
  flex: 1;
  min-width: 88px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dims[hidden] { display: none; }

.conv-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.conv-info span { color: var(--ink); font-weight: 600; }

.status {
  font-size: 15px;
  color: var(--muted);
  border-left: 3px solid var(--line);
  padding: 6px 0 6px 12px;
  margin: 0;
  min-height: 2.4em;
}
.status-ok { border-left-color: var(--ok); color: var(--ok); }
.status-warn { border-left-color: var(--warn); color: var(--warn); }
.status-error { border-left-color: var(--err); color: var(--err); }

/* ---------- Тарифы ---------- */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: stretch;
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.plan-pro { border: 2px solid var(--key); }
.plan-name { font-size: 22px; font-weight: 800; margin: 0; }
.plan-price { font-size: 34px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.plan-price small { font-size: 15px; color: var(--muted); font-weight: 550; }
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-features li {
  padding-left: 26px;
  position: relative;
  font-size: 15.5px;
  color: var(--ink);
}
.plan-features li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--cyan);
}
.plan-features li:nth-child(2n)::before { background: var(--magenta); }
.plan-features li:nth-child(3n)::before { background: var(--yellow); }
.plan-features li:nth-child(4n)::before { background: var(--key); }
.plan .btn { align-self: flex-start; }
.badge {
  position: absolute;
  top: -13px;
  right: 20px;
  background: var(--yellow);
  color: var(--key);
  font-size: 12.5px;
  font-weight: 750;
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15.5px;
  margin-top: 26px;
}
.compare th, .compare td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.compare thead th {
  background: #fbfaf6;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.compare tbody tr:last-child td { border-bottom: none; }
.compare td.yes { color: var(--ok); font-weight: 650; }
.compare td.no { color: var(--muted); }

.price-note { color: var(--muted); font-size: 14.5px; margin-top: 16px; }

/* ---------- Документация ---------- */

.prose { max-width: 46em; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 26px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose p, .prose li { color: #3c372e; }

.api-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0 22px;
}
.api-endpoint {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-block;
  margin-bottom: 10px;
}
.api-endpoint .verb { color: var(--ok); }
.api-block p { font-size: 15px; color: var(--muted); margin: 6px 0 0; }

pre.code {
  background: var(--key);
  color: #eee9dc;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  overflow-x: auto;
  margin: 14px 0 0;
}
pre.code .cm { color: #9a947f; }

.doc-note {
  border-left: 3px solid var(--cyan);
  background: #f2fbff;
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  font-size: 15px;
  color: #31586a;
  margin: 18px 0;
}

/* ---------- Кабинет ---------- */

.stub-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.stub-block { border-top: 1px solid var(--line); padding-top: 18px; }
.stub-block:first-of-type { border-top: none; padding-top: 0; }
.stub-hint { color: var(--muted); font-size: 14.5px; margin: 8px 0 0; }
.btn[disabled] {
  background: var(--line);
  color: var(--muted);
  border-color: transparent;
  cursor: not-allowed;
}
.plan-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.plan-line .tag {
  background: #fbfaf6;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 12px;
  color: var(--ink);
}

/* ---------- 404 ---------- */

.notfound {
  text-align: center;
  padding: 90px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.notfound .art { opacity: 0.9; }
.notfound p { color: var(--muted); max-width: 30em; }
.whisper { font-size: 14px; color: var(--muted); opacity: 0.8; }

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

@media (max-width: 860px) {
  h1 { font-size: 32px; }
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 0 28px;
    gap: 26px;
  }
  .hero-art { max-width: 380px; margin: 0 auto; }
  .cards, .steps { grid-template-columns: 1fr; }
  .conv-grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }

  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 20px 18px;
    gap: 12px;
    box-shadow: 0 12px 24px rgba(29, 26, 22, 0.08);
  }
  .site-nav.open { display: flex; }
  .site-header { position: relative; }
}
