/* ============================================================
   МОКАП ДИЗАЙНА — светлая тема, две краски.
   Это черновик вне Django: правим здесь, в проект переносим
   только после того, как дизайн согласован.
   ============================================================ */

/* Шрифт self-hosted (скачан из Google Fonts, раздаётся с нашего домена) */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.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+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  /* Всего две краски: почти-белая бумага и почти-чёрная тушь */
  --bg: #f5f3ee;
  --surface: #fffefb;
  --ink: #111110;
  --muted: #6d6862;
  --line: rgba(17, 17, 16, 0.16);
  --line-soft: rgba(17, 17, 16, 0.09);
  --radius: 4px;
  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.62 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1.02; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container--narrow { max-width: 760px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--surface); padding: 10px 16px;
}
.skip:focus { left: 0; }

/* Тонкая линия — единственный «разделитель» в дизайне */
.hair { border-top: 1px solid var(--line); }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.header.is-stuck { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.logo__mark { width: 26px; height: 26px; flex: 0 0 auto; }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 0.9rem; color: var(--muted); }
.nav a { position: relative; padding-bottom: 2px; transition: color 0.2s ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.header__actions { display: flex; align-items: center; gap: 10px; }

/* Мобильное меню: круглая кнопка «···» и выдвижная плитка с разделами */
.burger {
  display: none; position: relative; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer;
}
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 3.5px; height: 3.5px; border-radius: 50%; background: currentColor;
}
.burger span:nth-child(1) { transform: translate(-50%, -50%) translateX(-8px); }
.burger span:nth-child(2) { transform: translate(-50%, -50%); }
.burger span:nth-child(3) { transform: translate(-50%, -50%) translateX(8px); }
.burger[aria-expanded="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.menu {
  position: absolute; top: 100%; left: 0; right: 0; padding: 4px 0 20px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.menu:not([hidden]) { box-shadow: 0 18px 40px rgba(17, 17, 16, 0.07); }
.menu__links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu__links a {
  padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.95rem; color: var(--ink); transition: background 0.2s ease, color 0.2s ease;
}
.menu__links a:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (min-width: 981px) { .menu { display: none; } }

/* ---------- Кнопки: только тушь, без цвета и градиентов ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--surface);
  border: 1px solid var(--ink); border-radius: 999px;
  padding: 13px 24px; font: inherit; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: #33322f; border-color: #33322f; }
.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn--ghost:hover { background: transparent; border-color: var(--ink); }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }
.btn--block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; cursor: wait; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; border-bottom: 1px solid var(--line); padding-bottom: 3px;
  transition: border-color 0.2s ease;
}
.link-arrow:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(52px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero__grid { position: relative; }
.hero__content { position: relative; z-index: 1; max-width: 780px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex: 0 0 auto; }
.hero h1 { margin: 22px 0 0; }
.hero__lead {
  margin-top: 24px; max-width: 46ch;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem); color: var(--muted); line-height: 1.6;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Вырезанный портрет с растворёнными краями и мягким ореолом.
   Края растворены прямо в альфе картинки (mockup/make_images.py): снизу и по
   бокам силуэт уходит в прозрачность, поэтому у фотографии нет прямых срезов.
   Подача — большой мягкий круг с полным силуэтом: ноутбук виден, обод
   вырезан в самой картинке (mockup/make_images.py) и притушен по краю. */
.hero__visual {
  position: absolute; right: 0; bottom: 0; z-index: 0;
  width: min(48%, 560px); margin: 0; pointer-events: none;
}
.hero__photo {
  position: relative;
  width: 100%; height: auto; display: block;
  opacity: 0.88;
  /* Дымка вокруг круга: свечение по ободу + широкая мягкая тень снизу.
     drop-shadow строит форму точно по альфе круга — без пятен в CSS. */
  filter: grayscale(1) contrast(1.04)
          drop-shadow(0 0 34px rgba(17, 17, 16, 0.18))
          drop-shadow(0 30px 64px rgba(17, 17, 16, 0.22));
  transition: filter 0.5s ease;
}
.hero__photo:hover { filter: grayscale(1) contrast(1.12); }

.hero__foot {
  margin-top: clamp(32px, 4.5vw, 56px); padding-top: 26px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 5vw, 64px); align-items: start;
}
.hero__platform {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  font-size: 0.86rem; color: var(--muted);
}
.hero__platform-label { flex: 0 0 100%; }
.ya-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.ya-brand strong { font-weight: 800; }
.ya-brand__mark { width: 20px; height: 20px; flex: 0 0 auto; }
.cl-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; }
.cl-brand__mark { width: 20px; height: 20px; flex: 0 0 auto; }

.stats { display: flex; gap: clamp(24px, 4vw, 56px); margin-left: auto; }
.stats__item { min-width: 0; }
.stats dt { font-size: 0.78rem; color: var(--muted); }
.stats dd {
  margin: 4px 0 0; font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 800; letter-spacing: -0.03em;
}

/* ---------- Секции ---------- */
.section { padding: clamp(44px, 5.5vw, 76px) 0; }
.section--alt { background: none; }

.section__head {
  border-top: 1px solid var(--line); padding-top: 24px; margin-bottom: clamp(36px, 5vw, 64px);
}
.eyebrow {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow__num { color: var(--ink); font-variant-numeric: tabular-nums; }
.section__head h2 { margin-top: 18px; max-width: 26ch; }
.section__sub { margin-top: 16px; max-width: 62ch; color: var(--muted); }

/* Сетки: структура держится на линиях и воздухе, не на рамках */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.card {
  border-top: 1px solid var(--line-soft);
  padding: 26px 28px 30px;
}
.card:nth-child(3n + 1) { padding-left: 0; }
.card:nth-child(3n) { padding-right: 0; }
.card h3 + p, .card h3 + .tags { margin-top: 12px; }
.card p { color: var(--muted); font-size: 0.94rem; line-height: 1.62; }
.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; }
.tags li {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.tags li + li { position: relative; padding-left: 15px; }
.tags li + li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 4px; height: 4px; border-radius: 50%; background: var(--line);
}

/* Персональный агент */
.personal { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); }
.personal__text { margin-top: 20px; color: var(--muted); max-width: 48ch; }
.personal .btn { margin-top: 28px; }
.personal__list { border-top: 1px solid var(--line); }
.personal__list li {
  padding: 15px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 0.94rem; color: var(--muted);
}
.personal__list li strong { color: var(--ink); font-weight: 700; }

/* Платформы */
.platforms__label {
  border-top: 1px solid var(--line); padding-top: 20px;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.platforms { margin-top: clamp(48px, 6vw, 84px); }
.platforms__name { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: -0.03em; }
.platforms__caption {
  margin-top: 12px; max-width: 56ch; color: var(--muted); font-size: 0.96rem;
}
.platforms .grid { margin-top: 32px; }
.platforms + .platforms { margin-top: clamp(40px, 5vw, 64px); }

/* Процесс */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.step { border-top: 1px solid var(--line); padding: 24px 28px 0 0; }
.step__num {
  display: block; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  letter-spacing: -0.05em; color: var(--line); line-height: 1;
}
.step h3 { margin-top: 18px; }
.step p { margin-top: 10px; color: var(--muted); font-size: 0.94rem; }

/* Обо мне */
.about { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 6vw, 88px); }
.about__text > p { margin-top: 18px; color: var(--muted); max-width: 56ch; }
.about__role { color: var(--ink) !important; font-weight: 600; }
.checklist { margin-top: 26px; border-top: 1px solid var(--line-soft); }
.checklist li {
  display: flex; gap: 12px; padding: 12px 0; font-size: 0.94rem;
  border-bottom: 1px solid var(--line-soft); color: var(--muted);
}
.checklist li::before { content: "—"; color: var(--ink); flex: 0 0 auto; }
.about__stack { border-top: 1px solid var(--line); padding-top: 20px; }
.about__stack h3 {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 18px; }
.chips li { font-size: 0.88rem; color: var(--muted); }
.chips li:not(:last-child)::after { content: ","; }

/* Документы: без превью — только описание и ссылка на файл */
.docs-grid { grid-template-columns: repeat(2, 1fr); }
.doc { display: block; border-top: 1px solid var(--line); padding: 24px 0 0; }
.doc + .doc { padding-left: 32px; }
.doc__body { margin-top: 0; }
.doc__tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.doc h3 { margin-top: 10px; }
.doc__org { margin-top: 6px; font-size: 0.86rem; color: var(--muted); }
.doc__body p { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }
.doc__link {
  display: inline-block; margin-top: 16px; font-size: 0.9rem; font-weight: 600;
  border-bottom: 1px solid var(--line); padding-bottom: 3px;
}
.doc:hover .doc__link { border-color: var(--ink); }

/* FAQ */
.faq { border-top: 1px solid var(--line); max-width: 820px; }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__item summary {
  display: flex; align-items: center; gap: 16px; padding: 20px 0;
  font-size: 1.02rem; font-weight: 600; cursor: pointer; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__icon {
  position: relative; margin-left: auto; width: 14px; height: 14px; flex: 0 0 auto;
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; background: var(--ink); transition: transform 0.25s var(--ease);
}
.faq__icon::before { left: 0; right: 0; top: 6.5px; height: 1.5px; }
.faq__icon::after { top: 0; bottom: 0; left: 6.5px; width: 1.5px; }
.faq__item[open] .faq__icon::after { transform: scaleY(0); }
.faq__item p { padding: 0 40px 22px 0; color: var(--muted); max-width: 68ch; }

/* Контакты — крупная типографика вместо карточек */
.contacts { border-top: 1px solid var(--line); }
.contacts__item {
  display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap;
  padding: 22px 0; border-bottom: 1px solid var(--line-soft);
}
.contacts__item span { flex: 0 0 110px; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contacts__item strong {
  font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -0.035em;
  border-bottom: 2px solid transparent; transition: border-color 0.25s var(--ease);
}
.contacts__item:hover strong { border-bottom-color: var(--ink); }

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); margin-top: clamp(48px, 6vw, 80px); }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between;
  padding: 28px 32px 40px; font-size: 0.86rem; color: var(--muted);
}
.footer__links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer a:hover { color: var(--ink); }

/* ---------- Чат консультанта ---------- */
.chat { position: fixed; right: 24px; bottom: 24px; z-index: 60; }
.chat__toggle {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--surface); border: none; cursor: pointer;
  box-shadow: 0 10px 30px rgba(17, 17, 16, 0.22);
  transition: transform 0.25s var(--ease);
}
.chat__toggle:hover { transform: translateY(-2px); }
.chat__panel {
  position: absolute; right: 0; bottom: 72px; width: min(384px, calc(100vw - 48px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(17, 17, 16, 0.16);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat__panel[hidden] { display: none; }
.chat__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
}
.chat__close { background: none; border: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.chat__close:hover { color: var(--ink); }
.chat__body {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; height: 340px; overflow-y: auto;
}
.chat__msg { max-width: 88%; padding: 11px 14px; border-radius: 12px; font-size: 0.92rem; line-height: 1.55; }
.chat__msg--bot { background: #eeece6; color: var(--ink); border-bottom-left-radius: 3px; }
.chat__msg--user { background: var(--ink); color: var(--surface); margin-left: auto; border-bottom-right-radius: 3px; }
.chat__form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.chat__form textarea {
  flex: 1 1 auto; resize: none; border: none; background: none; font: inherit;
  font-size: 0.94rem; max-height: 100px; outline: none; color: var(--ink);
}
.chat__form button {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ink); color: var(--surface); border: none; cursor: pointer;
}
.chat__msg--warn { background: #e4e1da; }

/* Появление при скролле.
   В мокапе анимация выключена — контент виден сразу, чтобы оценивать вёрстку.
   В проекте вернём: main.js уже умеет .reveal + .is-visible, для этого
   достаточно раскомментировать блок ниже. */
/*
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
*/
.reveal { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .header__actions { margin-left: auto; }
  .burger { display: inline-flex; }
  .personal, .about { grid-template-columns: 1fr; }
  /* На узких экранах наложение убираем: фото уходит под текст */
  .hero__grid { display: flex; flex-direction: column; }
  .hero__content { order: 1; }
  .hero__visual {
    position: static; order: 2; width: min(64%, 300px); margin: 28px 0 0;
  }
  .hero__foot { grid-template-columns: 1fr; }
  .stats { margin-left: 0; }
  .grid, .steps, .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3n + 1), .card:nth-child(3n) { padding-left: 22px; padding-right: 22px; }
  .card:nth-child(2n + 1) { padding-left: 0; }
  .card:nth-child(2n) { padding-right: 0; }
  .docs-grid .doc + .doc { padding-left: 0; }
}
@media (max-width: 620px) {
  .container, .footer__inner { padding-left: 20px; padding-right: 20px; }
  .menu__links { grid-template-columns: 1fr; }
  .grid, .steps, .docs-grid { grid-template-columns: 1fr; }
  .card, .card:nth-child(2n + 1), .card:nth-child(2n) { padding-left: 0; padding-right: 0; }
  .chat { right: 16px; bottom: 16px; }
}


/* ---------- Страница политики и 404 ---------- */
.policy__body { margin-top: 26px; }
.policy__body p { margin-bottom: 15px; }
.policy__body p:last-child { margin-bottom: 0; }
.policy__body .btn { margin-top: 26px; }
.notfound { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 14px; }
.notfound .btn { margin-top: 28px; }
