/* ==========================================================================
   Нейронка Ася — только своё поверх дизайн-системы сайта Аси.
   Общее (токены, шрифты, шапка, меню, прелоадер, кнопки, появления, подвал,
   страницы документов) — в asya.css: это дословная копия asya-site/src/assets/css/site.css,
   её обновляет tools/sync_engine.py. Здесь не переопределять её классы без нужды.
   ========================================================================== */

:root {
  /* тетрадная полоса поверх цветового поля */
  --stripes: repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 18px);
  --stripes-rose: repeating-linear-gradient(90deg, rgba(169, 78, 92, .07) 0 1px, transparent 1px 18px);
}

.kicker--rose { color: var(--rose); }
.kicker--deep { color: var(--olive-deep); }
.logo__mark { width: 38px; height: 38px; flex: none; transition: transform .6s var(--spring); }
.logo:hover .logo__mark { transform: rotate(-12deg) scale(1.06); }
.btn--line { --bg: transparent; --fg: #fff; --fill: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .75); }
.btn--line:hover { color: var(--olive-deep); }
.foot__cta { margin-top: 22px; }

/* ---------- Первый экран: два поля ---------- */
.nhero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  margin-top: var(--nav-h);
  min-height: min(calc(100svh - var(--nav-h)), 860px);
}
.nhero__olive {
  position: relative;
  display: flex; align-items: center;
  padding: clamp(48px, 7vw, 96px) clamp(28px, 5vw, 80px) clamp(72px, 8vw, 120px) max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  background: var(--olive) var(--stripes);
  color: #fff;
}
.nhero__text { max-width: 620px; }
.nhero__title {
  margin: 26px 0 30px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(62px, 8.2vw, 132px);
  line-height: .92; letter-spacing: -.045em;
  color: var(--paper);
}
.nhero__title .l { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.nhero__title .l > span { display: inline-block; }
.nhero__title .l--pill { overflow: visible; }
.nhero__title .pill { font-size: .86em; margin-left: .04em; color: var(--olive-deep); background: var(--rose); transform: rotate(-4deg); box-shadow: 0 .08em 0 rgba(0, 0, 0, .12); }
.nhero__lede { font-size: clamp(18px, 1.45vw, 21px); line-height: 1.55; max-width: 32em; color: #fff; text-wrap: pretty; }
.nhero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.nhero__for { margin-top: 28px; font-family: var(--italic); font-style: italic; font-size: 19px; color: var(--rose); }
.nhero__rose { position: relative; background: var(--rose) var(--stripes-rose); }
.nhero__art {
  position: absolute; right: -4%; bottom: -2%;
  width: min(82%, 520px);
  transform: rotate(3deg); transform-origin: bottom right;
}

/* вход первого экрана — те же тайминги, что у её .hero, по классу is-loaded от прелоадера */
.js .nhero__title .l > span { transform: translateY(112%); transition: transform 1.25s var(--ease); }
.js .nhero__title .l--pill > .pill { transform: scale(.4) rotate(-14deg); opacity: 0; transition: transform 1s var(--spring) .38s, opacity .35s .38s; }
.is-loaded .nhero__title .l > span { transform: none; }
.is-loaded .nhero__title .l--pill > .pill { transform: rotate(-4deg); opacity: 1; }
.js .nhero__text .kicker, .js .nhero__lede, .js .nhero__cta, .js .nhero__for, .js .chat, .js .nhero__art {
  opacity: 0; translate: 0 18px; transition: opacity .9s .5s, translate 1.1s var(--ease) .5s;
}
.js .chat { transition-delay: .7s; }
.is-loaded .nhero__text .kicker, .is-loaded .nhero__lede, .is-loaded .nhero__cta, .is-loaded .nhero__for,
.is-loaded .chat, .is-loaded .nhero__art { opacity: 1; translate: 0 0; }

/* карточка диалога заходит на оливковое поле — шов между полями */
.chat {
  position: absolute; z-index: 2;
  left: clamp(-120px, -7vw, -40px); top: clamp(56px, 11%, 110px);
  width: min(420px, 82%);
  background: var(--sheet);
  border-radius: var(--r-md);
  box-shadow: var(--lift) var(--lift) 0 var(--olive-deep), 0 30px 60px -30px rgba(58, 68, 48, .55);
  rotate: -2deg;
}
.chat__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px dashed var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
}
.chat__dots { display: flex; gap: 7px; }
.chat__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--olive); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .15); }
.chat__dots i:nth-child(2) { background: var(--rose-dp); }
.chat__dots i:nth-child(3) { background: var(--rose); }
.chat__body { display: grid; gap: 14px; padding: 18px 18px 22px; min-height: 250px; align-content: start; }
.chat__me {
  justify-self: end; max-width: 88%;
  padding: 11px 16px;
  border-radius: 18px 18px 5px 18px;
  background: var(--olive-deep); color: #fff;
  font-size: 15.5px; line-height: 1.45;
  min-height: 1.45em;
}
.chat__me.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--rose); animation: caret .8s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.chat__tool {
  display: inline-flex; align-items: center; gap: 9px; justify-self: start;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--sage-lt); color: var(--olive-dk);
  font-size: 13.5px;
  transition: opacity .4s, transform .5s var(--spring);
}
.chat__tool img { width: 22px; height: 22px; }
.chat__tool b { font-weight: 700; }
.chat__bot { display: grid; gap: 9px; transition: opacity .5s, transform .6s var(--ease); }
.chat__bot p { font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.chat__line { display: block; height: 9px; border-radius: 9px; background: var(--rose-lt); }
.chat__line--short { width: 58%; }
.chat .is-hidden { opacity: 0; transform: translateY(8px); }

/* ---------- Методики: бенто ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0; }
.bento > :nth-child(2) { --d: 90; }
.bento > :nth-child(3) { --d: 0; }
.bento > :nth-child(4) { --d: 90; }
.bento > :nth-child(5) { --d: 180; }
.bento > :nth-child(6) { --d: 0; }
.bento > :nth-child(7) { --d: 90; }
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(24px, 2.6vw, 36px);
  border-radius: var(--r-lg);
}
.tile__n { font-family: var(--italic); font-style: italic; font-size: 20px; color: var(--rose-dp); }
.tile__title { font-family: var(--serif); font-weight: 400; font-size: clamp(27px, 2.5vw, 38px); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.tile p:not(.tile__n):not(.ask) { font-size: 16px; line-height: 1.55; max-width: 34em; }
.tile__art { pointer-events: none; }

/* запрос — как реплика в чате */
.ask {
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 16px 16px 16px 5px;
  font-size: 15px; line-height: 1.4;
  background: var(--sheet); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ask::before { content: "«"; }
.ask::after { content: "»"; }

.tile--olive { background: var(--olive) var(--stripes); color: #fff; }
.tile--deep { background: var(--olive-deep) var(--stripes); color: #fff; }
.tile--rose { background: var(--rose); color: var(--olive-deep); }
.tile--blush { background: var(--rose-lt); }
.tile--sage { background: var(--sage-lt); }
.tile--sheet { background: var(--sheet); box-shadow: var(--lift) var(--lift) 0 var(--olive), 0 1px 0 var(--line-2); }
.tile--check.tile--sheet { box-shadow: var(--lift) var(--lift) 0 var(--rose-dp), 0 1px 0 var(--line-2); }
.tile--olive .tile__n, .tile--deep .tile__n { color: var(--rose); }
.tile--olive .ask, .tile--deep .ask { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.tile--rose .tile__n { color: var(--rose-ink); }
.tile--rose .ask { background: rgba(255, 253, 251, .85); box-shadow: none; }
/* рисунки на тёмных полях — светлой линией */
.tile--olive .tile__art, .tile--deep .tile__art { filter: brightness(0) invert(1); opacity: .9; }

.tile--strategy { grid-column: span 7; min-height: 420px; flex-direction: row; align-items: stretch; }
.tile--strategy .tile__text, .tile--brief .tile__text, .tile--visual .tile__text { display: flex; flex-direction: column; gap: 12px; flex: 1 1 56%; min-width: 0; position: relative; z-index: 1; }
.tile--strategy .tile__art { flex: 0 0 40%; align-self: flex-end; margin: 0 -8px -12px 0; width: 40%; }
.tile--brief { grid-column: span 5; min-height: 420px; }
.tile--brief .tile__text { padding-right: 34%; }
.tile--brief .tile__art { position: absolute; right: -12px; top: 26px; width: 36%; }
.tile--content { grid-column: span 4; }
.tile--content .tile__art { width: 78%; align-self: center; margin: 4px 0 6px; }
.tile--carousel { grid-column: span 4; }
.tile--audit { grid-column: span 4; }
.tile--audit .tile__art { width: 62%; align-self: center; margin: 4px 0 2px; }
.tile--visual { grid-column: span 5; }
.tile--visual .tile__art { width: 52%; max-width: 250px; align-self: flex-end; margin: 4px -8px -16px 0; }
.tile--check { grid-column: span 7; flex-direction: row; gap: clamp(20px, 3vw, 40px); align-items: stretch; }
.tile--check .tile__text { display: flex; flex-direction: column; gap: 12px; flex: 1 1 50%; }

/* карусель — стопка слайдов */
.slides { position: relative; height: 190px; margin: 6px 0 8px; }
.slide {
  position: absolute; left: 50%; top: 0;
  width: 150px; aspect-ratio: 4 / 5;
  border-radius: 14px;
  padding: 14px;
  font-size: 12px; font-weight: 700; color: var(--ink-3);
  background: var(--sheet);
  box-shadow: 0 1px 0 var(--line-2), 0 16px 30px -18px rgba(58, 68, 48, .5);
  transition: transform .7s var(--spring);
}
.slide--3 { transform: translateX(-10%) rotate(9deg); background: var(--rose); color: var(--rose-ink); }
.slide--2 { transform: translateX(-35%) rotate(4deg); background: var(--sage-lt); color: var(--olive-dk); }
.slide--1 {
  transform: translateX(-72%) rotate(-5deg);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--olive-deep); color: #fff;
}
.slide--1 b { font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.1; letter-spacing: -.02em; }
.slide--1 i { font-style: normal; font-size: 11px; color: var(--rose); }
.tile--carousel:hover .slide--3, .tile--carousel.is-pressed .slide--3 { transform: translateX(8%) rotate(14deg); }
.tile--carousel:hover .slide--2, .tile--carousel.is-pressed .slide--2 { transform: translateX(-30%) rotate(5deg); }
.tile--carousel:hover .slide--1, .tile--carousel.is-pressed .slide--1 { transform: translateX(-86%) rotate(-9deg); }

/* чеклист */
.checks { flex: 1 1 44%; display: grid; gap: 10px; align-content: center; padding: 18px 20px; border-radius: 18px; background: var(--rose-lt); list-style: none; margin: 0; }
.checks li { position: relative; padding-left: 34px; font-size: 15.5px; line-height: 1.35; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--rose-dp) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* ---------- Как начать: розовое поле ---------- */
.how { position: relative; z-index: 1; padding: clamp(84px, 10vw, 150px) 0; background: var(--rose) var(--stripes-rose); color: var(--olive-deep); }
.how__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px clamp(40px, 6vw, 96px); align-items: center; }
.how__head .h2 { margin-top: 20px; }
.how__art { width: min(100%, 460px); margin-top: 36px; }
.steps { display: grid; gap: 18px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative; counter-increment: step;
  padding: 26px 28px 26px 104px;
  border-radius: var(--r-md);
  background: var(--sheet);
  box-shadow: var(--lift) var(--lift) 0 var(--olive-deep);
}
.steps li:nth-child(2) { --d: 90; margin-left: clamp(0px, 3vw, 44px); box-shadow: var(--lift) var(--lift) 0 var(--rose-dp); }
.steps li:nth-child(3) { --d: 180; margin-left: clamp(0px, 6vw, 88px); box-shadow: var(--lift) var(--lift) 0 var(--olive); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 26px; top: 24px;
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  font-family: var(--serif); font-size: 28px; line-height: 1;
  color: #fff; background: var(--olive-deep);
}
.steps li:nth-child(2)::before { background: var(--rose-dp); }
.steps li:nth-child(3)::before { background: var(--olive); }
.steps .h3 { color: var(--ink); margin-bottom: 6px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* ---------- Честно: глубокое оливковое поле ---------- */
.honest { position: relative; z-index: 1; padding: clamp(84px, 10vw, 150px) 0; background: var(--olive-deep) var(--stripes); color: rgba(255, 255, 255, .88); }
.honest__title {
  margin: 22px 0 clamp(40px, 5vw, 64px);
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(40px, 6vw, 88px); line-height: 1; letter-spacing: -.04em;
  color: var(--paper); text-wrap: balance;
}
.honest__accent { font-family: var(--italic); font-style: italic; font-weight: 400; color: var(--rose); }
.honest__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.honest__col { padding: 30px 32px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.honest__col:last-child { --d: 90; background: rgba(214, 124, 134, .14); box-shadow: inset 0 0 0 1px rgba(243, 193, 192, .25); }
.honest__head { margin-bottom: 16px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-lt); }
.honest__col:last-child .honest__head { color: var(--rose); }
.honest__list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.honest__list li { position: relative; padding-left: 32px; line-height: 1.5; }
.honest__list li::before { position: absolute; left: 0; top: 0; font-weight: 900; }
.honest__list--yes li::before { content: "✓"; color: #B9C6A6; }
.honest__list--no li::before { content: "✕"; color: var(--rose); }
.honest__data { margin-top: 32px; max-width: 46em; font-size: 16px; color: rgba(255, 255, 255, .75); }
.honest__data a { color: #fff; }
.honest__data a:hover { color: var(--rose); }

/* ---------- Автор ---------- */
.author__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px clamp(40px, 7vw, 110px); align-items: center; }
.author .polaroid { justify-self: center; width: min(100%, 420px); }
.author__text .h2 { margin: 18px 0 20px; }
.author__text .quote-big { margin: 34px 0 30px; }

/* ---------- Документы и поддержка (макет — её .doc) ---------- */
.doc__toc-title { margin-top: 28px; }
.doc__summary { margin: 22px 0 8px; padding: 22px 26px; border-radius: var(--r-md); background: var(--sage-lt); }
.doc__summary .kicker { margin-bottom: 8px; color: var(--olive-dk); }
.doc__en { margin-top: 56px; padding-top: 36px; border-top: 1px dashed var(--line); }
.doc__en p { font-size: 15.5px; color: var(--ink-2); }
.doc__en b { color: var(--ink); }
.doc__mail { margin: 26px 0 8px; }
.mailcard {
  display: grid; gap: 4px; justify-items: start;
  padding: 26px 30px;
  border-radius: var(--r-md); background: var(--paper);
  text-decoration: none;
  box-shadow: var(--lift) var(--lift) 0 var(--rose-dp), inset 0 0 0 1px var(--line-2);
  transition: transform .6s var(--spring), box-shadow .6s var(--ease);
}
.mailcard:hover { transform: translateY(-4px); box-shadow: 12px 14px 0 var(--rose-dp), inset 0 0 0 1px var(--line-2); }
.mailcard__label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--olive); }
.mailcard__addr { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.mailcard__who { font-size: 15px; color: var(--ink-3); }
.doc__body [data-faq] { margin-top: 8px; }
.doc__body .qa__q { font-size: 18px; }

.notfound { display: grid; justify-items: center; gap: 18px; padding: calc(var(--nav-h) + clamp(40px, 8vw, 110px)) var(--gutter) clamp(60px, 10vw, 140px); text-align: center; }
.notfound img { width: 260px; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 1100px) {
  .tile--strategy, .tile--brief, .tile--visual, .tile--check { grid-column: span 12; }
  .tile--content, .tile--carousel { grid-column: span 6; }
  .tile--audit { grid-column: span 12; }
  .tile--strategy, .tile--brief { min-height: 0; }
}
@media (max-width: 900px) {
  .nhero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .nhero__olive { padding: 44px var(--gutter) 64px; }
  .nhero__rose { min-height: 560px; overflow: hidden; }
  .chat { left: var(--gutter); top: 36px; width: min(400px, calc(100% - var(--gutter) * 2 - 12px)); }
  .nhero__art { width: min(62%, 360px); }
  .how__grid, .author__grid { grid-template-columns: minmax(0, 1fr); }
  .honest__cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .nhero__title { font-size: clamp(56px, 17vw, 80px); }
  .nhero__rose { min-height: 520px; }
  .nhero__art { width: 58%; right: -6%; }
  .tile--content, .tile--carousel, .tile--audit { grid-column: span 12; }
  .tile--strategy, .tile--check { flex-direction: column; }
  .tile--strategy .tile__art { width: 70%; align-self: flex-end; margin: 0 -10px -14px 0; }
  .tile--brief .tile__text { padding-right: 0; }
  .tile--brief .tile__art { position: static; width: 62%; align-self: flex-end; margin: 0 -12px -18px 0; }
  .steps li { padding: 88px 22px 24px; margin-left: 0 !important; }
  .steps li::before { left: 22px; top: 20px; width: 50px; height: 50px; font-size: 24px; }
  .honest__col { padding: 24px 22px; }
  .mailcard { padding: 22px; }
}
@media (max-width: 680px) {
  /* в шапке тесно: почта — в меню и подвале, имя в одну строку */
  .nav__right .icon-btn:not(.burger) { display: none; }
  .logo__name { white-space: nowrap; }
}
@media (max-width: 430px) {
  /* логотип, «Подключить» и бургер не влезают в 390 px на 5 px — значок декоративный */
  .logo__mark { display: none; }
}
