/* Стили блоков страницы, сверху вниз */

/* ---------- 0. Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand__mark { flex: none; width: 44px; }
.brand__mark svg { width: 44px; height: auto; overflow: visible; }
.brand__name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.brand__role { white-space: nowrap; }
@media (max-width: 600px) {
  .brand__name > span { display: block; }
  .brand__sep { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand__role { color: var(--link); }
}
@media (max-width: 420px) {
  .site-header__inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand__mark, .brand__mark svg { width: 38px; }
  .brand__name { font-size: 12.5px; }
  .site-header__actions { gap: 4px; }
  .site-header .btn--small { padding: 8px 10px; font-size: 14px; }
}
.site-header__actions { display: flex; align-items: center; gap: 10px; flex: none; }

/* «МЕ / НЮ»: четыре буквы сеткой 2×2, колонки строго друг под другом */
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px; padding: 4px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
  font: inherit;
}
.menu-toggle__grid {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 0.04em;
  font-size: 18px; font-weight: 800; line-height: 0.92;
  text-align: center;
}
.menu-toggle__grid > :nth-child(odd) { justify-self: end; }
.menu-toggle__grid > :nth-child(even) { justify-self: start; }
.menu-toggle:hover .menu-toggle__grid { color: var(--link); }

.site-menu { position: absolute; left: 0; right: 0; top: 100%; border-top: 1px solid var(--card-line); }
.site-menu ul { list-style: none; margin: 0; padding-top: 16px; padding-bottom: 24px; display: grid; gap: 4px; }
.site-menu a {
  display: block; padding: 10px 0;
  color: var(--ink); text-decoration: none;
  font-size: clamp(24px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em;
}
.site-menu a:hover { color: var(--link); }

/* ---------- 1. Первый экран ---------- */
.hero { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(36px, 6vw, 72px); }
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.hero__mark { display: none; }
@media (min-width: 1024px) {
  .hero__mark { display: block; position: absolute; right: var(--gutter); top: 50%; width: clamp(240px, 26vw, 340px); transform: translateY(-50%) rotate(-5deg); }
  .hero__mark svg { overflow: visible; }
}
.hero__corner--top { margin-bottom: clamp(28px, 6vw, 72px); }
.hero h1 { max-width: 17ch; margin: 18px 0 20px; }
.hero h1 .marker { white-space: nowrap; }
.hero__sub { color: var(--muted); max-width: 52ch; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.facts {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  color: var(--muted); font-size: 15px;
}
.facts li::before { content: "✓"; color: var(--link); font-weight: 700; margin-right: 8px; }
.hero__corner--bottom {
  align-self: stretch;
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: clamp(40px, 7vw, 88px); color: var(--muted);
}

/* Статус-строка */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 6px 12px;
  border: 1px solid var(--card-line); background: var(--card);
  font-size: var(--fs-label); font-weight: 300; text-transform: uppercase; letter-spacing: 0.04em;
  max-width: 100%;
}
.status__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Общие карточки и подписи ---------- */
.card { background: var(--card); border: 1px solid var(--card-line); padding: clamp(18px, 2.4vw, 28px); }
.card h3 { margin-bottom: 10px; }
.section-cta { margin: clamp(28px, 4vw, 44px) 0 0; }
.tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  border: 1px solid var(--card-line); padding: 3px 8px;
  font-size: 12.5px; font-weight: 300; text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- 2. Знакомо? ---------- */
.pain-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .pain-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.pain-grid .card { font-size: clamp(18px, 1.4vw, 22px); font-weight: 600; line-height: 1.35; position: relative; padding-left: 52px; }
.pain-grid .card::before {
  content: "?"; position: absolute; left: 18px; top: clamp(18px, 2.4vw, 28px);
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800;
}
.pain__summary { margin-top: clamp(24px, 3vw, 36px); font-size: clamp(18px, 1.4vw, 22px); font-weight: 600; max-width: 40ch; }

/* ---------- 3. Услуги ---------- */
.service-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .service-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }
.service { display: flex; flex-direction: column; }
.service .muted { flex: 1; font-size: 16px; }
.service--first { border-color: var(--ink); }
.service__note { color: var(--link); margin-bottom: 10px; font-weight: 400; }
.price { margin: 8px 0 14px; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.service__link { font-weight: 600; align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- 5. Работы ---------- */
.works-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 900px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .work--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 28px; align-items: start; }
  .work--featured .browser { grid-column: 1; }
  .work--featured .work__shot { grid-column: 1; }
  .work--featured .work__body { grid-column: 2; grid-row: 1 / span 2; }
}
.work { padding: 0; overflow: hidden; }
.browser { display: flex; gap: 6px; padding: 10px 12px; background: var(--card-line); }
.browser span { width: 9px; height: 9px; border-radius: 50%; background: var(--field-line); opacity: .6; }
.work__shot { width: 100%; height: auto; border-bottom: 1px solid var(--card-line); }
.work--featured .work__shot { border-bottom: 0; }
.work__body { padding: clamp(18px, 2.4vw, 28px); }
.work__body p { font-size: 16px; margin-bottom: 8px; }
.work__k { font-weight: 600; }
.work__live { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-weight: 600; }
.works__sub { margin: clamp(32px, 4vw, 48px) 0 16px; }
.bots-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .bots-grid { grid-template-columns: repeat(3, 1fr); } }
.bot__shot { width: 100%; height: auto; border: 1px solid var(--card-line); margin-bottom: 12px; }

/* ---------- 6. Как я работаю ---------- */
.process { display: grid; gap: 28px; }
@media (min-width: 900px) { .process { grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; } }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 16px 0 16px 56px; border-top: 1px solid var(--card-line);
}
.steps li:last-child { border-bottom: 1px solid var(--card-line); }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 16px;
  font-weight: 800; color: var(--link);
}
.guarantees { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guarantees .card { font-weight: 600; font-size: 16px; border-left: 4px solid var(--accent); }

/* ---------- 8. Обо мне ---------- */
.about { display: grid; gap: 28px; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; } }
.photo { width: 100%; height: auto; border: 1px solid var(--card-line); }
.team { margin: 20px 0; }
.team p { font-size: 16px; }
.team__last { font-weight: 600; margin-bottom: 0; }
.about__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.about__gh { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- 9. Отзывы ---------- */
.reviews-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(2, 1fr); } }
.review blockquote { margin: 0 0 12px; font-size: 18px; }
.review__who { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- 10. Вопросы ---------- */
.faq__list { max-width: 900px; }
.faq details { border-top: 1px solid var(--card-line); }
.faq details:last-child { border-bottom: 1px solid var(--card-line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  min-height: 56px; padding: 14px 0;
  font-size: clamp(17px, 1.3vw, 20px); font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 28px; font-weight: 300; color: var(--link); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* ---------- 12. Подвал ---------- */
.site-footer { padding: 40px 0 32px; }
.footer { display: grid; gap: 14px; }
.footer a { color: var(--ink); }
.footer__legal { margin: 0; font-size: 15px; }
.footer__contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.footer__made { color: var(--muted); margin-top: 8px; }

/* ---------- 7. Цены (чёрный блок) ---------- */
.prices__sub { color: var(--muted); margin-top: -12px; }
.pilot { margin: 20px 0 28px; padding: 14px 16px; border: 1px solid var(--accent); font-weight: 600; max-width: none; }
.pilot .marker { margin-right: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; }
.price-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .price-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.price-card.is-featured { border: 2px solid var(--accent); }
.price-row { margin: 6px 0 4px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.price-old { color: var(--muted); font-size: 18px; }
.price-pilot, .price-row .price { font-size: clamp(28px, 2.4vw, 34px); font-weight: 800; letter-spacing: -0.01em; }
.price-term { color: var(--muted); margin-bottom: 16px; }
.price-k { margin: 14px 0 6px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.includes, .excludes { list-style: none; margin: 0; padding: 0; font-size: 15.5px; line-height: 1.45; display: grid; gap: 6px; }
.includes li, .excludes li { position: relative; padding-left: 22px; }
.includes li::before { content: "✓"; position: absolute; left: 0; color: var(--link); font-weight: 700; }
.excludes li { color: var(--muted); }
.excludes li::before { content: "—"; position: absolute; left: 0; }
.price-extra { margin: 10px 0 0; font-size: 14.5px; color: var(--muted); }
.prices__note { margin-top: 24px; color: var(--muted); max-width: none; }

/* ---------- 4. Демо «Алекс» ---------- */
.demo__lead { margin-top: -12px; margin-bottom: 28px; }
.demo__stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.demo__stage > * { min-width: 0; }
@media (min-width: 960px) { .demo__stage { grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; } }
.no-js .demo-live { display: none !important; }
.js .demo-static { display: none; }
.chat { background: var(--card); border: 1px solid var(--ink); display: flex; flex-direction: column; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--card-line); }
.chat__ava { width: 36px; height: 36px; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-weight: 800; }
.chat__who { display: grid; font-size: 15px; line-height: 1.25; }
.chat__who span { font-size: 12.5px; color: var(--link); }
.demo-badge { margin-left: auto; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; }
.chat__msgs, .demo-static { height: 380px; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.demo-static { height: auto; }
.m { max-width: 86%; padding: 10px 12px; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.m--bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--card-line); }
.m--me { align-self: flex-end; background: var(--ink); color: var(--bg); }
.typing { align-self: flex-start; font-size: 13px; color: var(--muted); }
.demo-static__note { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.chat__quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px; }
.q {
  min-height: 40px; padding: 8px 12px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--field-line);
  font: inherit; font-size: 14.5px; font-weight: 600; text-align: left;
}
.q:hover { border-color: var(--ink); background: var(--bg); }
.chat__form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--card-line); }
.chat__form input {
  flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px;
  border: 1.5px solid var(--field-line); border-radius: 0; background: #fff; color: var(--ink); font: inherit; font-size: 16px;
}
.demo__side h3 { margin-bottom: 12px; }
.tg { background: #E8F3EC; border: 1px solid var(--card-line); padding: 16px; min-height: 150px; font-size: 15px; }
.tg__empty { color: var(--muted); margin: 0; font-size: 15px; }
.lead-card { background: #fff; border-left: 4px solid var(--accent); padding: 12px 14px; white-space: pre-line; line-height: 1.5; }
.demo__split { display: grid; gap: 12px; margin: 16px 0; }
@media (min-width: 560px) { .demo__split { grid-template-columns: 1fr 1fr; } }
.demo__split .card { font-size: 15px; }
.demo__split b { display: block; margin-bottom: 6px; font-size: 16px; }
.demo__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 11. Финал и форма (чёрный блок) ---------- */
.contact { display: grid; gap: 32px; }
@media (min-width: 960px) { .contact { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; } }
.contact .status { margin: 4px 0 24px; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.contact__list a { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.contact__list .btn { color: var(--on-accent); }
.contact__k { width: 76px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.copy-btn {
  min-height: 36px; padding: 6px 10px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--field-line); font: inherit; font-size: 13px;
}
.copy-btn:hover { border-color: var(--ink); }
.lead-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.field input[type="text"], .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); color: var(--ink);
  border: 1.5px solid var(--field-line); border-radius: 0; font: inherit; font-size: 16px;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__err { margin: 0; color: var(--error); font-size: 14px; }
.field__err:empty { display: none; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: 10px; }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.field--check label { font-weight: 400; font-size: 14.5px; }
.field--check .field__err { grid-column: 1 / -1; }
.lead-form__btn { width: 100%; }
.lead-form__btn:disabled { opacity: .7; cursor: progress; }
.form-result { display: none; margin: 0; padding: 12px 14px; font-weight: 600; }
.form-result:target, .form-result.is-shown { display: block; }
.form-result--ok { border-left: 4px solid var(--accent); background: var(--bg); }
.form-result--fail { border-left: 4px solid var(--error); background: var(--bg); }
.form-result--fail p { margin: 0 0 10px; }
.form-result--fail .btn { color: var(--ink); }

/* ---------- Анимации (только с JS и без «меньше движения») ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .marker--fill {
    background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 0 / 0% 100%;
    transition: background-size .7s cubic-bezier(.2, .7, .2, 1) .15s;
  }
  .js .marker--fill.is-in { background-size: 100% 100%; }
  .js .swash { stroke-dasharray: 1; stroke-dashoffset: 1; animation: swash-draw .8s .25s ease-out forwards; }
}
@keyframes swash-draw { to { stroke-dashoffset: 0; } }

/* ---------- Плашка cookie ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 560px; margin-left: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 16px; border: 1px solid var(--card-line);
  font-size: 14.5px; line-height: 1.45;
}
.cookie p { margin: 0; flex: 1 1 260px; }

/* ---------- Страница политики ---------- */
.privacy .container { max-width: calc(820px + 2 * var(--gutter)); }
.privacy h1 { font-size: clamp(30px, 4vw, 48px); margin: 12px 0 8px; }
.privacy h2 { font-size: clamp(20px, 2vw, 26px); margin: 32px 0 10px; }
