/* One King — фирменный стиль: жёлтая тетрадь в клетку, чёрный, красная печать.
   Layout: полосы на всю ширину, внутри .wrap (1280px) с безопасными боковыми отступами. */
:root {
  --yellow: #FFD400;
  --yellow-soft: #FFF6CC;
  --ink: #141414;
  --ink-2: #1F1F1F;
  --ink-3: #2C2C2C;
  --paper: #FFFFFF;
  --muted: #4A4740;
  --muted-on-ink: #BDB9AE;
  --line: #E4E0D4;
  --red: #E2142D;
  --red-deep: #9A0B1E;
  --f-display: "Montserrat", "Arial Black", system-ui, sans-serif;
  --f-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  --f-mono: "JetBrains Mono", ui-monospace, "Consolas", monospace;
  --radius: 18px;
  --shadow: 6px 6px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--ink);
}
img { max-width: 100%; height: auto; }
a { color: var(--red-deep); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: 1280px; margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

.grid-paper {
  background-color: var(--yellow);
  background-image: linear-gradient(rgba(20,20,20,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(20,20,20,.08) 1px, transparent 1px);
  background-size: 28px 28px;
}
.dots-paper {
  background-color: var(--yellow-soft);
  background-image: radial-gradient(rgba(20,20,20,.13) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.band { padding-block: clamp(64px, 9vw, 110px); }
.band--ink { background: var(--ink); color: var(--paper); }
.band--paper { background: var(--paper); }
.band--soft { background: var(--yellow-soft); }

/* ---------- Типографика ---------- */
.eyebrow { font-family: var(--f-mono); font-weight: 700; font-size: 14px; color: var(--red-deep); letter-spacing: .02em; }
.band--ink .eyebrow { color: var(--yellow); }
.h-xl { font-family: var(--f-display); font-weight: 900; font-size: clamp(42px, 7vw, 110px); line-height: .94; letter-spacing: -.045em; text-transform: uppercase; }
.h-lg { font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 4.8vw, 66px); line-height: .96; letter-spacing: -.035em; text-transform: uppercase; }
.h-md { font-family: var(--f-display); font-weight: 900; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; letter-spacing: -.02em; }
.h-sm { font-weight: 800; font-size: 20px; line-height: 1.25; }
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; font-weight: 600; max-width: 62ch; }
.hand { font-family: var(--f-hand); font-size: 32px; line-height: 1.1; color: var(--red-deep); }
.muted { color: var(--muted); }
.band--ink .muted { color: var(--muted-on-ink); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.boxed { display: inline-block; background: var(--ink); color: var(--yellow); padding: 2px .18em .08em; transform: rotate(-1.5deg); box-shadow: 10px 10px 0 var(--red); margin-block: 8px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer;
  padding: 16px 26px; border-radius: 14px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); color: var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--red { background: var(--red); color: #FFFFFF; }
.btn--red:hover { color: #FFFFFF; }
.btn--yellow { background: var(--yellow); }
.btn--ink { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
.btn--ink:hover { color: var(--yellow); }
.band--ink .btn { border-color: var(--paper); box-shadow: 6px 6px 0 var(--red); }
.band--ink .btn:hover { box-shadow: 9px 9px 0 var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.link-arrow { font-weight: 800; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Шапка ---------- */
.topbar { background: var(--ink); color: var(--muted-on-ink); font-size: 13px; font-weight: 600; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding-block: 9px; }
.topbar a { color: var(--muted-on-ink); text-decoration: none; }
.topbar a:hover { color: var(--yellow); }
.topbar .live { display: inline-flex; align-items: center; gap: 8px; }
.topbar .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.8s ease-out infinite; }

.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--yellow); border-bottom: 3px solid var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand:hover { color: var(--ink); }
.brand svg { width: 48px; height: 48px; flex: 0 0 48px; }
.brand b { display: block; font-weight: 900; font-size: 21px; line-height: 1.05; letter-spacing: -.01em; }
.brand small { display: block; font-size: 12px; font-weight: 800; color: var(--red-deep); }
.nav { display: flex; align-items: center; gap: 2px; background: var(--ink); padding: 5px; border-radius: 14px; }
.nav a { color: #FFFFFF; text-decoration: none; font-weight: 700; font-size: 15px; padding: 10px 13px; border-radius: 9px; white-space: nowrap; }
.nav a:hover { background: var(--ink-3); color: var(--yellow); }
.nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); }
.nav .nav-phone { background: var(--red); color: #FFFFFF; margin-left: 4px; }
.nav .nav-phone:hover { background: var(--red-deep); color: #FFFFFF; }
.burger { display: none; font: inherit; font-weight: 800; background: var(--ink); color: var(--yellow); border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; align-items: center; gap: 10px; }
.burger span { display: block; width: 20px; height: 2px; background: currentColor; box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor; }
@media (max-width: 1080px) {
  .burger { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; border-radius: 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 3px solid var(--ink); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .nav .nav-phone { margin: 8px 0 0; text-align: center; }
}

/* ---------- Внутренний заголовок страницы ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 90px) clamp(56px, 7vw, 96px); position: relative; overflow: hidden; }
.page-hero .wrap { display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 700; }
.crumbs a { color: var(--ink); text-decoration: none; opacity: .7; }
.crumbs a:hover { opacity: 1; color: var(--ink); }
.crumbs span[aria-hidden] { opacity: .5; }
.page-hero .ghost { position: absolute; right: -2vw; bottom: -.18em; font-weight: 900; font-size: clamp(120px, 18vw, 280px); line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(20,20,20,.16); white-space: nowrap; pointer-events: none; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); text-decoration: none; cursor: pointer; }
.chip:hover { background: var(--ink); color: var(--yellow); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }

/* ---------- Бегущие строки ---------- */
.tickers { position: relative; z-index: 3; margin-top: -18px; overflow: hidden; padding-block: 10px 6px; }
.ticker { overflow: hidden; margin: 0 -24px; }
.ticker--ink { background: var(--ink); color: var(--yellow); transform: rotate(-1.2deg); }
.ticker--red { background: var(--red); color: #FFFFFF; transform: rotate(1deg); margin-top: -6px; }
.ticker-track { display: flex; width: max-content; animation: marquee 36s linear infinite; white-space: nowrap; }
.ticker--red .ticker-track { animation-direction: reverse; animation-duration: 42s; }
.ticker-track span { padding: 16px 40px 16px 0; }
.ticker--ink .ticker-track { font-family: var(--f-mono); font-weight: 700; font-size: 19px; }
.ticker--red .ticker-track { font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Цифры ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat { padding: 8px 26px; border-left: 1px solid var(--ink-3); display: flex; flex-direction: column; gap: 6px; }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { font-size: clamp(58px, 6.4vw, 100px); font-weight: 900; line-height: .9; letter-spacing: -.03em; }
.stat .o { color: transparent; -webkit-text-stroke: 2px var(--yellow); }
.stat .y { color: var(--yellow); }
.stat .r { color: var(--red); }
.stat strong { font-size: 17px; }
@media (max-width: 560px) { .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink-3); padding-top: 18px; } .stat:first-child { border-top: 0; } }

/* ---------- Карточки ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.card { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card--lift { transition: transform .25s, box-shadow .25s; }
.card--lift:hover { transform: translate(-5px, -5px); box-shadow: 10px 10px 0 var(--ink); }
.card--ink { background: var(--ink); color: var(--paper); }
.card--yellow { background: var(--yellow); }
.card--red { background: var(--red); color: #FFFFFF; border-color: var(--ink); }
.card--red a, .card--ink a { color: inherit; }
.card .num { font-family: var(--f-mono); font-weight: 700; font-size: 14px; color: var(--red-deep); }
.card--ink .num, .card--red .num { color: var(--yellow); }
.card p { color: var(--muted); }
.card--ink p { color: var(--muted-on-ink); }
.card--red p, .card--yellow p { color: inherit; }
.card .link-arrow { margin-top: auto; padding-top: 6px; color: inherit; }
.card .roman { font-size: 52px; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px currentColor; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; line-height: 1.45; }
.ticks li::before { content: ""; flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 6px; background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l4.5 4.5L19 7'/%3E%3C/svg%3E") center/16px no-repeat; border: 2px solid var(--ink); }
.band--ink .ticks li::before, .card--ink .ticks li::before { border-color: var(--yellow); }

/* ---------- Логотипы клиентов ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 24px; }
.logo-tile { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); height: 150px; display: flex; align-items: center; justify-content: center; padding: 22px; transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.logo-tile img { max-height: 92px; width: auto; object-fit: contain; }
.logos .logo-tile:nth-child(4n+1) { transform: rotate(-2deg); }
.logos .logo-tile:nth-child(4n+2) { transform: rotate(1.5deg); }
.logos .logo-tile:nth-child(4n+3) { transform: rotate(-1deg); }
.logos .logo-tile:nth-child(4n) { transform: rotate(2deg); }
.logos .logo-tile:hover { transform: rotate(0) translateY(-8px); box-shadow: 10px 14px 0 var(--ink); }

/* ---------- Таблица цен ---------- */
.price-card { background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 24px; overflow: hidden; box-shadow: 12px 12px 0 var(--yellow); min-width: 0; }
.table-scroll { overflow-x: auto; }
.price-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 16px; }
.price-table th, .price-table td { padding: 17px 22px; text-align: left; vertical-align: top; }
.price-table thead th { background: var(--yellow); font-weight: 800; }
.price-table tbody tr { border-bottom: 1px solid var(--line); }
.price-table td small { display: block; color: var(--muted); font-size: 13px; }
.price-table .sum { text-align: right; font-family: var(--f-mono); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-table tfoot tr { background: var(--ink); color: #FFFFFF; }
.price-table tfoot th { font-size: 18px; font-weight: 900; }
.price-table tfoot .sum { color: var(--yellow); font-size: 22px; }
.price-note { padding: 14px 22px; font-size: 13px; color: var(--muted); background: #F6F4EE; }
.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.perk { border-radius: var(--radius); padding: 22px; border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 6px; }
.perk b { font-size: 32px; font-weight: 900; line-height: 1; }
.perk span { font-weight: 700; }

/* ---------- Процесс ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 22px; position: relative; counter-reset: step; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 33px; border-top: 3px dashed var(--ink); }
.steps li { position: relative; display: flex; flex-direction: column; gap: 12px; counter-increment: step; }
.steps li::before { content: "0" counter(step); width: 66px; height: 66px; border-radius: 50%; border: 3px solid var(--ink); background: var(--yellow); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 21px; }
.steps li:nth-child(3)::before { background: var(--ink); color: var(--yellow); }
.steps li:nth-child(4)::before { background: var(--red); color: #FFFFFF; }
.steps li:nth-child(even)::before { background: var(--paper); }
.steps p { color: var(--muted); }
@media (max-width: 600px) { .steps::before { display: none; } }

/* ---------- Аккордеон ---------- */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; font-weight: 800; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--yellow); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; transition: transform .25s, background .25s; }
.faq details[open] summary::after { transform: rotate(45deg); background: var(--red); color: #FFFFFF; }
.faq details > div { padding: 0 22px 22px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 75ch; }

/* ---------- Форма-документ ---------- */
.doc-form { background: #F2F1EC; border: 2px solid var(--yellow); border-radius: 12px; overflow: hidden; color: var(--ink); box-shadow: 12px 12px 0 var(--red); min-width: 0; }
.doc-form__bar { background: var(--yellow); padding: 12px 18px; font-weight: 800; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.doc-form__bar span:last-child { font-family: var(--f-mono); font-size: 13px; }
.doc-form__tabs { background: #E4E2DB; padding: 8px 18px; display: flex; gap: 6px; font-size: 13px; font-weight: 700; }
.doc-form__tabs span:first-child { background: var(--paper); border: 1px solid #A8A59C; border-radius: 4px; padding: 3px 10px; }
.doc-form__tabs span:last-child { padding: 3px 10px; color: var(--muted); }
.doc-form__body { padding: 22px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.field { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; gap: 10px; }
.field label { font-weight: 700; }
.field--top { align-items: start; }
.field--top label { padding-top: 10px; }
.field input, .field select, .field textarea { font: inherit; font-weight: 500; padding: 11px; border: 1px solid #A8A59C; background: var(--paper); color: var(--ink); border-radius: 4px; width: 100%; min-width: 0; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--yellow); border-color: var(--ink); }
.field .err { grid-column: 2; color: var(--red-deep); font-weight: 700; font-size: 13px; }
@media (max-width: 560px) { .field { grid-template-columns: 1fr; gap: 6px; } .field .err { grid-column: 1; } .field--top label { padding-top: 0; } }
.doc-form__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.doc-form__actions button { font: inherit; font-weight: 800; border-radius: 4px; padding: 12px 20px; cursor: pointer; }
.doc-form__actions .primary { background: var(--yellow); border: 1px solid var(--ink); color: var(--ink); }
.doc-form__actions .secondary { background: var(--paper); border: 1px solid #A8A59C; color: var(--ink); font-weight: 700; }
.doc-form__legal { font-size: 12px; color: var(--muted); }
.form-done { display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.form-done .stamp-small { align-self: flex-start; border: 5px double var(--red); color: var(--red); padding: 6px 16px; font-weight: 900; letter-spacing: .12em; transform: rotate(-8deg); border-radius: 8px; font-size: 22px; }
.form-done pre { white-space: pre-wrap; background: var(--paper); border: 1px dashed #A8A59C; padding: 14px; border-radius: 8px; font-family: var(--f-mono); font-size: 13px; margin: 0; }

/* ---------- Контакты ---------- */
.contact-list { display: flex; flex-direction: column; gap: 14px; }
.contact-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 16px; padding: 18px 20px; }
.contact-item div { display: flex; flex-direction: column; min-width: 0; }
.contact-item small { color: var(--muted-on-ink); font-weight: 700; font-size: 13px; }
.contact-item strong { font-size: 19px; overflow-wrap: anywhere; user-select: all; }
.copy-btn { font: inherit; font-size: 13px; font-weight: 800; background: var(--yellow); color: var(--ink); border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer; }
.copy-btn.is-done { background: var(--paper); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: var(--muted-on-ink); overflow: hidden; border-top: 3px solid var(--yellow); }
.site-footer .wrap { padding-block: 60px 34px; display: flex; flex-direction: column; gap: 40px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; font-size: 15px; line-height: 2; }
.foot-cols div { display: flex; flex-direction: column; }
.foot-cols b { color: #FFFFFF; margin-bottom: 4px; }
.foot-cols a { color: var(--muted-on-ink); text-decoration: none; }
.foot-cols a:hover { color: var(--yellow); }
.foot-word { font-size: clamp(56px, 15vw, 236px); font-weight: 900; line-height: .82; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px var(--yellow); white-space: nowrap; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; font-size: 13px; line-height: 1.6; border-top: 1px solid var(--ink-3); padding-top: 22px; }
.foot-legal b { color: #FFFFFF; }

/* ---------- Каталог ---------- */
.product { position: relative; }
.product .cat { font-family: var(--f-mono); font-size: 12px; font-weight: 700; color: var(--red-deep); text-transform: uppercase; letter-spacing: .06em; }
.product .price { font-family: var(--f-mono); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.product .price small { display: block; font-family: var(--f-body); font-size: 12px; color: var(--muted); font-weight: 600; }
.product .badge { position: absolute; top: -12px; right: 18px; background: var(--red); color: #FFFFFF; font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; border: 2px solid var(--ink); }
.product-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---------- Анимации ---------- */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--r, 0deg)); } }
@keyframes stampIn { 0% { transform: rotate(-14deg) scale(1.8); opacity: 0; } 60% { transform: rotate(-14deg) scale(.92); opacity: 1; } 100% { transform: rotate(-14deg) scale(1); opacity: 1; } }
@keyframes grow { from { transform: scaleY(.05); } to { transform: scaleY(1); } }
@keyframes draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226,20,45,.55); } 100% { box-shadow: 0 0 0 14px rgba(226,20,45,0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Калькулятор комплекта ---------- */
.band--ink .btn--red { box-shadow: 6px 6px 0 var(--yellow); }
.band--ink .btn--red:hover { box-shadow: 9px 9px 0 var(--yellow); }
.calc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; scroll-margin-top: 100px; }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
.calc-doc, .calc-result { border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: #F2F1EC; color: var(--ink); min-width: 0; }
.band--ink .calc-doc, .band--ink .calc-result { border-color: var(--yellow); }
.calc-result { background: var(--paper); box-shadow: 12px 12px 0 var(--red); position: relative; }
.calc-bar { background: var(--yellow); padding: 12px 18px; font-weight: 800; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.calc-bar span:last-child { font-family: var(--f-mono); font-size: 13px; font-weight: 700; }
.calc-bar--ink { background: var(--ink); color: var(--paper); }
.calc-bar--ink span:last-child { color: var(--yellow); }
.calc-body { padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.calc-field { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-field > label, .calc-field legend { font-weight: 800; font-size: 15px; padding: 0; }
.calc-field select, .calc-field input[type=number] { font: inherit; font-weight: 600; padding: 12px; border: 1px solid #A8A59C; border-radius: 6px; background: var(--paper); color: var(--ink); width: 100%; min-width: 0; }
.calc-users { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; align-items: center; }
.calc-users input[type=range] { width: 100%; accent-color: var(--red); height: 28px; }
.calc-users input[type=number] { font-family: var(--f-mono); font-weight: 700; font-size: 20px; text-align: center; padding: 8px; }
.calc-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-modes legend { margin-bottom: 8px; }
@media (max-width: 480px) { .calc-modes { grid-template-columns: 1fr; } }
.mode { position: relative; cursor: pointer; }
.mode input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.mode span { display: flex; flex-direction: column; gap: 3px; border: 2px solid #A8A59C; border-radius: 12px; padding: 14px; background: var(--paper); height: 100%; transition: border-color .2s, box-shadow .2s, transform .2s; }
.mode small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.mode input:checked + span { border-color: var(--ink); background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.mode input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.calc-hint { font-size: 14px; color: var(--muted); border-left: 4px solid var(--yellow); padding-left: 12px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 440px; }
.calc-table th, .calc-table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.calc-table thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.calc-table .sum { text-align: right; font-family: var(--f-mono); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.calc-total { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 22px 18px; background: var(--ink); color: var(--paper); }
.calc-total span:first-child { font-weight: 800; font-size: 18px; }
.calc-total b { font-family: var(--f-mono); font-size: clamp(30px, 3.6vw, 46px); color: var(--yellow); font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.calc-total b::after { content: " сум"; font-size: .45em; color: var(--paper); }
.calc-stamp { position: absolute; left: 100px; top: 18px; border: 5px double var(--red); color: var(--red); background: rgba(255,255,255,.92); padding: 4px 14px; font-weight: 900; font-size: 18px; letter-spacing: .12em; border-radius: 8px; transform: rotate(-10deg); opacity: 0; pointer-events: none; }
.calc-stamp.is-on { animation: stampIn .55s cubic-bezier(.2,.8,.2,1) both; }
.calc-perks { list-style: none; margin: 0; padding: 16px 18px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.calc-perks li { background: var(--yellow-soft); border: 1px solid #E8D98A; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.calc-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 18px 22px; }
.calc-actions .link-arrow { color: var(--ink); }

/* ---------- Прайс-лист в стиле отчёта 1С ---------- */
.pricelist { border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.pl-head { background: var(--yellow); padding: 14px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-weight: 800; border-bottom: 2px solid var(--ink); }
.pl-head span:last-child { font-family: var(--f-mono); font-size: 13px; }
.pl-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 18px; background: #F2F1EC; border-bottom: 1px solid var(--line); }
.pl-tools label { font-weight: 700; font-size: 14px; }
.pl-tools input { font: inherit; padding: 10px 12px; border: 1px solid #A8A59C; border-radius: 6px; flex: 1 1 260px; min-width: 0; background: var(--paper); color: var(--ink); }
.pl-table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 15px; }
.pl-table thead th { text-align: left; padding: 10px 18px; font-size: 13px; color: var(--muted); background: #FAF9F5; border-bottom: 1px solid var(--line); }
.pl-table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pl-table tbody tr:not(.pl-group):hover { background: #FFF9DB; }
.pl-table .pl-name { font-weight: 700; }
.pl-table small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pl-table .sum { text-align: right; font-family: var(--f-mono); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-group th { text-align: left; padding: 11px 18px; background: var(--yellow-soft); font-weight: 900; border-bottom: 1px solid #E8D98A; border-top: 2px solid var(--ink); }
.folder { display: inline-block; width: 18px; height: 13px; margin-right: 10px; vertical-align: -1px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 2px 3px 3px 3px; position: relative; }
.folder::before { content: ""; position: absolute; left: -2px; top: -6px; width: 8px; height: 4px; background: var(--yellow); border: 2px solid var(--ink); border-bottom: 0; border-radius: 2px 2px 0 0; }
.pl-act { text-align: right; width: 1%; white-space: nowrap; }
.pl-calc { font: inherit; font-size: 13px; font-weight: 800; background: var(--ink); color: var(--yellow); border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.pl-calc:hover { background: var(--red); color: #FFFFFF; }
.pl-note { font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--red-deep); border: 1px solid currentColor; border-radius: 4px; padding: 1px 5px; margin-left: 6px; }
.pl-empty { padding: 24px 18px; font-weight: 700; }
.pl-foot { padding: 14px 18px; font-size: 13px; color: var(--muted); background: #FAF9F5; }

/* ---------- Каталог: карточки программ ---------- */
.pcard { position: relative; cursor: pointer; transition: transform .25s, box-shadow .25s; }
.pcard:hover { transform: translate(-5px, -5px); box-shadow: 10px 10px 0 var(--ink); }
.pcard-open { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; letter-spacing: inherit; display: block; width: 100%; overflow-wrap: anywhere; text-wrap: balance; }
.pcard-open:hover { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
.pcard-aud { font-size: 14px; }
.pcard-aud b { color: var(--ink); }
.pcard-more { font-weight: 800; }
.cmp { position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 11px 5px 7px; cursor: pointer; z-index: 2; }
.cmp input { width: 16px; height: 16px; accent-color: var(--red); margin: 0; cursor: pointer; }
.cmp:has(input:checked) { background: var(--yellow); }
.pcard .badge { right: auto; left: 18px; }
.pcard .cat { padding-right: 110px; }

/* ---------- Подбор по задаче ---------- */
.scns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; }
.scn { font: inherit; text-align: left; cursor: pointer; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: 4px 4px 0 var(--ink); transition: transform .2s, box-shadow .2s, background .2s; }
.scn span { font-weight: 700; font-size: 17px; line-height: 1.35; }
.scn b { font-family: var(--f-mono); font-size: 13px; color: var(--red-deep); }
.scn b::before { content: "→ "; }
.scn:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--ink); background: var(--ink); color: var(--paper); }
.scn:hover b { color: var(--yellow); }

/* ---------- Таблица сравнения ---------- */
.mx-wrap { border: 2px solid var(--ink); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.mx { width: 100%; border-collapse: collapse; min-width: 860px; font-size: 15px; }
.mx th, .mx td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.mx thead th { background: var(--yellow); border-bottom: 2px solid var(--ink); position: sticky; top: 0; }
.mx tbody th { text-align: left; font-weight: 800; background: #FAF9F5; position: sticky; left: 0; z-index: 1; min-width: 190px; }
.mx thead th:first-child { text-align: left; position: sticky; left: 0; z-index: 2; }
.mx tbody tr:hover td, .mx tbody tr:hover th { background: #FFF9DB; }
.mx tbody tr:first-child td { font-size: 13px; font-weight: 700; color: var(--muted); }
.mx tbody tr:last-child td { font-family: var(--f-mono); font-weight: 700; white-space: nowrap; }
.mx-open { font: inherit; font-weight: 900; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.mx-open:hover { color: var(--red-deep); }
.mk { display: inline-block; font-size: 20px; line-height: 1; }
.mk--yes { color: var(--ink); }
.mk--part { color: var(--red); }
.mk--no { color: #B5B1A6; }
.mk-txt { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 700; font-size: 14px; }
.mx-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Панель сравнения ---------- */
.cmp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: var(--ink); color: var(--paper); border-top: 3px solid var(--yellow); padding-bottom: env(safe-area-inset-bottom, 0px); }
.cmp-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.cmp-bar__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.cmp-bar__list .chip { font-size: 13px; padding: 6px 12px; }
.cmp-bar__actions { display: flex; align-items: center; gap: 14px; }
.cmp-bar .btn { padding: 11px 18px; font-size: 15px; }
.cmp-bar .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.cmp-bar__reset { font: inherit; font-weight: 700; color: var(--muted-on-ink); background: none; border: 0; cursor: pointer; text-decoration: underline; }

/* ---------- Окно с описанием ---------- */
.pdlg { border: 3px solid var(--ink); border-radius: 22px; padding: 0; width: min(880px, calc(100% - 24px)); max-height: calc(100% - 32px); background: var(--paper); color: var(--ink); box-shadow: 14px 14px 0 var(--yellow); }
.pdlg--wide { width: min(1100px, calc(100% - 24px)); }
.pdlg::backdrop { background: rgba(20, 20, 20, .62); }
.pdlg[open] { animation: dlgIn .28s cubic-bezier(.2,.8,.2,1); }
@keyframes dlgIn { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.pdlg__inner { padding: clamp(20px, 3.5vw, 36px); display: flex; flex-direction: column; gap: 22px; }
.pdlg__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pdlg__head > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pdlg__short { font-size: 18px; font-weight: 600; }
.pdlg__close { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); font-size: 26px; font-weight: 900; line-height: 1; cursor: pointer; color: var(--ink); }
.pdlg__close:hover { background: var(--red); color: #FFFFFF; }
.pdlg__aud { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.pdlg__aud b { color: var(--yellow); font-family: var(--f-mono); font-size: 13px; }
.pdlg__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.pdlg__grid section { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pdlg__pair { border-left: 5px solid var(--red); background: var(--yellow-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; display: flex; flex-direction: column; gap: 4px; }
.pdlg__versions { display: flex; flex-direction: column; gap: 8px; }
.pdlg__ver { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.pdlg__ver b { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.pdlg .mx-wrap, .pdlg .table-scroll { border-radius: 12px; }
.mx--dlg { min-width: 560px; }
.pcard .h-md { font-size: clamp(22px, 1.9vw, 27px); }
.pcard-open { overflow-wrap: break-word; hyphens: auto; }
.mk { font-size: 0; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; }
.mk--yes { background: var(--ink); }
.mk--part { border: 2px solid var(--red); background: linear-gradient(90deg, var(--red) 50%, transparent 50%); }
.mk--no { width: 14px; height: 3px; border-radius: 2px; background: #B5B1A6; }

/* ---------- Сплошная заливка вместо обводки (обводка показывала внутренние контуры шрифта) ---------- */
.page-hero .ghost { color: rgba(20, 20, 20, .07); -webkit-text-stroke: 0; }
.stat .o { color: var(--yellow-soft); -webkit-text-stroke: 0; }
.card .roman { color: currentColor; -webkit-text-stroke: 0; opacity: .3; }
.card--ink .roman { color: var(--yellow); opacity: 1; }
.foot-word { color: var(--yellow); -webkit-text-stroke: 0; }
.card .h-md { overflow-wrap: break-word; hyphens: auto; }
.card .h-md.h-md--long { font-size: clamp(20px, 1.8vw, 25px); }

/* ---------- Подбор по задаче: продукт сверху ---------- */
.scn { gap: 8px; }
.scn b { font-family: var(--f-display); font-size: 20px; font-weight: 900; line-height: 1.2; color: var(--ink); }
.scn b::before { content: none; }
.scn span { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--muted); }
.scn i { font-style: normal; font-weight: 800; font-size: 14px; margin-top: auto; padding-top: 6px; color: var(--red-deep); }
.scn:hover b, .scn:hover i { color: var(--yellow); }
.scn:hover span { color: var(--muted-on-ink); }

/* ---------- Подвал: программы 1С ---------- */
.foot-products { display: flex; flex-direction: column; gap: 14px; line-height: 1.4; }
@media (min-width: 980px) { .foot-cols { grid-template-columns: 1fr 2fr 1fr 1.2fr; } }
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-cols .fp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1.5px solid var(--ink-3); border-radius: 999px; background: var(--ink-2); color: #E8E5DC; font-weight: 700; font-size: 14px; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.fp-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); flex: 0 0 9px; }
.fp-chip small { font-family: var(--f-mono); font-size: 11px; color: var(--muted-on-ink); font-weight: 700; }
.fp-trade i { background: var(--red); }
.fp-complex i { background: #FFFFFF; }
.fp-hr i { background: #7FD1C7; }
.fp-docs i { background: #B9A6E8; }
.foot-cols .fp-chip:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); transform: translateY(-2px); }
.fp-chip:hover small { color: var(--ink); }
.fp-chip:hover i { box-shadow: 0 0 0 2px var(--ink); }
.fp-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-cols .fp-links a { color: var(--yellow); font-weight: 800; font-size: 14px; }
.foot-cols .fp-links a:hover { color: #FFFFFF; }
.foot-cols .fp-chips, .foot-cols .fp-links { flex-direction: row; }
/* Белые и жёлтые карточки на тёмной полосе: тёмный текст */
.card:not(.card--ink):not(.card--red) { color: var(--ink); }
/* Шаг 04 — красный круг (правило «чётные — белые» перебивало его) */
.steps li:nth-child(4)::before { background: var(--red); color: #FFFFFF; }

/* ======== Улучшения: доступность, телефон, быстрая связь ======== */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--yellow); font-weight: 800; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); color: var(--yellow); }
.nav-new { display: inline-block; margin-left: 6px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; background: var(--red); color: #FFFFFF; border-radius: 6px; padding: 2px 5px; vertical-align: 2px; letter-spacing: .04em; }
.nav a[aria-current="page"] .nav-new { background: var(--ink); color: var(--yellow); }
@media (max-width: 1260px) {
  .burger { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; border-radius: 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 3px solid var(--ink); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .nav .nav-phone { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 640px) {
  .topbar .tb-addr { display: none; }
  .topbar .wrap { justify-content: center; padding-block: 7px; }
}

/* Быстрая связь на телефоне */
.m-cta { display: none; }
@media (max-width: 760px) {
  .m-cta { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 54; background: var(--ink); border-top: 3px solid var(--yellow); padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .m-cta a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; font-weight: 800; text-decoration: none; font-size: 16px; }
  .m-cta__call { background: var(--paper); color: var(--ink); }
  .m-cta__req { background: var(--red); color: #FFFFFF; }
  .m-cta a:hover { color: inherit; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  body.has-cmp .m-cta { display: none; }
}

/* Калькулятор и прайс на телефоне: без горизонтальной прокрутки */
@media (max-width: 600px) {
  .calc-table { min-width: 0; }
  .calc-table thead { display: none; }
  .calc-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .calc-table td { padding: 0; border: 0; }
  .calc-table td:first-child { grid-column: 1 / -1; font-weight: 700; }
  .calc-table td.mono::before { content: "× "; }
  .pl-table { min-width: 0; }
  .pl-table thead { display: none; }
  .pl-table tr:not(.pl-group) { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .pl-table tr:not(.pl-group) td { padding: 0; border: 0; }
  .pl-table tr:not(.pl-group) td:first-child { grid-column: 1 / -1; }
  .pl-table .sum { text-align: left; }
  .pl-table .pl-act:empty { display: none; }
  .pl-group th { display: block; }
}
