/* ============================================================
   СЕКЦИИ — HERO, ПОЗИЦИОНИРОВАНИЕ, УСЛУГИ, ПОРТФОЛИО, ПРОЦЕСС, CTA
   ============================================================ */

/* ---------------- HERO (фото-портрет) ---------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;            /* десктоп: фото абсолютное, сцена 100svh */
  flex-direction: column;
  overflow: hidden;
}

/* фоновая фигура, растворённая в фоне страницы */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("marsel.jpg") no-repeat;
  background-size: auto 120%;
  background-position: 50% 32%;
}
/* видео-фон первого экрана (поверх фото-постера) */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  pointer-events: none;
}
/* фото-постер (background .hero-photo) остаётся фолбэком, пока видео грузится */
.hero[data-hero="right"] .hero-photo {
  background-size: auto 124%;
  background-position: 50% 32%;
  transform: scaleX(-1) translateX(-22%);
}

/* НОВОЕ ФОТО первого экрана (киберпанк, персонаж справа).
   Файл уже отзеркалён — CSS-зеркало не нужно.
   Чтобы ВЕРНУТЬ старое фото — убери data-photo="v2" с <header class="hero"> в HTML. */
.hero[data-photo="v2"] .hero-photo {
  background-image: url("hero-photo-2.jpg");
  background-size: cover;
  background-position: 70% 50%;
  transform: none;
}
/* Новое фото самодостаточно (логотипы уже в кадре) — скрываем слой орбиты
   со старой вырезанной фигурой. Вернётся вместе со старым фото. */
.hero[data-photo="v2"] .hero-orbit { display: none; }
/* Текст компактнее, чтобы не перекрывать свечение логотипов справа. */
.hero[data-photo="v2"] .hero-lead { max-width: min(46%, 520px); }
.hero[data-photo="v2"] .hero-sub { max-width: 34ch; }
/* Усиленная шторка: левая текстовая колонка на тёмном, лицо и свечение справа. */
.hero[data-photo="v2"]::before {
  background:
    linear-gradient(90deg, rgba(8,9,10,.96) 0%, rgba(8,9,10,.86) 26%, rgba(8,9,10,.5) 46%, rgba(8,9,10,.12) 64%, rgba(8,9,10,0) 76%),
    linear-gradient(0deg, rgba(8,9,10,.66) 0%, rgba(8,9,10,0) 40%),
    linear-gradient(180deg, rgba(8,9,10,.5) 0%, rgba(8,9,10,0) 16%);
}
@media (max-width: 820px){
  .hero[data-photo="v2"] .hero-photo { background-position: 64% 28%; transform: none; }
}

/* ФОТО v3 (отзеркаленное, человек справа, логотипы к тексту).
   Чтобы вернуть старое фото — убери data-photo="v3" с <header class="hero">. */
.hero[data-photo="v3"] .hero-photo {
  background-image: url("hero-photo-3.jpg");
  background-size: auto 118%;
  background-position: 0% 30%;
  /* фото едет вправо вместе с контентной сеткой (.wrap) + доп. сдвиг */
  transform: translateX(calc(max(0px, calc((100vw - var(--maxw)) / 2)) + 5vw));
}
.hero[data-photo="v3"] .hero-lead { max-width: min(46%, 520px); }
.hero[data-photo="v3"] .hero-sub { max-width: 34ch; }
.hero[data-photo="v3"]::before {
  background:
    linear-gradient(90deg, rgba(8,9,10,.96) 0%, rgba(8,9,10,.84) 28%, rgba(8,9,10,.42) 48%, rgba(8,9,10,.1) 64%, rgba(8,9,10,0) 76%),
    linear-gradient(0deg, rgba(8,9,10,.66) 0%, rgba(8,9,10,0) 40%),
    linear-gradient(180deg, rgba(8,9,10,.5) 0%, rgba(8,9,10,0) 16%);
}
@media (max-width: 820px){
  .hero[data-photo="v3"] .hero-photo { background-position: 66% 24%; transform: none; }
}

/* мягкие шторки по краям/снизу — текст читается, центр-фигура чистая */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,9,10,.94) 0%, rgba(8,9,10,.5) 19%, rgba(8,9,10,0) 35%, rgba(8,9,10,0) 65%, rgba(8,9,10,.5) 81%, rgba(8,9,10,.9) 100%),
    linear-gradient(0deg, rgba(8,9,10,.82) 0%, rgba(8,9,10,0) 36%),
    linear-gradient(180deg, rgba(8,9,10,.62) 0%, rgba(8,9,10,0) 20%);
}
.hero[data-hero="right"]::before {
  background:
    linear-gradient(90deg, rgba(8,9,10,.95) 0%, rgba(8,9,10,.72) 32%, rgba(8,9,10,.1) 60%, rgba(8,9,10,0) 74%),
    linear-gradient(0deg, rgba(8,9,10,.7) 0%, rgba(8,9,10,0) 42%),
    linear-gradient(180deg, rgba(8,9,10,.55) 0%, rgba(8,9,10,0) 18%);
}

/* — СЦЕНА — */
.hero-stage {
  position: relative;
  z-index: 4;
  flex: 1;
  display: grid;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: 100svh;
  padding: 104px var(--gutter) 60px;
  box-sizing: border-box;
}

/* Концепция A — фигура по центру: текст слева, статы справа, кнопки справа внизу */
.hero[data-hero="center"] .hero-stage {
  grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(20px, 3vw, 48px);
  align-items: center;
}
.hero[data-hero="center"] .hero-lead  { grid-column: 1; grid-row: 1 / span 2; align-self: center; max-width: 540px; }
.hero[data-hero="center"] .hero-stats { grid-column: 3; grid-row: 1; align-self: center; justify-self: end; }
.hero[data-hero="center"] .hero-cta   { grid-column: 3; grid-row: 2; align-self: end;   justify-self: end; }

/* Концепция B — фигура справа: весь текст в левой колонке */
.hero[data-hero="right"] .hero-stage {
  align-content: center;
  justify-items: start;
}
.hero[data-hero="right"] .hero-lead  { max-width: min(56%, 600px); }
.hero[data-hero="right"] .hero-stats { margin-top: 30px; }
.hero[data-hero="right"] .hero-cta   { margin-top: 26px; }

/* — типографика hero — */
.hero-eyebrow { margin-bottom: 20px; }
.hero h1 {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(44px, 6.6vw, 108px);
  line-height: .86;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.hero h1 .ln { display: block; }

/* Заголовок в 2 строки: «Дизайн, который» сверху одним стилем,
   «продаёт.» снизу — рукописный неоновый акцент (десктоп). */
.hero h1.title-2line { font-size: clamp(40px, 4.6vw, 76px); line-height: .92; }
.hero h1.title-2line .top { white-space: nowrap; }
.hero h1.title-2line .script {
  font-family: "Christopher", var(--script);
  text-transform: none;
  font-weight: 400;
  color: var(--acid);
  font-size: 1.6em;
  line-height: 1.02;
  letter-spacing: .01em;
  margin-top: .02em;
  -webkit-text-stroke: 0;
  text-shadow: 0 0 14px rgba(200, 242, 58, .4), 0 0 34px rgba(200, 242, 58, .2);
  width: fit-content;
  text-decoration: underline;
  text-decoration-color: var(--acid);
  text-decoration-thickness: .055em;
  text-underline-offset: .14em;
}
/* Рукописное «продаёт» как изображение (подпись клиента) */
.hero h1.title-2line .script.script--img {
  text-decoration: none;
  text-shadow: none;
  font-size: inherit;
  line-height: 0;
  margin-top: .42em;
}
.hero h1 .word-img {
  display: inline-block;
  width: auto;
  height: 1.55em;
  filter: drop-shadow(0 0 14px rgba(200, 242, 58, .4)) drop-shadow(0 0 34px rgba(200, 242, 58, .22));
}

/* — Анимация заголовка по строкам (включается вместе с .reveal.in) — */
.hero h1 .ln {
  opacity: 0;
  transform: translateY(.55em);
  filter: blur(8px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1),
              transform .8s cubic-bezier(.16,1,.3,1),
              filter .8s ease;
}
.hero h1.in .ln { opacity: 1; transform: none; filter: none; }
.hero h1 .ln:nth-child(1) { transition-delay: .10s; }
.hero h1 .ln:nth-child(2) { transition-delay: .24s; }
.hero h1 .ln:nth-child(3) { transition-delay: .38s; }

/* — Лёгкий «перелив» по акцентному слову — */
.hero h1 .acid {
  background: linear-gradient(100deg, var(--acid) 0%, #f0ffb0 35%, var(--acid) 65%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: acidShine 4s ease-in-out 1.4s infinite;
}
@keyframes acidShine {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .ln { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .hero h1 .acid { animation: none !important; }
}
.hero .sig {
  font-family: var(--script);
  font-size: clamp(28px, 3.4vw, 46px);
  color: var(--acid);
  line-height: 1;
  margin-bottom: 8px;
  transform: rotate(-3deg);
  transform-origin: left center;
  display: block;
  width: fit-content;
}
.hero-sub {
  margin: 26px 0 0;
  max-width: 40ch;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 19px);
  text-wrap: pretty;
}
.hero-sub b { color: var(--acid); font-weight: 700; }
/* мобильный вариант подзаголовка показываем только на телефонах */
.hero-sub .m-only { display: none; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
}
.hero[data-hero="right"] .hero-stats {
  flex-direction: row;
  gap: 34px;
  flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  align-self: stretch;
}
.hero-stats .st .n {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 3vw, 40px); line-height: 1; color: var(--ink);
}
.hero-stats .st .n .u { color: var(--acid); }
.hero-stats .st .l { font-size: 13px; color: var(--muted-2); margin-top: 6px; letter-spacing: .02em; }

.scroll-hint {
  position: absolute; left: max(var(--gutter), calc(50% - var(--maxw) / 2 + var(--gutter))); bottom: 26px; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2);
}
.hero[data-hero="center"] .scroll-hint { left: 50%; transform: translateX(-50%); }
.scroll-hint .bar { width: 1px; height: 40px; background: linear-gradient(var(--acid), transparent); animation: scrollbar 2s ease-in-out infinite; transform-origin: top; }
@keyframes scrollbar { 0%,100%{ transform: scaleY(.4); opacity:.4 } 50%{ transform: scaleY(1); opacity:1 } }

/* бегущий заголовок/тэглайн больше не используются (раскладка «Сплит 50/50») */
.hero-ticker { display: none; }
.hero-tagline { display: none; }

/* — Планшет/мобайл: фото полосой сверху, текст единым столбцом — */
@media (max-width: 820px){
  .hero-photo,
  .hero[data-hero="right"] .hero-photo,
  .hero[data-photo="v2"] .hero-photo,
  .hero[data-photo="v3"] .hero-photo {
    position: relative;
    inset: auto;
    height: 46svh;
    background-size: auto 116%;
    background-position: 50% 22%;
    transform: none;
    order: -1;
  }
  .hero-video { object-position: 50% 22%; }
  .hero::before,
  .hero[data-hero="right"]::before,
  .hero[data-photo="v2"]::before,
  .hero[data-photo="v3"]::before {
    background:
      linear-gradient(0deg, rgba(8,9,10,1) 2%, rgba(8,9,10,0) 30%),
      linear-gradient(180deg, rgba(8,9,10,.5) 0%, rgba(8,9,10,0) 16%);
  }
  .hero-stage,
  .hero[data-hero="center"] .hero-stage,
  .hero[data-hero="right"] .hero-stage {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 0;
    padding: 4px var(--gutter) 56px;
    margin-top: -12svh;
  }
  .hero-lead,
  .hero[data-hero="center"] .hero-lead,
  .hero[data-hero="right"] .hero-lead,
  .hero[data-photo="v2"] .hero-lead,
  .hero[data-photo="v3"] .hero-lead { max-width: 600px; }
  .hero[data-hero="center"] .hero-stats,
  .hero[data-hero="right"] .hero-stats {
    flex-direction: row; flex-wrap: wrap; gap: 28px;
    margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line);
    justify-self: start; align-self: stretch;
  }
  .hero[data-hero="center"] .hero-cta,
  .hero[data-hero="right"] .hero-cta { margin-top: 28px; justify-self: start; }
  .scroll-hint,
  .hero[data-hero="center"] .scroll-hint { display: none; }
}

/* — Телефоны: СПЛИТ 50/50 — фото в верхней половине, текст в нижней на тёмном — */
@media (max-width: 600px){
  .hero { min-height: 100svh; }

  .hero-photo,
  .hero[data-hero="right"] .hero-photo,
  .hero[data-photo="v2"] .hero-photo,
  .hero[data-photo="v3"] .hero-photo {
    position: absolute;
    inset: 0 0 auto 0;
    height: 64svh;        /* крупный человек: фото занимает ~⅔ первого экрана */
    order: 0;
    background-size: cover;
    background-position: 40% 14%;   /* сдвиг кадра: человек правее на ~10% */
    transform: none;
  }
  .hero-video { object-position: 40% 14%; }

  /* затемнение тянется ровно на высоту фото и растворяет его низ в фон */
  .hero::before,
  .hero[data-hero="right"]::before,
  .hero[data-photo="v2"]::before,
  .hero[data-photo="v3"]::before {
    inset: 0 0 auto 0;
    height: 64svh;
    background:
      linear-gradient(180deg,
        rgba(8,9,10,.30) 0%, rgba(8,9,10,0) 30%, rgba(8,9,10,0) 56%,
        var(--bg) 100%);
  }

  /* контент начинается под фото и течёт вниз — кнопки уходят за первый экран */
  .hero-stage,
  .hero[data-hero="center"] .hero-stage,
  .hero[data-hero="right"] .hero-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100svh;
    margin-top: 0;
    padding: 50svh 22px 44px;
  }

  .hero-lead,
  .hero[data-hero="center"] .hero-lead,
  .hero[data-hero="right"] .hero-lead,
  .hero[data-photo="v2"] .hero-lead,
  .hero[data-photo="v3"] .hero-lead { max-width: none; text-align: center; }

  /* кикер по центру с чёрточками по обеим сторонам */
  .hero-eyebrow { margin-bottom: 14px; justify-content: center; }
  .hero-eyebrow::after {
    content: ""; width: 28px; height: 1px;
    background: var(--acid); opacity: .7;
  }

  .hero h1 { font-size: clamp(34px, 10vw, 40px); line-height: .9; }
  .hero h1.title-2line .script.script--img { margin-inline: auto; }
  .hero h1 .word-img { height: 1.95em; transform: translateX(12%); } /* крупнее + центровка по буквам (хвост-росчерк не учитываем) */
  .nav .logo-lockup { --logo-h: 44.55px; }         /* логотип в шапке на мобилке (−15%, −10%, ещё −10%) */
  .hero .m-hide { display: none; }
  .hero-sub .m-only { display: inline; }
  .hero-sub .m-only b { color: var(--ink); }
  .hero-sub,
  .hero[data-photo="v2"] .hero-sub,
  .hero[data-photo="v3"] .hero-sub {
    margin: 14px auto 0; max-width: 36ch; font-size: 14.5px;
  }

  /* статы — единая строка с разделителями, группа по центру */
  .hero[data-hero="center"] .hero-stats,
  .hero[data-hero="right"] .hero-stats,
  .hero-stats {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    align-self: stretch;
  }
  .hero-stats .st { flex: 0 0 auto; text-align: center; padding: 0 16px; }
  .hero-stats .st + .st { border-left: 1px solid var(--line); }
  .hero-stats .st .n { font-size: 22px; white-space: nowrap; }
  .hero-stats .st .l { font-size: 12px; }

  /* кнопки — столбцом на всю ширину */
  .hero[data-hero="center"] .hero-cta,
  .hero[data-hero="right"] .hero-cta,
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin-top: 22px;
  }
  .hero-cta .btn { width: 100%; justify-content: center; --pad-y: 15px; }
}

/* ---------------- БЕГУЩАЯ СТРОКА ---------------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  padding-block: 22px;
}
.marquee .track {
  display: flex; gap: 48px; width: max-content;
  animation: scrollx 28s linear infinite;
}
@media (hover: hover) { .marquee:hover .track { animation-play-state: paused; } }
.marquee .item {
  font-family: var(--display); text-transform: uppercase;
  font-size: clamp(22px, 3vw, 38px); font-weight: 600;
  letter-spacing: .02em; color: var(--muted-2);
  display: inline-flex; align-items: center; gap: 48px;
}
.marquee .item .dot { color: var(--acid); font-size: .6em; }
.marquee .item.lit { color: var(--ink); }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------------- ПОЗИЦИОНИРОВАНИЕ ---------------- */
.pos { background: var(--bg); overflow-x: clip; }
.pos .glow-c { width: 500px; height: 500px; left: 40%; top: 10%; opacity: .18; }
.pos-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px);
  align-items: center; position: relative; z-index: 2;
}
@media (max-width: 880px){ .pos-grid { grid-template-columns: 1fr; } }
.pos h2 {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: clamp(34px, 5vw, 66px); line-height: .98; margin: 18px 0 0; letter-spacing: -.01em;
}
.pos h2 em { font-style: normal; color: var(--acid); }
.pos .pos-text p { color: var(--muted); margin: 22px 0 0; max-width: 46ch; }
.pos .pos-text p b { color: var(--acid); font-weight: 700; }

.pillars { display: grid; gap: 14px; }
.pillar {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 24px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px;
  transition: border-color .3s, transform .3s, background .3s;
}
.pillar:hover { border-color: var(--line-2); transform: translateX(6px); background: var(--panel-2); }
.pillar .pn {
  font-family: var(--display); font-weight: 700; color: var(--acid);
  font-size: 22px; line-height: 1; padding-top: 2px;
}
.pillar h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.pillar p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---------------- УСЛУГИ ---------------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 920px){ .svc-grid { grid-template-columns: 1fr; } }
.svc {
  position: relative; overflow: hidden;
  padding: 34px 30px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .4s, background .4s;
}
.svc:hover { transform: translateY(-8px); border-color: var(--acid); background: var(--panel-2); }
.svc::after {
  content:""; position:absolute; inset:0; opacity:0; transition: opacity .4s;
  background: radial-gradient(120% 90% at 50% -10%, var(--acid-glow), transparent 55%);
  pointer-events:none;
}
.svc:hover::after { opacity:.5; }
.svc .num {
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .2em;
  color: var(--muted-2);
}
.svc .ico {
  margin-top: 18px; width: 52px; height: 52px; border-radius: 12px;
  background: rgba(200,242,58,.12); border: 1px solid rgba(200,242,58,.3);
  display: grid; place-items: center; color: var(--acid);
}
.svc h3 {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: 27px; line-height: 1; margin: 16px 0 10px; letter-spacing: -.005em;
}
.svc p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; position: relative; z-index: 2; }
.svc .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; position: relative; z-index: 2; }
.svc .t {
  font-size: 12px; font-weight: 600; color: var(--muted); padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 100px;
}

/* ---------------- ПОРТФОЛИО ---------------- */
.hover-hint {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--acid); font-weight: 600; white-space: nowrap;
}
.hover-hint svg { width: 15px; height: 15px; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 16px;
}
@media (max-width: 1080px){ .work-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px){ .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px){ .work-grid { grid-template-columns: 1fr; } }

/* «Смотреть ещё» / «Свернуть» — только на мобилке (десктоп показывает все работы сразу) */
.work-more { display: none; }
.work-less { display: none; }
.work-more-btn .wm-count { color: var(--acid); font-weight: 700; }
.work-more-btn .wm-chev, .work-less-btn .wm-chev { width: 18px; height: 18px; }
@keyframes workIn {
  from { opacity: 0; transform: translateY(28px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 600px){
  /* свёрнуто: работы с 7-й спрятаны */
  .work-grid:not(.is-open) .work--extra { display: none; }
  /* развёрнуто: выезжают снизу со стаггером */
  .work-grid.is-open .work--extra {
    animation: workIn .55s cubic-bezier(.16,1,.3,1) both;
  }
  .work-more { display: flex; justify-content: center; margin-top: 22px; }
  .work-more.is-hidden { display: none; }
  .work-more-btn { width: 100%; max-width: 340px; justify-content: center; gap: 8px; }
  /* «Свернуть работы» — показывается только когда сетка развёрнута */
  .work-less { justify-content: center; margin-top: 22px; }
  .work-grid.is-open ~ .work-less { display: flex; }
  .work-less-btn { width: 100%; max-width: 340px; justify-content: center; gap: 8px; }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce){
  .work-grid.is-open .work--extra { animation: none; }
}

.work {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: visible;
  transition: transform .45s cubic-bezier(.16,1,.3,1);
}
.work-media {
  position: absolute; inset: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: box-shadow .45s, border-color .45s;
}
.work:hover { transform: translateY(-6px); }
.work:hover .work-media { border-color: var(--acid); box-shadow: 0 30px 60px -24px rgba(0,0,0,.8), 0 0 0 1px var(--acid); }
.work image-slot { width: 100%; height: 100%; }
/* картинки слотов не должны перехватывать вертикальный скролл на тач-устройствах */
.work image-slot::part(image) { touch-action: pan-y; }

/* — До/После: два наложенных слота, выглядят как один — */
.work .ba { position: absolute; inset: 0; }
.work .ba image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.work .ba-before {
  opacity: 0; pointer-events: none; z-index: 3;
  transition: opacity .45s cubic-bezier(.16,1,.3,1);
}
.work:hover .ba-before { opacity: 1; pointer-events: auto; }
/* уголковый бейдж на верхнем краю (заходит на карточку): Результат → Исходник */
.work .ba-tag {
  position: absolute; top: 0; left: 14px; z-index: 8;
  transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 100px;
  background: rgba(10,12,8,.92); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); color: var(--ink);
  box-shadow: 0 8px 22px -8px rgba(0,0,0,.7);
  pointer-events: none;
  transition: background .45s, color .45s, border-color .45s;
}
.work .ba-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--acid); transition: background .45s;
}
.work .ba-tag::after { content: "Результат"; }
.work:hover .ba-tag {
  background: rgba(10,12,8,.95); color: #f4f6f1; border-color: rgba(244,246,241,.28);
}
.work:hover .ba-tag::before { background: #ff6b5e; }
.work:hover .ba-tag::after { content: "Исходник"; }
/* Карточки без исходника заказчика: не переключаем бейдж и не намекаем на наведение */
.work.no-src .ba-tag { display: none; }
.work.no-src:hover .ba-tag::before { background: var(--acid); }
.work.no-src:hover .ba-tag::after { content: "Результат"; }
.work .meta {
  position: absolute; inset: auto 0 0 0; z-index: 6;
  padding: 16px 16px 14px;
  background: linear-gradient(transparent, rgba(8,9,10,.92) 60%);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s;
  pointer-events: none;
}
.work:hover .meta { opacity: 1; transform: none; }
.work .meta .wt { font-weight: 700; font-size: 14px; }
.work .meta .wc { font-size: 12px; color: var(--acid); font-weight: 600; }
.work.is-wide { grid-column: span 2; aspect-ratio: 2 / 1; align-self: start; }
@media (max-width: 460px){ .work.is-wide { grid-column: span 1; aspect-ratio: 2 / 1; } }

/* iOS Safari: aspect-ratio на grid-элементе, у которого весь контент
   абсолютный, НЕ попадает в высоту трека грида — карточки схлопываются и
   наезжают друг на друга и на следующую секцию. На мобилке высоту карточки
   задаёт сам .work-media (relative + aspect-ratio) — это Safari считает верно. */
@media (max-width: 600px){
  .work,
  .work.is-wide { aspect-ratio: auto; align-self: stretch; }
  .work .work-media {
    position: relative; inset: auto;
    aspect-ratio: 3 / 4;
  }
  .work.is-wide .work-media { aspect-ratio: 2 / 1; }
}

/* — Тач-устройства: гасим «залипший» :hover (он остаётся после тапа и фризит
   тени при скролле). Исходник показываем только при удержании пальца (.peek) — */
@media (hover: none) {
  .work:hover { transform: none; }
  .work:hover .work-media { border-color: var(--line); box-shadow: none; }
  .work:hover .ba-before { opacity: 0; pointer-events: none; }
  .work:hover .ba-tag { background: rgba(10,12,8,.92); color: var(--ink); border-color: var(--line-2); }
  .work:hover .ba-tag::before { background: var(--acid); }
  .work:hover .ba-tag::after { content: "Результат"; }
  .work:hover .meta { opacity: 0; transform: translateY(8px); }

  .work.peek .ba-before { opacity: 1; pointer-events: auto; }
  .work.peek .ba-tag { background: rgba(10,12,8,.95); color: #f4f6f1; border-color: rgba(244,246,241,.28); }
  .work.peek .ba-tag::before { background: #ff6b5e; }
  .work.peek .ba-tag::after { content: "Исходник"; }
  .work.peek .meta { opacity: 1; transform: none; }
  .work.no-src.peek .ba-tag::after { content: "Результат"; }
  .work.no-src.peek .ba-tag::before { background: var(--acid); }
}

/* пустые слоты-плейсхолдеры: видимая подсказка на тёмном */
.work image-slot, .hero-visual image-slot {
  color: rgba(244,246,241,.42);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.work image-slot::part(frame), .hero-visual image-slot::part(frame) {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.022) 0 11px, rgba(255,255,255,.05) 11px 22px),
    var(--panel);
}
/* На широких карточках исходник (портретное фото) показываем целиком на ровном фоне */
.work.is-wide .ba-before::part(frame) { background: #0c0e0a; }
.work image-slot::part(empty), .hero-visual image-slot::part(empty) {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
}


/* ---------------- ЭМОЦИИ КЛИЕНТА (отзыв-чат) ---------------- */
.emo { position: relative; overflow: hidden; }
.emo-stage {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

/* — Круглая плашка-стикер с CTR — */
.ctr-badge {
  position: absolute; top: -52px; right: -86px; z-index: 6;
  width: 196px; height: 196px; border-radius: 50%;
  background: var(--acid); color: #0a0d05;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  text-align: center;
  transform: rotate(9deg);
  box-shadow: 0 26px 80px -18px var(--acid-glow);
}
.ctr-badge::before {
  content: ""; position: absolute; inset: 9px;
  border: 2px dashed rgba(10,13,5,.4); border-radius: 50%;
}
.ctr-badge .b1 {
  font-family: var(--display); font-weight: 700; font-size: 48px; line-height: 1;
  letter-spacing: -0.01em;
}
.ctr-badge .b2 {
  font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
}
/* плашки 2-го и 3-го отзыва — только в мобильной ленте (на десктопе скрыты) */
.ctr-badge--feed { display: none; }

/* — Окно переписки — */
.chat {
  background: #11141c;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
}
.chat--main { position: relative; z-index: 3; }

/* Боковые отзывы — выходят по диагонали из-за центрального (читаются ~на 80%) */
.chat--side {
  position: absolute;
  width: 60%;
  z-index: 1;
  opacity: .92;
  filter: brightness(.85) saturate(.92);
  box-shadow: 0 36px 80px -34px rgba(0,0,0,.85);
  pointer-events: none;
}
/* вынос наружу, но не дальше, чем позволяет экран — аватар всегда в кадре */
.chat--left  { left:  max(-46%, calc(356px - 50vw)); top: -8px; transform: rotate(-6deg); transform-origin: bottom right; }
.chat--right { right: max(-46%, calc(356px - 50vw)); top: 88px; transform: rotate(6deg);  transform-origin: top left; }
.ava.ava--photo { overflow: hidden; }
.ava.ava--photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat--right .ava.ava--i { background: linear-gradient(135deg, #58c08a, #2f9f74); }

@media (max-width: 980px) {
  /* мобайл/планшет: три отзыва идут вертикальной лентой */
  .emo-stage {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 16px; max-width: 460px;
  }
  .chat { width: 100%; box-shadow: 0 22px 55px -30px rgba(0,0,0,.7); }
  /* боковые отзывы перестают быть «веером» и читаются как обычные карточки;
     position:relative — чтобы на их углах закрепить плашки (не absolute, иначе
     наследуют left/right десктопного «веера» и разъезжаются) */
  .chat--side {
    position: relative; display: block; overflow: visible;
    left: auto; right: auto; top: auto;
    width: 100%; opacity: 1;
    filter: none; transform: none;
    pointer-events: auto;
  }
  /* сильный кейс (Матвей: скрины + CTR 27,77%) — первым, остальные следом */
  .chat--main  { order: 0; }
  .chat--left  { order: 1; }
  .chat--right { order: 2; }
  /* круглая плашка CTR садится на верхний-правый угол первой карточки */
  .ctr-badge { width: 124px; height: 124px; top: -34px; right: 6px; transform: rotate(8deg); }
  .ctr-badge .b1 { font-size: 30px; }
  .ctr-badge .b2 { font-size: 10px; }

  /* плашки 2-го и 3-го отзыва сидят на углу своих карточек (размер убывает) */
  .chat--side .chat-head { border-radius: 18px 18px 0 0; }
  .chat--side .chat-body { border-radius: 0 0 18px 18px; }
  .ctr-badge--feed {
    display: flex; position: absolute; z-index: 6;
    padding: 0 8px;
  }
  .ctr-badge--feed .b2 { line-height: 1.05; }
  .cb-2 { width: 104px; height: 104px; top: -24px; right: 8px; transform: rotate(-7deg); }
  .cb-2 .b1 { font-size: 25px; }
  .cb-2 .b2 { font-size: 9px; }
  .cb-3 { width: 88px; height: 88px; top: -20px; right: 8px; transform: rotate(7deg); }
  .cb-3 .b1 { font-size: 21px; }
  .cb-3 .b2 { font-size: 8.5px; }
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #171b25;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.chat-head .ava {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e17076, #c1548a);
  color: #fff; font-weight: 700; font-size: 16px;
}
.chat-head .nm { font-weight: 700; font-size: 15px; color: var(--ink); }
.chat-head .ls { font-size: 12.5px; color: #7d8699; margin-top: 1px; }
.chat-body {
  padding: 18px 16px 22px;
  display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(159,224,32,.05), transparent 60%),
    #0e1118;
}
.chat-body .day { display: flex; justify-content: center; margin-bottom: 4px; }
.chat-body .day span {
  font-size: 12px; color: #8b93a5;
  background: rgba(255,255,255,.05);
  padding: 4px 12px; border-radius: 100px;
}
.chat-body .msg {
  position: relative;
  max-width: 86%;
  align-self: flex-start;
  background: #1c2230;
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 4px 16px 16px 16px;
  padding: 11px 60px 11px 14px;
}
.chat-body .msg p { margin: 0; font-size: 15px; line-height: 1.55; color: #e7ebf2; }
.chat-body .msg .tm {
  position: absolute; right: 12px; bottom: 8px;
  font-size: 11px; color: #7d8699;
}
.chat-body .msg--media {
  padding: 6px 6px 26px;
  display: flex; flex-direction: column; gap: 6px;
  width: 86%;
}
.chat-body .msg--media img {
  display: block; width: 100%; height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  cursor: zoom-in;
}

/* — Лайтбокс для скринов — */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(5,6,8,.9);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

/* ---------------- РАЗВИЛКА КОНТАКТОВ ---------------- */
.contact-modal {
  position: fixed; inset: 0; z-index: 250;
  display: grid; place-items: center; padding: 24px;
  background: rgba(5,6,8,.82);
  backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.contact-modal.open { opacity: 1; pointer-events: auto; }
.contact-modal .cm-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: 34px 28px 28px;
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
  transform: translateY(12px) scale(.98);
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.contact-modal.open .cm-card { transform: none; }
.contact-modal .cm-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 9px;
  color: var(--muted, rgba(244,246,241,.55)); font-size: 24px; line-height: 1;
  cursor: pointer; transition: background .15s, color .15s;
}
.contact-modal .cm-close:hover { background: var(--panel-2); color: var(--ink); }
.contact-modal .cm-title { margin: 0 0 22px; text-align: center; font-family: var(--display); font-size: 24px; font-weight: 700; color: var(--ink); }
.contact-modal .cm-options { display: grid; gap: 12px; }
.contact-modal .cm-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--panel-2); color: var(--ink); text-decoration: none;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.contact-modal .cm-opt:hover { transform: translateY(-2px); border-color: var(--acid); box-shadow: 0 14px 36px -14px var(--acid-glow); }
.contact-modal .cm-opt svg { width: 28px; height: 28px; flex: none; }
.contact-modal .cm-tg svg { color: #2aabee; }
.contact-modal .cm-vk svg { color: #0077ff; }
.contact-modal .cm-opt span { display: flex; flex-direction: column; line-height: 1.25; }
.contact-modal .cm-opt b { font-size: 16px; font-weight: 700; }
.contact-modal .cm-opt i { font-style: normal; font-size: 13px; color: rgba(244,246,241,.55); }
.lightbox img {
  max-width: min(94vw, 1280px); max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0,0,0,.8);
}

@media (max-width: 960px) {
  .chat { width: 100%; }
}

/* ---------------- ПРОЦЕСС ---------------- */
.proc { background: var(--bg-2); }
.proc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 880px){ .proc-grid { grid-template-columns: 1fr; } }
.step {
  background: var(--bg);
  padding: 32px 28px 36px;
  transition: background .3s;
  position: relative;
}
.step:hover { background: var(--panel); }
.step .sn {
  font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--acid);
}
.step h3 { font-size: 19px; font-weight: 800; margin: 20px 0 8px; letter-spacing: -.01em; }
.step p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------------- CTA / КОНТАКТЫ ---------------- */
.cta { position: relative; overflow: hidden; text-align: center; }
.cta .glow-d { width: 700px; height: 700px; left: 50%; top: 50%; transform: translate(-50%,-50%); opacity: .3; }
.cta-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.cta .sig { font-family: var(--script); color: var(--acid); font-size: clamp(26px,3.4vw,42px); transform: rotate(-3deg); margin-bottom: 18px; white-space: nowrap; }
.cta h2 {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: clamp(44px, 9vw, 140px); line-height: .86; letter-spacing: -.02em; margin: 0;
}
.cta h2 .stroke { color: transparent; -webkit-text-stroke: 1.5px var(--line-2); }
.cta p { color: var(--muted); margin: 26px auto 36px; max-width: 46ch; font-size: clamp(16px,1.6vw,20px); }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta .tg {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 20px 32px; border-radius: 100px; background: var(--acid); color: #0a0d05;
  border: 1px solid transparent;
  font-weight: 800; font-size: 20px; letter-spacing: .01em;
  transition: transform .25s, box-shadow .25s, border-color .25s, color .25s;
}
.cta .tg:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 60px -10px var(--acid-glow); }
.cta .tg svg { width: 26px; height: 26px; }
.cta .tg--vk {
  background: transparent; color: var(--ink);
  border-color: var(--line-2);
}
.cta .tg--vk:hover { border-color: var(--acid); color: var(--acid); box-shadow: none; }

/* ---------------- FOOTER ---------------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  color: var(--muted-2); font-size: 14px;
}
.foot-inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.foot .brand { font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 28px; }
.foot .brand > span:last-of-type { text-align: left; }
.foot a { color: var(--muted); transition: color .2s; }
.foot a:hover { color: var(--acid); }
.foot .links { display: flex; gap: 22px; }
