/* ============================================================
   bormantov.ru V2 — блок «О разработчике», вариант B «Editorial Human»
   (утверждён владельцем 23.10.2026). Подключается после styles.css,
   v2.css, hero-v2.css. Источник вариантов: _about_v2/about-v2.css.
   ============================================================ */

.ab {
  --ab-signal: #2dd4bf;
  --ab-line: rgba(148, 163, 184, 0.22);
  --ab-muted: #aab8c8;
  position: relative;
  isolation: isolate;
  z-index: 1;
  padding: 112px 0;
  overflow: hidden;
}

.ab > .container {
  position: relative;
  z-index: 2;
}

/* --- общая типографика (система главной) --- */

.ab-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #94a3b8;
}

.ab-eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--ab-signal);
}

.ab-title {
  margin-top: 22px;
  font-size: clamp(34px, 3.3vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #f8fafc;
  text-wrap: balance;
}

.ab-title em {
  font-style: normal;
  color: #5eead4;
}

.ab-name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 28px;
}

.ab-name strong {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.ab-name span {
  font-size: 14px;
  color: #94a3b8;
}

.ab-text {
  margin-top: 14px;
  max-width: 540px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ab-muted);
}

.ab-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.ab-marks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--ab-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
}

.ab-marks li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--ab-signal);
}

.ab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.ab-actions .btn {
  height: 54px;
  padding: 0 24px;
  font-size: 16px;
  font-weight: 650;
  gap: 12px;
}

/* --- общее появление при прокрутке (без JS — всё видно) --- */

.ab-js .ab [data-ab-in] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(.2, .75, .2, 1), transform 0.9s cubic-bezier(.2, .75, .2, 1);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.ab-js .ab.is-in [data-ab-in] {
  opacity: 1;
  transform: none;
}

/* затемнение к низу: фото входит в тёмную среду страницы */

/* архитектурная рама: смещённый контур + риски */

/* вертикаль-ось, продолжающаяся за пределы рамы */

/* горизонталь на уровне глаз — продолжается в текстовую колонку */

/* номер раздела — крупная архитектурная цифра */

/* прорисовка рамы при появлении */

/* ============================================================
   B — EDITORIAL HUMAN
   Крупный портрет справа растворяется в тёмной среде, имя —
   редакционной типографикой за фигурой, текст заходит на
   край фото. Глубина: имя → портрет → текст.
   ============================================================ */

.ab-b {
  padding: 96px 0;
}

.ab-b .ab-photo {
  position: absolute;
  z-index: 1;
  right: max(0px, calc((100vw - 1180px) / 2 - 40px));
  top: 0;
  bottom: 0;
  width: min(48vw, 640px);
  overflow: hidden;
  /* мягкие края со всех сторон: студийный фон растворяется в тёмной среде без видимой рамки */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.04) 8%, rgba(0,0,0,.16) 16%, rgba(0,0,0,.36) 24%, rgba(0,0,0,.6) 32%, rgba(0,0,0,.82) 40%, #000 50%, #000 60%, rgba(0,0,0,.72) 70%, rgba(0,0,0,.38) 81%, rgba(0,0,0,.12) 91%, transparent 100%), linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 8%, #000 18%, #000 60%, rgba(0,0,0,.6) 76%, rgba(0,0,0,.2) 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.04) 8%, rgba(0,0,0,.16) 16%, rgba(0,0,0,.36) 24%, rgba(0,0,0,.6) 32%, rgba(0,0,0,.82) 40%, #000 50%, #000 60%, rgba(0,0,0,.72) 70%, rgba(0,0,0,.38) 81%, rgba(0,0,0,.12) 91%, transparent 100%), linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 8%, #000 18%, #000 60%, rgba(0,0,0,.6) 76%, rgba(0,0,0,.2) 90%, transparent 100%);
  mask-composite: intersect;
}

.ab-b .ab-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  filter: saturate(0.9) brightness(0.86) contrast(1.05);
}

/* редакционное имя: за портретом, контуром */

.ab-b .ab-bigname {
  position: absolute;
  z-index: 0;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 18px;
  font-size: clamp(80px, 8vw, 120px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-align: right;
  color: transparent;
  -webkit-text-stroke: 1px rgba(45, 212, 191, 0.32);
  pointer-events: none;
  white-space: nowrap;
}

.ab-b .ab-bigname span:first-child {
  display: none;
}

.ab-b .ab-copy {
  position: relative;
  z-index: 3;
  max-width: 580px;
}

/* полупрозрачная плоскость текста не нужна: текст стоит на тёмном
   поле, а край портрета уже растворён маской */

.ab-b .ab-field {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 70% 50%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 60% 80% at 70% 50%, #000 20%, transparent 80%);
}

/* мягкая реакция на указатель (JS задаёт --px/--py) */

.ab-b .ab-photo { translate: calc(var(--px, 0) * -6px) calc(var(--py, 0) * -4px); transition: translate .6s cubic-bezier(.2, .75, .2, 1);
}

.ab-b .ab-bigname { transform: translate(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 6px)); transition: transform .8s cubic-bezier(.2, .75, .2, 1);
}

/* направляющие системы: выходят за модули и медленно «дышат» */

@keyframes ab-guides {
  from { background-position: -24px 0, 0 -16px;
  }

  to { background-position: 24px 0, 0 16px;
  }
}

/* модули собираются при появлении (каскад) */

/* ============================================================
   Адаптивность
   ============================================================ */

@media (max-width: 899px) {
  .ab { padding: 72px 0;
  }

  /* A: портрет — широкий кадр по плечи; текст заходит на его низ */

  /* B: портрет сверху на всю ширину, текст наезжает на растворённый низ */

  .ab-b { padding: 0 0 64px;
  }

  .ab-b .ab-photo {
    position: relative;
    right: auto;
    width: 100%;
    height: 440px;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }

  .ab-b .ab-photo img { object-position: 50% 10%;
  }

  .ab-b .ab-bigname { display: none;
  }

  .ab-b .ab-copy { margin-top: -96px;
  }

  /* C: модульная система во всю ширину, текст под ней */
}

@media (max-width: 699px) {
  .ab-title { font-size: clamp(28px, 7.6vw, 34px);
  }

  .ab-text { font-size: 16px;
  }

  .ab-actions { flex-direction: column;
  }

  .ab-actions .btn { width: 100%; justify-content: space-between;
  }

  .ab-b .ab-photo { height: 400px;
  }
}

/* ============================================================
   reduced-motion: композиция статична и полностью видна
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .ab-js .ab [data-ab-in] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .ab-b .ab-photo,
  .ab-b .ab-bigname { transition: none; translate: none;
  }
}

/* Плавающая CTA скрыта, пока на экране текст, маркеры и кнопки блока
   (класс ставит assets/js/about-v2.js); на остальном сайте CTA не меняется */
body.ab-cta-in-view .floating-cta {
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
}
