/* hereinafter — лендинг. Логотип-облако и строка «что это», мозаика из шести свойств программы, поле почты.
   Знаки связаны с блоками: срезаны краем, сидят на кромке, заходят в соседний блок. */

section[id], p[id] { scroll-margin-top: 96px; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  z-index: 50;
  top: 12px;
  left: var(--gutter);
  right: var(--gutter);
  max-width: var(--wrap);
  margin-inline: auto;
  height: 60px;
  padding: 0 10px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  transition: background-color 300ms ease, border-color 300ms ease;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-color: var(--line);
}
@media (prefers-reduced-transparency: reduce) {
  .nav.is-stuck { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.nav__logo { font-size: 23px; }
.nav__side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav .btn--ghost { background: var(--surface); }
@media (max-width: 620px) {
  .nav { padding: 0 10px 0 14px; gap: 10px; }
  .nav__logo { font-size: 19px; }
  /* На телефоне в шапке места под слово нет: логотип остаётся облаком. */
  .nav__logo .logo__w { display: none; }
  .nav__logo .logo__b { margin-left: -0.738em; transform: none !important; }
  .nav .theme { display: none; }   /* на телефоне переключатель темы стоит в подвале */
}

/* ── Заголовок ─────────────────────────────────────────────────────── */
.hero { padding: clamp(116px, 17vh, 168px) 0 clamp(64px, 8vw, 104px); }

.hero__h { font-family: var(--serif); font-weight: 400; letter-spacing: -0.025em; }
.logo--hero {
  display: flex;
  /* Раскрытый логотип шириной 7,3em должен помещаться в экран телефона: отсюда 11,6vw. */
  font-size: min(11.6vw, clamp(46px, 8.4vw, 120px));
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero__what {
  display: block;
  margin-top: 0.12em;
  font-size: clamp(32px, 5.3vw, 76px);
  line-height: 1.06;
  text-wrap: balance;
}

/* Оговорка у поля почты: «Вы (далее — «Пользователь»)». */
.clause {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.clause__nb { white-space: nowrap; }

.hero__row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(20px, 2.6vw, 34px);
}
.hero__sub {
  max-width: 31em;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero__cta { flex: none; min-height: 54px; padding: 0 28px; font-size: 17px; }
@media (max-width: 760px) {
  .hero__row { flex-direction: column; align-items: flex-start; }
}

/* Выход заголовка: облако раскрывается (класс .is-open ставит скрипт), затем по словам
   поднимается строка «ИИ для юридической работы». */
.anim .hero__what .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.34em);
  transition: opacity 500ms ease-out, transform 800ms var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 700ms);
}
.anim.hero-in .hero__what .w { opacity: 1; transform: none; }

/* ── Мозаика: шесть свойств программы ──────────────────────────────── */
.mosaic__in {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.7vw, 40px);
  border: 1px solid transparent;
  border-radius: var(--r-l);
  overflow: hidden;
}
.tile h2 {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(27px, 2.7vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.tile p {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 17.5px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}
.tile__m { position: absolute; aspect-ratio: 1; pointer-events: none; }

/* 1. Любая задача: главный блок. Вертушка больше блока и срезана его углом; вращается с прокруткой. */
.tile--any {
  grid-column: 1 / span 7;
  min-height: clamp(340px, 31vw, 440px);
  background: var(--tint);
}
.tile--any h2 { max-width: 11em; font-size: clamp(32px, 3.7vw, 54px); line-height: 1.04; }
.tile--any p { max-width: 20em; font-size: 19px; }
.tile--any .tile__m { width: clamp(230px, 25vw, 350px); right: -8%; bottom: -27%; }

/* 2. Читает целиком: кавычки сидят на верхней кромке и наполовину вышли к заголовку страницы. */
.tile--read {
  grid-column: 8 / span 5;
  justify-content: flex-end;
  background: var(--surface);
  border-color: var(--line);
  overflow: visible;
}
.tile--read .tile__m { width: clamp(110px, 11.5vw, 168px); top: clamp(-78px, -5.4vw, -52px); right: 8%; z-index: 2; }
.tile--read h2 { max-width: 10em; }
.tile--read p { max-width: 21em; }
.tile--read { padding-top: clamp(84px, 7.6vw, 116px); padding-bottom: clamp(36px, 3.6vw, 52px); }

/* 3. Тайны: тёмный блок, черепаха выглядывает из угла. */
.tile--data {
  --m-cobalt: #b7a3f2;
  grid-column: 1 / span 5;
  min-height: clamp(300px, 26vw, 370px);
  background: var(--block);
  color: var(--on-block);
}
.tile--data p { max-width: 18em; color: var(--on-block-2); }
.tile--data .tile__m { width: clamp(160px, 16vw, 226px); right: -5%; bottom: -8%; }

/* 4. Без подписки: узкий блок, крест срезан углом и медленно поворачивается. */
.tile--free {
  grid-column: 6 / span 3;
  background: var(--tint-2);
}
.tile--free .tile__m { width: clamp(110px, 10vw, 146px); right: -11%; bottom: -13%; }

/* 5. Под практику: сиреневый блок. Стопка листов лежит на стыке с блоком выше и сцепляет их. */
.tile--fit {
  --m-lilac: #dcd1fa;
  grid-column: 9 / span 4;
  justify-content: flex-end;
  padding-top: clamp(96px, 8.6vw, 128px);
  background: #a68ce8;
  color: #1b1647;
  overflow: visible;
}
.tile--fit p { color: #2b2560; }
.tile--fit .tile__m { width: clamp(120px, 12.5vw, 180px); top: clamp(-70px, -4.8vw, -46px); right: 7%; z-index: 2; }

/* 6. Поиск: широкая полоса. Звенья сцеплены в цепочку и уходят за правый край. */
.tile--law {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: clamp(200px, 17vw, 250px);
  background: var(--surface);
  border-color: var(--line);
}
.tile__text { position: relative; z-index: 1; flex: none; width: min(100%, 31em); }
.tile--law .tile__m { width: clamp(230px, 25vw, 340px); right: 3%; top: 50%; margin-top: clamp(-170px, -12.5vw, -115px); }

@media (max-width: 980px) {
  .tile--any { grid-column: 1 / -1; min-height: 0; padding-bottom: 96px; }
  .tile--any .tile__m { width: 250px; right: -3%; bottom: -96px; }
  .tile--read { grid-column: 1 / -1; margin-top: 46px; padding-top: 60px; }
  .tile--data { grid-column: 1 / span 7; min-height: 0; padding-bottom: 128px; }
  .tile--data .tile__m { width: 180px; right: -3%; bottom: -42px; }
  .tile--free { grid-column: 8 / span 5; padding-bottom: 104px; }
  .tile--free .tile__m { width: 130px; right: -6%; bottom: -22px; }
  .tile--fit { grid-column: 1 / -1; margin-top: 46px; padding-top: 68px; }
  .tile--fit .tile__m, .tile--read .tile__m { right: 6%; }
  .tile--read .tile__m { top: -58px; width: 124px; }
  .tile--fit .tile__m { top: -62px; width: 136px; }
  .tile--law .tile__text { width: min(60%, 31em); }
  .tile--law .tile__m { width: 230px; right: -2%; margin-top: -115px; }
}
@media (max-width: 640px) {
  .mosaic__in { gap: 12px; }
  .mosaic .wrap { width: calc(100% - 24px); }
  .tile { grid-column: 1 / -1 !important; border-radius: 22px; }
  .tile--any { min-height: 0; padding-bottom: 170px; }   /* низ блока оставлен вертушке, текст на неё не заходит */
  .tile--any .tile__m { width: 220px; right: -14%; bottom: -70px; }
  .tile--data { padding-bottom: 134px; }   /* запас под ход черепахи */
  .tile--data .tile__m { width: 190px; right: -4%; bottom: -30px; }
  .tile--free { padding-bottom: 120px; }
  .tile--free .tile__m { width: 150px; right: -6%; bottom: -30px; }
  .tile--law { padding-bottom: 150px; }
  .tile--law .tile__text { width: 100%; }
  .tile--law .tile__m { width: 230px; right: -6%; top: auto; bottom: -62px; margin-top: 0; }
}

/* У каждого знака свой выход: части занимают места каждая по-своему.
   .gx стоит на самом знаке; .is-on ему ставит скрипт, когда знак показан. */
.gx .p {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 300ms ease-out;
}
.gx[name="pinwheel"] .p {
  transform-box: view-box;
  transform-origin: 120px 120px;
}
.gx[name="pinwheel"] .p { transform: rotate(-80deg) scale(0.8); }
.gx[name="quotes"] .p0 { transform: translate(-30px, 12px) rotate(-20deg); }
.gx[name="quotes"] .p1 { transform: translate(30px, 12px) rotate(20deg); }
.gx[name="turtle"] .p0 { transform: translate(46px, 30px) rotate(8deg); }
.gx[name="cross"] .p0 { transform: rotate(-45deg) scale(0.84); }
.gx[name="layers"] .p0 { transform: translateX(44px); }
.gx[name="layers"] .p1 { transform: translateX(-44px); }
.gx[name="layers"] .p2 { transform: translateX(44px); }
.gx[name="links"] .p0 { transform: translateX(-30px); }
.gx[name="links"] .p1 { transform: translateX(30px); }
.gx[name="gate"] .p0 { transform: translateY(34px) scale(0.92); }

.gx.is-on[name] .p {
  transform: none;
  transition: transform 760ms var(--ease-spring) 80ms;
}
.gx.is-on[name="quotes"] .p1 { transition-delay: 170ms; }
.gx.is-on[name="layers"] .p1 { transition-delay: 160ms; }
.gx.is-on[name="layers"] .p0 { transition-delay: 240ms; }
.gx.is-on[name="pinwheel"] .p1 { transition-delay: 150ms; }
.gx.is-on[name="pinwheel"] .p2 { transition-delay: 220ms; }
.gx.is-on[name="pinwheel"] .p3 { transition-delay: 290ms; }

/* После выхода знак «живой» (.is-live ставит скрипт) и отвечает только на указатель. За прокруткой знаки не
   двигаются: два движения у одного знака (за прокруткой и под указателем) накладывались и выглядели резко.
   Пока страница едет, жест выключен (.is-scrolling ставит скрипт), иначе он срабатывал бы на ходу, когда блок
   проезжает под указателем. Единицы сдвига — в рамке знака 240 × 240. */
.gx.is-on.is-live[name] .p { transition: transform 560ms var(--ease-spring); }

@media (hover: hover) and (pointer: fine) {
  /* Под указателем у каждого знака свой жест. */
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="pinwheel"] .p { transform: rotate(72deg); }
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="cross"] .p0 { transform: rotate(90deg) scale(0.9); }
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="quotes"] .p0 { transform: translate(-12px, -6px) rotate(-14deg); }   /* кавычки раскрываются */
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="quotes"] .p1 { transform: translate(12px, -6px) rotate(14deg); }
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="turtle"] .p0 { transform: translateY(52px); }   /* черепаха прячется за край */
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="layers"] .p0 { transform: translateY(-14px); }  /* стопка раскладывается */
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="layers"] .p2 { transform: translateY(14px); }
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="links"] .p0 { transform: translate(-9px, -7px); }                    /* звенья натягиваются */
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="links"] .p1 { transform: translate(9px, 7px); }
}

/* ── Попробовать ───────────────────────────────────────────────────── */
.try { padding-top: clamp(64px, 8vw, 112px); }
.try__in {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px clamp(32px, 6vw, 96px);
  align-items: end;
}
.try__main { padding-bottom: clamp(48px, 6vw, 88px); }
.clause--fin { font-size: clamp(32px, 4.6vw, 64px); line-height: 1.06; }
.signup { margin-top: 28px; max-width: 540px; }
.signup__row { display: flex; gap: 10px; }
.signup__row .field__input { flex: 1; min-width: 0; }
.signup__row .btn { flex: none; min-height: 52px; }
.signup .btn--google { display: flex; width: 100%; min-height: 52px; }
/* Ворота стоят на черте подвала: у знака плоское основание. */
.try__gate {
  --gw: clamp(220px, 27vw, 390px);
  justify-self: center;
  width: var(--gw);
  aspect-ratio: 1;
  /* В рамке знака под основанием ворот 17,5% пустого поля: опускаем знак, чтобы основание легло на черту. */
  margin-bottom: calc(var(--gw) * -0.178);
}
@media (max-width: 860px) {
  .try__in { grid-template-columns: minmax(0, 1fr); }
  .try__main { padding-bottom: 8px; }
  .try__gate { --gw: 190px; justify-self: end; }
}
@media (max-width: 480px) {
  .signup__row { flex-direction: column; }
  .signup__row .field__input { flex: none; }
}

/* Кавычки вокруг «Пользователь» встают на место, когда строка показалась;
   пока человек пишет почту, они придвигаются к слову. */
.anim .term--pop .term__q {
  opacity: 0;
  transform: scale(0.6) rotate(-24deg);
  transition: opacity 180ms ease-out, transform 700ms var(--ease-spring);
}
.anim .term--pop .term__q--close { transform: scale(0.6) rotate(24deg); transition-delay: 140ms; }
.anim .term--pop.in .term__q { opacity: 1; transform: none; }
.anim .try:has(.field__input:focus-visible) .term--pop.in .term__q--open { transform: translateX(0.05em) rotate(9deg); transition-delay: 0ms; }
.anim .try:has(.field__input:focus-visible) .term--pop.in .term__q--close { transform: translateX(-0.05em) rotate(-9deg); transition-delay: 0ms; }

/* ── Подвал ─────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); position: relative; background: var(--paper); }
.foot__in { padding: 22px 0 28px; }
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 14.5px;
  color: var(--ink-3);
}
.foot__side { display: flex; align-items: center; gap: 16px; }

@media (prefers-reduced-motion: reduce) {
  .gx .p { transform: none !important; transition: none !important; }
}

/* ── Шестая редакция (11.11): разделы в шапке, решения под заказ и данные, подвал, страницы цен, условий
   и политики. ─────────────────────────────────────────────────────────────────────────────────────────── */
/* шапка: разделы */
.nav__links { display: flex; gap: 22px; margin-left: 30px; font-size: 15px; }
.nav__links a { color: var(--ink-2); text-decoration: none; transition: color 160ms ease; }
.nav__links a:hover { color: var(--ink); }
@media (max-width: 900px) { .nav__links { display: none; } }

/* ссылка внутри блока «Без подписки» */
.more__go { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 22px; font-weight: 600; font-size: 16px; color: var(--link); text-decoration: none; }
.more__go svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
.more__go:hover svg { transform: translateX(3px); }
.tile--free .tile__m { width: clamp(84px, 7.4vw, 110px); right: -16%; bottom: -18%; }

/* решения под заказ (светлый) и данные (тёмный) — продолжение мозаики, рядом для контраста */
.more { padding-top: 14px; }
.more__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.tile--custom { grid-column: 1 / span 7; min-height: clamp(320px, 28vw, 400px); background: var(--surface); border-color: var(--line); }
.tile--custom > p { max-width: 24em; }
.tile--custom .tile__m { width: clamp(170px, 17vw, 240px); right: -6%; top: -9%; }
.svc { position: relative; z-index: 1; display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.svc li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.4; color: var(--ink); }
.svc__i { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: var(--m-cobalt); }.more__mail { position: relative; z-index: 1; margin-top: auto !important; padding-top: 26px; }
.tile--safe { grid-column: 8 / span 5; background: var(--block); color: var(--on-block); }
.tile--safe .tile__m { width: clamp(150px, 14vw, 200px); right: -10%; bottom: -14%; }
.facts { position: relative; z-index: 1; display: grid; gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; max-width: 16em; }
.facts li { display: flex; gap: 14px; align-items: flex-start; font-family: var(--serif); font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; color: var(--on-block); }
.facts__i { flex: none; width: 0.95em; height: 0.95em; margin-top: 0.14em; }
.facts__i--box { fill: var(--m-lilac); }
.facts__i--star { fill: var(--m-peri); }
.facts__i--pair { fill: var(--m-lilac); }
@media (max-width: 980px) { .tile--custom, .tile--safe { grid-column: 1 / -1; } }

/* выход новых знаков и жест под указателем — как у знаков сайта (landing.css): клевер появляется с поворотом,
   части завитка сходятся; под указателем клевер поворачивается, завиток расходится */
.gx[name="clover"] .p0 { transform: rotate(-60deg) scale(0.82); }
.gx[name="swirl"] .p0 { transform: translate(-34px, -18px) rotate(-12deg); }
.gx[name="swirl"] .p1 { transform: translate(34px, 18px) rotate(12deg); }
.gx.is-on[name="swirl"] .p1 { transition-delay: 160ms; }
@media (hover: hover) and (pointer: fine) {
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="clover"] .p0 { transform: rotate(45deg) scale(0.94); }
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="swirl"] .p0 { transform: translate(-10px, -8px) rotate(-8deg); }
  :root:not(.is-scrolling) .tile:hover .gx.is-live[name="swirl"] .p1 { transform: translate(10px, 8px) rotate(8deg); }
}

/* подвал */
.foot__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 18px; font-size: 14.5px; }
.foot__nav a { color: var(--ink-2); text-decoration: none; }
.foot__nav a:hover { color: var(--ink); }

/* страницы цен, условий и политики */
.doc { padding: clamp(120px, 15vh, 150px) var(--gutter) clamp(64px, 8vw, 104px); }
.doc__in { max-width: 760px; margin: 0 auto; }
.doc h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.6vw, 54px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.doc h2 { margin-top: 40px; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.2vw, 27px); line-height: 1.2; }
.doc p, .doc li { margin-top: 12px; font-size: 17px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.doc ul { margin: 6px 0 0; padding-left: 1.2em; list-style: disc; }
.doc li::marker { color: var(--ink-3); }
.doc__lead { margin-top: 20px !important; font-size: 20px !important; color: var(--ink) !important; }
.doc__date { margin-top: 14px !important; font-size: 15px !important; color: var(--ink-3) !important; }
.fill { padding: 0 6px; border-radius: 6px; background: var(--tint); color: var(--accent); font-weight: 600; }
.price { width: 100%; margin-top: 36px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price caption { margin-bottom: 10px; text-align: start; font-size: 15px; color: var(--ink-3); }
.price th, .price td { padding: 16px 10px; border-top: 1px solid var(--line); text-align: end; vertical-align: top; }
.price thead th { padding-top: 0; border-top: 0; font-size: 14.5px; font-weight: 400; color: var(--ink-3); }
.price th:first-child { text-align: start; }
.price tbody th b { display: block; font-family: var(--serif); font-weight: 400; font-size: 22px; color: var(--ink); }
.price tbody th small { display: block; margin-top: 2px; font-size: 14.5px; font-weight: 400; color: var(--ink-3); }
.price td { font-size: 19px; color: var(--ink); }

/* длинные страницы: виден блок языка страницы (i18n.js ставит <html lang>) */
html[lang="en"] [data-only="ru"], html:not([lang="en"]) [data-only="en"] { display: none; }

/* пометка «(БЕТА)» в строке под названием: жирным, как само название */
.hero__beta { font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
