/* «Обо мне», консилиум этап 3 (арт-директор, 29.10). Подключить после inner2.css (или дописать в его конец).
   Фото — прямоугольник с чёткими краями, без mask-image, без арок и кругов. Без sticky и pin.
   Телефон: текст ≥ 16 px, зоны нажатия ≥ 44 px. Разметка — about3.py, поведение — about3.js. */

/* ================= 1. ПЕРВЫЙ ЭКРАН: имя + фото в кабинете + печать «18 лет» ================= */
.ab-h { overflow-x: clip; padding-bottom: var(--s7); }
.ab-h__grid { display: grid; gap: var(--s5); }
.ab-h__k { margin-top: var(--s3); }
.ab-h__t { margin-top: var(--s2); font: var(--w-h) calc(clamp(2.125rem, 1.2rem + 2.6vw, 3.75rem) * var(--k-h))/1.04 var(--f-serif); letter-spacing: var(--ls-h); color: var(--ink); }
.ab-h__t .gw { display: block; }
.ab-h__lead { margin-top: var(--s4); max-width: 31em; font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); }
.ab-h__cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

/* факты: 24 года · 1000+ · № в реестре (18 лет — на печати) */
.ab-f { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: var(--s4) var(--s6); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line-l); }
.ab-f li { display: grid; align-content: start; gap: 4px; }
.ab-f b { font: 500 clamp(1.625rem, 1.2rem + 1vw, 2.125rem)/1.05 var(--f-num); letter-spacing: -.01em; color: var(--gold-hi); white-space: nowrap; }
.ab-f b small { font-size: .55em; font-weight: 500; letter-spacing: 0; }
.ab-f li > span { font-size: .9375rem; line-height: 1.35; color: var(--ink-2); }
.ab-f a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: -4px; font-weight: 600; color: var(--gold-hi); text-underline-offset: 3px; }
.ab-f a .i { width: 16px; height: 16px; }

/* фото: 4:5 на компьютере (почти весь кадр 3:4 — стол, дипломы, Фемида), 1:1 на телефоне */
.ab-ph { position: relative; margin: 0; }
.ab-ph__frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--r-card); background: var(--g6); box-shadow: 0 30px 60px -44px rgba(43, 36, 29, .6); }
.ab-ph__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.ab-ph__cap { margin-top: var(--s3); font-size: .9375rem; line-height: 1.4; color: var(--ink-2); }

/* печать — тот же компонент, что в «Обо мне» на главной (Hero Animations / 16). Стоит на краю фото со стороны текста */
.ab-seal { position: absolute; z-index: 2; width: 164px; aspect-ratio: 1; transform: rotate(-12deg); }
.ab-seal .seal__rw, .ab-seal .seal__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ab-seal .seal__ring text { font: 500 22px/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; fill: var(--gold-hi); }
.ab-seal .seal__core { position: absolute; inset: 15%; display: grid; place-content: center; gap: 2px; border-radius: 50%; background: var(--gold); color: var(--ink); text-align: center;
  box-shadow: 0 10px 24px -12px rgba(43, 36, 29, .55); }
.ab-seal .seal__core b { font: 400 2.25rem/1 var(--f-num); letter-spacing: -.02em; }
.ab-seal .seal__core b [data-years-word] { font-size: .42em; letter-spacing: 0; }
.ab-seal .seal__core > span { max-width: 8em; margin-inline: auto; font-size: .75rem; line-height: 1.25; }
.ab-anim .ab-seal:not(.is-on) { opacity: 0; }
/* страховка: нет GSAP или reduced motion — всё на месте сразу */
.no-gsap .ab-seal { opacity: 1 !important; }
.no-gsap .ab-steps .ab-doc { opacity: 1 !important; transform: none !important; }
.no-gsap .ab-let__d .ab-doc__paper img { clip-path: none !important; }

@media (min-width: 960px) {
  .ab-h { padding-top: calc(var(--hdr) + var(--s5)); }
  .ab-h__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s8); align-items: center; }
  .ab-seal { left: -64px; bottom: 56px; }
}
/* 960–1279: колонка текста узкая — номер в реестре второй строкой, печать заходит в промежуток меньше */
@media (min-width: 960px) and (max-width: 1279px) {
  .ab-f { grid-template-columns: auto auto; }
  .ab-f .ab-f__reg { grid-column: 1 / -1; }
  .ab-seal { left: -40px; width: 140px; }
  .ab-seal .seal__core b { font-size: 1.875rem; }
}
@media (min-width: 960px) and (max-height: 860px) {
  /* ноутбук 1470×833: кадр не выше окна — подпись и факты видны без прокрутки */
  .ab-ph__frame { max-height: calc(100vh - var(--hdr) - 120px); aspect-ratio: auto; height: min(560px, calc(100vh - var(--hdr) - 120px)); }
}

/* телефон и планшет: крошки → подпись → имя → фото → текст → кнопки → факты */
@media (max-width: 959px) {
  .ab-h__grid { display: flex; flex-direction: column; gap: 0; }
  .ab-h__copy { display: contents; }
  .ab-h .crumbs { order: 1; } .ab-h__k { order: 2; } .ab-h__t { order: 3; } .ab-ph { order: 4; margin-top: var(--s4); }
  .ab-h__lead { order: 5; } .ab-h__cta { order: 6; } .ab-f { order: 7; }
  .ab-ph__frame { aspect-ratio: 1 / 1; }
  .ab-ph__frame img { object-position: 50% 26%; }
  .ab-seal { width: 128px; left: -8px; bottom: 56px; }
  .ab-seal .seal__ring text { font-size: 24px; }
  .ab-seal .seal__core b { font-size: 1.625rem; }
  .ab-seal .seal__core > span { font-size: .6875rem; }
}
@media (min-width: 600px) and (max-width: 959px) { .ab-ph { max-width: 520px; } }
@media (max-width: 599px) {
  .ab-h { padding-bottom: var(--s6); }
  .ab-h__k { font-size: .8125rem; letter-spacing: .1em; }
  .ab-h__lead { font-size: 1.0625rem; }
  .ab-h__cta .btn { flex: 1 1 0; padding-inline: var(--s4); }
  .ab-ph__cap { font-size: 1rem; }
  .ab-f { grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .ab-f .ab-f__reg { grid-column: 1 / -1; }
  .ab-f li > span { font-size: 1rem; }
  .ab-f b small { font-size: 1rem; }
}

/* ================= 2. «МОЙ ПУТЬ»: нить (Scroll Animation / 33), документы на своих годах ================= */
.ab-steps { margin-top: var(--s6); }
.ab-steps .tstep__dot { width: 20px; height: 20px; margin: 14px auto var(--s4); border-width: 2px; border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: var(--g7); }
.ab-steps .tstep.is-on .tstep__dot, .no-gsap .ab-steps .tstep__dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 22%, transparent); }
.ab-steps .tstep__t { font: var(--w-h) calc(1.125rem * var(--k-h))/1.25 var(--f-serif); color: var(--t-d); }
.ab-y { display: block; margin-bottom: 6px; font: 500 1.5rem/1.1 var(--f-num); letter-spacing: -.01em; color: var(--gold-hi); }
.ab-step__n { margin-top: 6px; font-size: .9375rem; line-height: 1.45; color: var(--t-d2); }
.ab-docs { margin-top: var(--s4); }
.ab-docs ul { display: flex; justify-content: center; align-items: flex-end; gap: var(--s2); }
.ab-docs__cap { margin-top: 10px; font-size: .8125rem; line-height: 1.35; color: var(--t-d2); }

/* скан: «лист» на столе — белое поле, тонкая линия, мягкая тень; лупа в углу. Сканы не наклонены: так они читаются как документы, а не как декор */
.ab-doc { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; max-width: 100%; text-align: center; color: var(--t-d); }
.ab-doc__paper { position: relative; display: block; padding: 3px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(43, 36, 29, .08), 0 14px 26px -18px rgba(43, 36, 29, .55);
  transition: transform 300ms var(--ease-out), box-shadow 300ms ease; }
.ab-doc__paper img { display: block; height: 64px; width: auto; max-width: 100%; border-radius: 1px; }
.ab-doc__t { font-size: .8125rem; line-height: 1.3; color: var(--t-d2); max-width: 13em; }
.ab-zoom { position: absolute; right: -8px; bottom: -8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--white); color: var(--gold-lo);
  box-shadow: 0 0 0 1px var(--line-l), 0 4px 10px -4px rgba(43, 36, 29, .5); }
.ab-zoom .i { width: 15px; height: 15px; stroke-width: 1.8; }
@media (hover: hover) and (pointer: fine) {
  .ab-doc { cursor: zoom-in; }
  .ab-doc:hover .ab-doc__paper { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--gold), 0 22px 34px -18px rgba(43, 36, 29, .6); }
  .ab-doc:hover .ab-doc__t { color: var(--t-d); }
}
.ab-doc:focus-visible { outline: none; }
.ab-doc:focus-visible .ab-doc__paper { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* документы «ложатся» на шаг, когда нить до него дошла (класс is-on ставит motion.js). Без анимаций — видны сразу */
.ab-anim .ab-steps .tstep .ab-doc, .ab-anim .ab-steps .tstep .ab-docs__cap { opacity: 0; transition: opacity 400ms ease, transform 650ms var(--ease-out); }
.ab-anim .ab-steps .tstep .ab-doc { transform: translateY(14px) rotate(-2.5deg); }
.ab-anim .ab-steps .tstep.is-on .ab-doc, .ab-anim .ab-steps .tstep.is-on .ab-docs__cap { opacity: 1; transform: none; transition-delay: 160ms; }
.ab-anim .ab-steps .tstep.is-on .ab-docs li:nth-child(2) .ab-doc { transition-delay: 250ms; }
.ab-anim .ab-steps .tstep.is-on .ab-docs__cap { transition-delay: 320ms; }

/* компьютер: пять колонок по нити; строки «год — пояснение — документы» выровнены по всем колонкам (subgrid) */
@media (min-width: 960px) {
  .ab-steps .tsteps { grid-template-rows: auto auto auto 1fr; }
  .ab-steps .tstep { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; padding-inline: var(--s3); }
  .ab-steps .tstep__t { text-wrap: balance; }
  .ab-steps .ab-step__n { text-wrap: balance; }
}
/* планшет и телефон: вертикальная нить слева */
@media (max-width: 959px) {
  .ab-steps .thread--h { display: none; }
  .ab-steps .thread--v { display: block; left: 19px; top: 14px; width: 10px; height: var(--v-len, 80%); }
  .ab-steps .tsteps { grid-template-columns: 1fr; gap: var(--s5); }
  .ab-steps .tstep { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: var(--s3); text-align: left; padding: 0; }
  .ab-steps .tstep__dot { grid-row: span 3; margin: 4px 0 0 14px; }
  .ab-steps .tstep > :not(.tstep__dot) { grid-column: 2; }
  .ab-docs ul { justify-content: flex-start; }
  .ab-y { display: inline; margin: 0 6px 0 0; font-size: 1.125rem; }
}
@media (max-width: 599px) {
  .ab-steps .tstep__t { font-size: calc(1.125rem * var(--k-h)); }
  .ab-step__n { font-size: 1rem; }
  .ab-doc__paper img { height: 72px; }
  .ab-docs__cap, .ab-doc__t { font-size: .9375rem; }
}

/* ================= 3. «КАК Я РАБОТАЮ»: цитата + четыре принципа ================= */
.ab-how__grid { display: grid; gap: var(--s5); }
.ab-q { margin: var(--s4) 0 0; }
.ab-q p { font: italic 400 calc(clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem) * var(--k-h))/1.3 var(--f-serif); color: var(--t-d); text-wrap: balance; }
.ab-q p::before { content: ""; display: block; width: 48px; height: 2px; margin-bottom: var(--s4); background: var(--gold); }
.ab-how__list { display: grid; gap: var(--s4); }
.ab-how__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: var(--s4); row-gap: 4px; align-items: start; }
.ab-how__i { grid-row: span 2; width: 28px; height: 28px; color: var(--gold-lo); stroke-width: 1.35; }
.ab-how__list h3 { font: var(--w-h) calc(1.1875rem * var(--k-h))/1.25 var(--f-serif); color: var(--t-d); }
.ab-how__list p { grid-column: 2; line-height: 1.5; color: var(--t-d2); }
.ab-how__list .law { font-size: 1em; color: inherit; }
.ab-how__more { margin-top: var(--s4); }
@media (min-width: 960px) { .ab-how__more { grid-column: 2; margin-top: calc(-1 * var(--s2)); } }
@media (min-width: 960px) {
  .ab-how__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s8); align-items: start; }
  .ab-how__list { grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s6); padding-top: var(--s2); }
  .ab-how__list li { grid-template-columns: minmax(0, 1fr); row-gap: var(--s2); padding: var(--s5); border-radius: var(--r-card); background: color-mix(in srgb, var(--white) 70%, transparent); border: 1px solid var(--line-l); }
  .ab-how__i { grid-row: auto; margin-bottom: 4px; }
  .ab-how__list p { grid-column: 1; }
}
@media (max-width: 599px) { .ab-how__list p { font-size: 1rem; } }

/* ================= 4. БЛАГОДАРСТВЕННЫЕ ПИСЬМА: «папка» (как «папка дела» на страницах направлений) ================= */
.ab-fold { margin-top: var(--s5); }
.ab-fold__tab { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 18px; border-radius: var(--r-card) var(--r-card) 0 0; background: var(--g9);
  font: 600 .75rem/1.35 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-lo); }
.ab-fold__sheet { padding: var(--s5); border-radius: 0 var(--r-card) var(--r-card) var(--r-card); background: var(--g9); }
.ab-let__l { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s5) var(--s4); }
.ab-let__d { width: 100%; align-items: stretch; text-align: left; gap: 10px; }
.ab-let__d .ab-doc__paper { padding: 4px; }
.ab-let__d .ab-doc__paper img { width: 100%; height: auto; aspect-ratio: 1 / 1.414; object-fit: cover; object-position: 50% 0; }
.ab-let__d .ab-doc__t { max-width: none; }
.ab-let__d .ab-doc__t b { display: block; font-weight: 500; font-size: .9375rem; line-height: 1.3; color: var(--t-d); }
.ab-let__d .ab-doc__t small { display: block; margin-top: 2px; font-size: .875rem; color: var(--t-d2); }
.ab-let__d .ab-zoom { right: 8px; bottom: 8px; }
/* письмо проявляется сверху вниз, как при сканировании (Scroll Animation / 53: маска при входе в экран, без pin, один раз) */
.ab-anim .ab-let__d .ab-doc__paper img { clip-path: inset(0 0 100% 0); transition: clip-path 900ms var(--ease-out); }
.ab-anim .ab-let__l.is-in .ab-doc__paper img { clip-path: inset(0 0 0 0); }
.ab-anim .ab-let__l.is-in li:nth-child(2) img { transition-delay: 80ms; } .ab-anim .ab-let__l.is-in li:nth-child(3) img { transition-delay: 160ms; }
.ab-anim .ab-let__l.is-in li:nth-child(4) img { transition-delay: 240ms; } .ab-anim .ab-let__l.is-in li:nth-child(5) img { transition-delay: 320ms; }
.ab-anim .ab-let__l.is-in li:nth-child(6) img { transition-delay: 400ms; }
@media (min-width: 600px) and (max-width: 959px) { .ab-let__l { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* телефон: лента пальцем (нативная прокрутка вбок, не перехват вертикальной) */
@media (max-width: 599px) {
  .ab-fold__sheet { padding: var(--s3) 0 var(--s3) var(--s3); }
  .ab-fold__tab { font-size: .8125rem; }
  .ab-let__l { display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--s3); overscroll-behavior-x: contain; scrollbar-width: none; padding-right: var(--s3); }
  .ab-let__l::-webkit-scrollbar { display: none; }
  .ab-let__l li { flex: 0 0 152px; scroll-snap-align: start; }
  .ab-let__d .ab-doc__t b { font-size: 1rem; }
  .ab-let__d .ab-doc__t small { font-size: 1rem; }
}

/* ================= 5. ФИНАЛ: тёмная плашка, визитка с маленьким портретом (фото в кабинете уже было в первом экране) ================= */
.ab-fin .fin__in { align-items: center; }
.ab-fin__side { display: grid; justify-items: start; }
.ab-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s4); align-items: start; width: min(100%, 440px); padding: var(--s5); border-radius: var(--r-card);
  background: var(--white); color: var(--ink); box-shadow: 0 34px 60px -30px rgba(0, 0, 0, .75); transform: rotate(-1.5deg); transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ab-card:hover { transform: rotate(0) translateY(-3px); } }
.ab-card__ph { width: 112px; aspect-ratio: 4 / 5; height: auto; object-fit: cover; object-position: 50% 14%; border-radius: var(--r-sm); }
.ab-card__n { font: var(--w-h) calc(1.25rem * var(--k-h))/1.15 var(--f-serif); color: var(--ink); }
.ab-card__s { margin-top: 4px; font-size: .9375rem; line-height: 1.35; color: var(--ink-2); }
.ab-card__reg { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 6px; font-size: .9375rem; color: var(--ink); }
.ab-card__reg a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; color: var(--gold-hi); text-underline-offset: 3px; }
.ab-card__reg .i { width: 15px; height: 15px; }
.ab-card__a { padding-top: var(--s2); border-top: 1px solid var(--line-l); font-size: .875rem; line-height: 1.4; color: var(--ink-2); }
.ab-go { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-top: var(--s5); }
.ab-go p { flex: 1 1 100%; font-size: .9375rem; color: color-mix(in srgb, var(--haze) 72%, transparent); }
.ab-go a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid color-mix(in srgb, var(--haze) 34%, transparent); border-radius: var(--r-pill);
  color: var(--haze); font-weight: 500; text-decoration: none; transition: border-color 200ms ease, background-color 200ms ease; }
.ab-go a .i { width: 16px; height: 16px; color: var(--gold); transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ab-go a:hover { border-color: var(--gold); background: color-mix(in srgb, var(--haze) 8%, transparent); } .ab-go a:hover .i { transform: translateX(3px); } }
.ab-fin__facts { margin-top: 0; }
@media (min-width: 960px) {
  .ab-fin .fin__in { grid-template-rows: auto auto; row-gap: var(--s5); align-items: start; }
  .ab-fin__side { grid-column: 1; grid-row: 1; justify-items: center; align-self: end; }
  .ab-fin .fin__t { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .ab-fin__facts { grid-column: 1; grid-row: 2; align-self: start; justify-self: center; width: min(100%, 440px); border-top: 0; padding-top: 0; }
}
@media (max-width: 959px) { .ab-fin__facts { margin-top: var(--s5); } }
@media (max-width: 959px) { .ab-card { transform: rotate(-1deg); } }
@media (max-width: 599px) {
  .ab-card { grid-template-columns: 84px minmax(0, 1fr); gap: var(--s3); padding: var(--s4); }
  .ab-card__ph { width: 84px; }
  .ab-card__n { font-size: calc(1.125rem * var(--k-h)); }
  .ab-card__s, .ab-card__reg, .ab-go p { font-size: 1rem; }
  .ab-card__a { grid-column: 1 / -1; font-size: 1rem; }
  .ab-go a { flex: 1 1 100%; justify-content: space-between; min-height: 52px; padding-inline: 18px; }
}

/* ================= ОКНО ДОКУМЕНТА: листать ←/→, счётчик, «из миниатюры в окно» (about3.js) ================= */
.ab-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); }
.ab-nav__c { font: 500 .9375rem/1 var(--f-num); color: var(--ink-2); }
.ab-nav .round { width: 48px; height: 48px; }
.ab-nav .round[disabled] { opacity: .35; cursor: default; }
.ab-nav .round .i { width: 20px; height: 20px; }
.ab-nav .ab-prev .i { transform: scaleX(-1); }
.sheet--doc.ab-flip .sheet__panel { transition: opacity 180ms ease; transform: translate(-50%, -50%); }
/* скан по размеру самого листа: тень обнимает лист, а не пустые поля по бокам; полёт из миниатюры без искажений */
.sheet--doc .doc-big.has-img img { width: auto; max-width: 100%; margin-inline: auto; max-height: calc(100vh - 250px); }
@media (max-width: 767px) { .sheet--doc .doc-big.has-img img { max-height: 60vh; } }

/* 05.11 (тестирование): на 1024 px «Мой путь» выходил за край на 10 px — колонки и сканы не шире своей колонки */
@media (min-width: 960px) {
  .ab-steps .tsteps { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
  .ab-steps .tstep { min-width: 0; }
  .ab-docs ul { flex-wrap: wrap; }
  .ab-docs li { min-width: 0; max-width: 100%; }
  .ab-docs img { max-width: 100%; height: auto; }
}
/* 05.11 (тестирование): сканы на «Обо мне» не растягиваются по высоте */
.ab-doc img { object-fit: contain; max-width: 100%; }

/* 05.11, заказчик: на телефоне и планшете финал «Обо мне» — как на «Частным лицам» (M); на компьютере — с визиткой */
@media (max-width: 959px) { .ab-fin { display: none; } }
@media (min-width: 960px) { .ab-fin-m { display: none; } }
