/* Onest — свои файлы, без Google Fonts (152-ФЗ: иначе IP посетителя уходит в Google) */
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyr.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-lat.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Стиль B (макеты mcp-img/images/round6/b_*): необрутализм — толстая обводка, жёсткая тень, фиолетовый + лайм */
:root {
  --paper: #eeeff2;
  --ink: #111214;
  --muted: #555b66;
  --line: #c9cdd4;
  --lime: #c6f432;      /* лайм: старый стартовый лендинг Тендика */
  --violet: #4b3fe0;    /* фиолетовый: новый бренд Тендика */
  --white: #ffffff;
  --wrap: 1240px;
  --bd: 2.5px solid var(--ink);
  --sh: 6px 6px 0 var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.5 Onest, system-ui, sans-serif; overflow-x: clip; }
a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--violet); outline-offset: 3px;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900; margin-bottom: 1.5rem; }
h2.big { font-size: clamp(3rem, 8vw, 6.5rem); letter-spacing: -0.05em; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.i { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.top, main, .foot { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; padding-bottom: 20px; }
.brand { font-weight: 900; text-decoration: none; font-size: 1.1rem; }
.top-tg { font-weight: 700; }

/* Карточка: белая, обводка, жёсткая тень */
.card { background: var(--white); border: var(--bd); border-radius: 10px; box-shadow: var(--sh); }

/* Номер секции с линией: 02 ———— подпись */
.kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-size: .8rem; font-weight: 700; }
.kicker i { flex: 1; height: 2px; background: var(--ink); }
.kicker em { font-style: normal; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; max-width: 18em; border-left: 2px solid var(--ink); padding-left: 10px; line-height: 1.3; }
.note { color: var(--muted); font-size: 1.1rem; max-width: 34em; margin: 0 0 1.5rem; }

/* Hero: заголовок в фиолетовой плашке, справа иллюстрация */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 16px; padding-bottom: 56px; }
.h1box { background: var(--violet); color: var(--white); border-radius: 14px; padding: 36px 40px; box-shadow: 10px 10px 0 var(--ink); }
h1 { font-size: clamp(2.3rem, 4.8vw, 4.3rem); font-weight: 900; letter-spacing: -0.045em; line-height: 1; }
.lead { font-size: 1.2rem; margin: 28px 0 18px; max-width: 32em; }
.offer { display: inline-block; margin: 0 0 24px; padding: 14px 20px; font-weight: 800; font-size: 1.15rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-img { border-radius: 14px; mix-blend-mode: multiply; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 28px;
  border: var(--bd); border-radius: 10px; box-shadow: var(--sh); background: var(--white); color: var(--ink);
  font: 800 1.1rem/1 Onest, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.btn-lime { background: var(--lime); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn .i { width: 22px; height: 22px; }

/* Цифры */
.proof { padding-bottom: 24px; }
.proof ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.proof li { padding: 22px; display: grid; gap: 6px; align-content: start; }
.proof .i { width: 34px; height: 34px; margin-bottom: 8px; }
.proof b { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.proof span { color: var(--muted); font-size: .98rem; }

.sec { padding: 72px 0 24px; }

/* Направления */
.dirs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.dirs a { position: relative; display: grid; gap: 6px; align-content: start; height: 100%; padding: 22px 22px 40px; text-decoration: none; transition: transform .12s, background .12s; }
.dirs a:hover { background: var(--lime); transform: translate(-2px, -2px); }
.dirs b { font-size: 1.15rem; font-weight: 800; padding-right: 22px; }
.dirs span { color: var(--muted); font-size: .95rem; }
.dirs .i { position: absolute; right: 16px; top: 18px; width: 20px; height: 20px; }

/* Кейсы */
.cases-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; margin-bottom: 36px; }
.cases-img { border-radius: 16px; aspect-ratio: 16 / 7; object-fit: cover; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font: 600 1rem/1 Onest, system-ui, sans-serif; padding: 11px 18px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.chip:hover { background: var(--white); }
.chip[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: var(--white); }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case { padding: 22px 24px 24px; }
.case[hidden] { display: none; }
.case header { display: flex; gap: 16px; align-items: center; padding-bottom: 16px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); }
.case header > .i { width: 20px; height: 20px; margin-left: auto; align-self: flex-start; }
.ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--paper); flex: none; }
.case p { margin: 0; }
.case .res { margin-top: 12px; font-weight: 700; background: linear-gradient(transparent 58%, var(--lime) 58%); display: inline; }

/* Технопроекты */
.lab { margin-top: 56px; }
.lab-head { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.lab-head h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; letter-spacing: -0.03em; white-space: nowrap; }
.lab-head i { flex: 1; height: 2px; background: var(--ink); }
.lab-head em { font-style: normal; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; max-width: 20em; border-left: 2px solid var(--ink); padding-left: 10px; line-height: 1.3; }
.lab ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lab li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; font-size: .98rem; line-height: 1.3; box-shadow: 4px 4px 0 var(--ink); }
.lab .ic { width: 42px; height: 42px; }
.lab .i { width: 22px; height: 22px; }

/* Процесс */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps li { position: relative; padding: 22px; }
.steps .n { font-size: .8rem; font-weight: 700; }
.steps .i { position: absolute; right: 20px; top: 18px; width: 40px; height: 40px; stroke-width: 1.8; }
.steps li:nth-child(odd) .i { color: var(--violet); }
.steps h3 { margin: 30px 0 8px; font-size: 1.25rem; }
.steps p { margin: 0; color: var(--muted); font-size: .98rem; }
.price {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 40px; align-items: center;
  margin-top: 28px; padding: 32px 40px; background: var(--violet); color: var(--white); border-radius: 14px; box-shadow: 10px 10px 0 var(--ink);
}
.price b { grid-row: 1; font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.price span { grid-row: 2; grid-column: 1; font-size: 1.15rem; margin-top: 8px; opacity: .95; }
.price em { grid-row: 1 / 3; grid-column: 2; justify-self: end; font-style: normal; text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; line-height: 1.7; max-width: 16em; border-left: 2px solid rgba(255,255,255,.6); padding-left: 24px; }

/* FAQ + форма */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding-bottom: 72px; }
details { margin-bottom: 14px; box-shadow: 4px 4px 0 var(--ink); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 700; font-size: 1.05rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; line-height: .8; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }
.form-card { padding: 32px; box-shadow: 10px 10px 0 var(--ink); }
.form-card h2 { margin-bottom: .6rem; }
.lead-form { display: grid; gap: 16px; }
.lead-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.lead-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-form input:not([type=checkbox]), .lead-form select, .lead-form textarea {
  font: inherit; padding: 13px 14px; border: 2px solid var(--ink); border-radius: 8px; background: var(--white); color: var(--ink); width: 100%;
}
.lead-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.lead-form .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--violet); }
.lead-form .hp { position: absolute; left: -9999px; }
.lead-form .btn { width: 100%; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 700; }

.doc { max-width: 46em; }
.doc h1 { font-size: 2.4rem; margin-bottom: 1.5rem; }

.foot { padding-top: 28px; padding-bottom: 40px; border-top: 2px solid var(--ink); color: var(--muted); font-size: .95rem; }
.foot p { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot p:first-child { color: var(--ink); font-weight: 800; }

@media (max-width: 1080px) {
  .dirs { grid-template-columns: repeat(3, 1fr); }
  .lab ul { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero, .cases-top, .duo { grid-template-columns: 1fr; }
  .hero { gap: 28px; }
  .h1box { padding: 28px; box-shadow: 7px 7px 0 var(--ink); }
  .proof ul, .cases { grid-template-columns: repeat(2, 1fr); }
  .cases-img { order: -1; }
  .price { grid-template-columns: 1fr; padding: 28px; }
  .price em { grid-row: auto; grid-column: 1; justify-self: start; border-left: 0; padding-left: 0; margin-top: 16px; }
  .sec { padding-top: 56px; }
}
@media (max-width: 560px) {
  .top, main, .foot { padding-left: 16px; padding-right: 16px; }
  .top-tg { font-size: .9rem; }
  .h1box { padding: 24px 22px; }
  .btn { width: 100%; }
  .dirs, .cases, .lab ul, .steps { grid-template-columns: 1fr; }
  .proof ul { gap: 14px; }
  .proof li { padding: 16px; }
  .lead-form .two { grid-template-columns: 1fr; }
  .form-card { padding: 22px; box-shadow: 6px 6px 0 var(--ink); }
  .lab-head em, .kicker em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .dirs a { transition: none; }
}

/* Баннер cookie: Метрика только после «Разрешить» */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; max-width: 600px; padding: 16px 20px; background: var(--white); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--ink); font-size: 15px; }
.cookies[hidden] { display: none; }
.cookies p { flex: 1 1 360px; margin: 0; }
.cookies div { display: flex; flex-wrap: wrap; gap: 8px; }
.cookies .btn { padding: 11px 18px; font-size: 15px; width: auto; }
.linkish { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Шапка: «Обо мне» рядом с Telegram */
.top-nav { display: flex; gap: 22px; align-items: center; font-weight: 700; }

/* «Обо мне»: три фазы и карточки проектов с раскрывашкой «Что внутри» */
.steps.three { grid-template-columns: repeat(3, 1fr); }
.projects .res + p { margin-top: 12px; }
.case header > a { margin-left: auto; display: inline-flex; gap: 10px; align-self: flex-start; color: inherit; }
.case header > a + a { margin-left: 0; }
.case header > a .i { width: 20px; height: 20px; }
.case details { margin: 14px 0 0; box-shadow: none; border-top: 2px solid var(--ink); border-radius: 0; }
.case summary { padding: 12px 0 0; font-size: .95rem; }
.case details p { padding: 8px 0 0; font-size: .95rem; }
@media (max-width: 560px) {
  /* Шапка на телефоне: ссылки не ломаются по словам, при нехватке места nav уходит на вторую строку целиком */
  .top { flex-wrap: wrap; gap: 8px 16px; }
  .brand, .top-nav a { white-space: nowrap; }
  .top-nav { gap: 14px; font-size: .9rem; }
}

/* Сцена 3D: постер держит размер, канвас проявляется поверх, когда сцена загрузилась */
.stage { position: relative; overflow: hidden; border-radius: 14px; background: var(--paper); border: var(--bd); box-shadow: var(--sh); }
.stage img { display: block; width: 100%; height: auto; transition: opacity .6s; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s; touch-action: pan-y; }
.stage.on canvas { opacity: 1; }
.stage.on img { opacity: 0; }
.stage-hint { position: absolute; left: 14px; bottom: 10px; font-size: .78rem; color: var(--muted); opacity: 0; transition: opacity .6s 1s; pointer-events: none; }
.stage.on .stage-hint { opacity: 1; }
@media (pointer: coarse) { .stage-hint { display: none; } }
.hero-img { mix-blend-mode: normal; }

/* Блоки появляются по мере прокрутки (только с JS, иначе всё видно сразу) */
/* Блок виден всегда (поисковику и без JS), а при появлении на экране один раз всплывает */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.rv.in { animation: rise .6s ease both; }
@media (prefers-reduced-motion: reduce) { .rv.in { animation: none; } }
/* Направления внутри блока цифр: своя сетка, а не сетка цифр */
.proof .dirs { grid-template-columns: repeat(5, 1fr); gap: 12px; }
.proof .dirs li { padding: 0; display: block; }
@media (max-width: 1080px) { .proof .dirs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .proof .dirs { grid-template-columns: 1fr; } }

/* Направления компактно, под цифрами */
.dirs-row { margin-top: 22px; display: grid; gap: 12px; }
.dirs-label { margin: 0; font-weight: 800; font-size: 1.05rem; }
.dirs.compact { gap: 12px; }
.dirs.compact a { padding: 14px 34px 14px 16px; gap: 3px; }
.dirs.compact b { font-size: 1rem; }
.dirs.compact span { font-size: .85rem; }
.dirs.compact .i { top: 14px; right: 12px; width: 16px; height: 16px; }

/* Кейсы: карусель со стрелками, кнопка «Все проекты» */
.cases-tools { display: grid; gap: 14px; justify-items: start; }
.rail { position: relative; }
.rail-track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 6px 14px; margin: 0 -6px; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track .case { flex: 0 0 min(380px, 82vw); scroll-snap-align: start; }
.rail-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: var(--bd); background: var(--white); box-shadow: var(--sh); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.rail-btn:hover { background: var(--lime); }
.rail-btn.prev { left: -22px; }
.rail-btn.next { right: -22px; }
.rail-btn .i { width: 22px; height: 22px; }
.rail-btn.prev .i { transform: scaleX(-1); }
@media (pointer: coarse) { .rail-btn { display: none; } }
@media (min-width: 861px) { .cases-tools { justify-items: end; } .cases-tools .chips { justify-content: flex-end; } }
@media (max-width: 1240px) { .rail-btn.prev { left: 4px; } .rail-btn.next { right: 4px; } }

/* Хлебные крошки над заголовком вложенных страниц */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--ink); font-weight: 700; }

/* Разбор задачи: демо-экран и как устроено */
.explain .duo { padding-bottom: 0; }
.demo { margin: 0; overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: var(--bd); background: var(--paper); font-size: .85rem; font-weight: 700; }
.demo-bar i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); }
.demo-bar i:first-child { background: var(--lime); }
.demo-bar i:nth-child(2) { background: var(--violet); }
.demo-bar span { margin-left: 8px; }
.demo-body { padding: 20px; display: grid; gap: 12px; }
.demo figcaption { padding: 0 20px 16px; color: var(--muted); font-size: .8rem; }
.msg { max-width: 86%; padding: 12px 16px; border: 2px solid var(--ink); border-radius: 14px 14px 14px 4px; background: var(--white); }
.msg p { margin: 0; font-size: .98rem; }
.msg small { display: block; margin-top: 6px; color: var(--muted); font-size: .8rem; }
.msg.u { justify-self: end; background: var(--violet); color: var(--white); border-radius: 14px 14px 4px 14px; }
.msg.b { background: #f6ffd9; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rows li { display: grid; grid-template-columns: 4.6em 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .k { font-weight: 800; font-size: .9rem; }
.rows p { margin: 0; font-size: .95rem; }
.rows em { font-style: normal; font-size: .75rem; font-weight: 800; padding: 3px 8px; border: 2px solid var(--ink); border-radius: 6px; white-space: nowrap; }
.rows em.ok { background: var(--lime); }
.rows em.warn { background: #ffd2c2; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpis div { border: 2px solid var(--ink); border-radius: 8px; padding: 10px 12px; display: grid; gap: 2px; }
.kpis span, .kpis em { font-size: .75rem; color: var(--muted); font-style: normal; }
.kpis b { font-size: 1.25rem; font-weight: 900; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 170px; padding-top: 8px; }
.bars div { display: grid; grid-template-rows: 1fr auto; height: 100%; gap: 6px; text-align: center; font-size: .75rem; color: var(--muted); }
.bars i { align-self: end; height: var(--h); background: var(--violet); border: 2px solid var(--ink); border-radius: 5px 5px 0 0; }
.how { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 16px; counter-reset: how; }
.how li { position: relative; padding-left: 48px; counter-increment: how; }
.how li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 8px; background: var(--lime); font-weight: 900; }
.how h3 { margin-bottom: 4px; }
.how p { margin: 0; color: var(--muted); }
.for-label { margin: 0 0 8px; font-weight: 800; }
.for { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.for li { border: 2px solid var(--ink); border-radius: 999px; padding: 5px 12px; font-size: .9rem; background: var(--white); }
.proof-note { margin: 0; padding: 16px 18px; font-size: .98rem; background: #f6ffd9; }

/* Все услуги в подвале: перелинковка для людей и робота */
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); }
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr auto; }
  .rows .k { grid-column: 1 / -1; }
  .msg { max-width: 100%; }
}
