/* =========================================================================
   ZUEV.PRO — Коллегия адвокатов
   Базовая стилистика, токены, типографика, блоки
   ========================================================================= */

/* -------- 0. Fonts (локально WOFF2, по брендбуку) -------- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/Montserrat-ExtraBold.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* -------- 1. Tokens -------- */
:root {
  /* brand colors — exactly from brandbook */
  --c-ink:       #282828;          /* основной текст */
  --c-ink-2:     #5a5a5a;          /* вторичный текст */
  --c-ink-3:     #8a8a8a;          /* третичный, мета */
  --c-line:      #ededed;          /* линии, разделители */
  --c-line-2:    #d8d8d8;          /* активные линии */
  --c-bg:        #ffffff;          /* основной фон */
  --c-bg-soft:   #f6f6f6;          /* мягкий фон секций */
  --c-bg-alt:    #ededed;          /* альтернативный фон */
  --c-red:       #a91b2e;          /* алый — основной акцент */
  --c-red-700:   #861423;          /* hover */
  --c-red-50:    #fbecee;          /* tint */
  --c-bordo:     #5a121e;          /* бордовый — глубокие плашки */
  --c-bordo-700: #420d16;
  --c-bordo-900: #2e0810;
  --c-black:     #000000;

  /* fonts */
  --ff-sans: 'Montserrat', system-ui, -apple-system, sans-serif;

  /* font sizes */
  --fs-display: clamp(38px, 5.4vw, 72px);
  --fs-h1:      clamp(32px, 4vw, 52px);
  --fs-h2:      clamp(26px, 2.6vw, 40px);
  --fs-h3:      clamp(22px, 1.8vw, 28px);
  --fs-h4:      18px;
  --fs-lead:    clamp(18px, 1.4vw, 22px);
  --fs-body:    17px;
  --fs-small:   14px;
  --fs-micro:   12px;

  /* line-heights */
  --lh-display: 1.05;
  --lh-h:       1.18;
  --lh-body:    1.55;
  --lh-small:   1.45;

  /* spacing scale (4-base) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;
  --sp-24: 96px; --sp-32: 128px;

  /* radii */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px;
  --r-lg: 18px; --r-xl: 28px; --r-pill: 999px;

  /* shadows */
  --sh-xs: 0 1px 2px rgba(40,40,40,.04), 0 0 0 1px rgba(40,40,40,.04);
  --sh-sm: 0 2px 6px rgba(40,40,40,.05), 0 1px 2px rgba(40,40,40,.04);
  --sh-md: 0 8px 24px rgba(40,40,40,.08), 0 2px 6px rgba(40,40,40,.04);
  --sh-lg: 0 24px 60px rgba(40,40,40,.12);
  --sh-red: 0 8px 24px rgba(169,27,46,.22);

  /* layout */
  --container:    1240px;
  --gutter:       max(24px, 4vw);
  --section-y:    clamp(38px, 4.8vw, 72px);
  --header-h:     60px;
  --easing:       cubic-bezier(.4,.14,.3,1);
  --dur:          .26s;
}

/* -------- 2. Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; border: 0; background: none; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--c-red); color: #fff; }

/* -------- 3. Layout utilities -------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding-block: var(--section-y); }

/* Хлебные крошки — лаконичная цепочка под шапкой */
.breadcrumbs { padding-top: 20px; }
.breadcrumbs > .container {
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-ink-3);
}
.breadcrumbs a {
  color: var(--c-ink-2);
  text-decoration: none;
  transition: color var(--dur);
}
.breadcrumbs a:hover { color: var(--c-red); }
.breadcrumbs .breadcrumb_last { color: var(--c-ink-3); }
@media (max-width: 600px) {
  .breadcrumbs { padding-top: 14px; }
  .breadcrumbs > .container { font-size: 12px; }
}

.section--soft { background: var(--c-bg-soft); }
.section--alt  { background: var(--c-bg-alt); }
body { counter-reset: section; }
.section-head { counter-increment: section; }
.section-head__meta::before { content: counter(section, decimal-leading-zero) " — "; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: var(--sp-6) var(--sp-12); margin-bottom: var(--sp-8);
  flex-wrap: wrap;
}
.section-head > div {
  min-width: 0;
  flex: 1 1 420px;
}
.section-head > .lead {
  flex: 0 1 420px;
  margin-left: auto;
}
.section-head__title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-h);
  letter-spacing: -.01em;
  position: relative;
  display: block;
}
/* паттерн под названиями секций — субтильно, в карточке-наклейке справа */
.section-head__title::before {
  content: '';
  position: absolute;
  left: 0; top: -28px;
  width: 56px; height: 4px;
  background: var(--c-red);
}
.section-head__meta {
  color: var(--c-ink-3);
  font-size: var(--fs-small);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* -------- 4. Typography -------- */
h1, h2, h3, h4 { font-weight: 700; line-height: var(--lh-h); }
.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 800;
  letter-spacing: -.015em;
}
.h1 { font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-h); letter-spacing: -.01em; }
.h2 { font-size: var(--fs-h2); font-weight: 800; }
.h3 { font-size: var(--fs-h3); font-weight: 700; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--c-ink-2); }
.small { font-size: var(--fs-small); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-red);
}
.text-red { color: var(--c-red); }
.text-bordo { color: var(--c-bordo); }
.text-ink { color: var(--c-ink); }
.text-mute { color: var(--c-ink-2); }

/* -------- 5. Buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-weight: 600; font-size: 16px;
  border-radius: var(--r-md);
  transition: transform var(--dur) var(--easing),
              background var(--dur) var(--easing),
              color var(--dur) var(--easing),
              box-shadow var(--dur) var(--easing),
              border-color var(--dur) var(--easing);
  white-space: nowrap;
  user-select: none;
}
.btn--primary {
  background: var(--c-red);
  color: #fff;
  box-shadow: var(--sh-red);
}
.btn--primary:hover { background: var(--c-red-700); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0) scale(.98); }
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1px solid var(--c-line-2);
}
.btn--ghost:hover { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.btn--ghost-light {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
}
.btn--ghost-light:hover { background: #fff; color: var(--c-bordo); border-color: #fff; }
.btn--lg { padding: 20px 36px; font-size: 17px; }
.btn--block { width: 100%; }
.btn .ic { width: 18px; height: 18px; stroke-width: 2; }

/* -------- 6. Header -------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-ink);
  border-bottom: 3px solid var(--c-red);
}
.header__inner {
  min-height: 60px;
  padding-block: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(20px, 2.6vw, 36px);
}
.logo {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.logo__img {
  display: block;
  height: clamp(38px, 3.2vw, 52px);
  width: auto;
  max-width: 100%;
}
.footer__brand .logo__img { height: 72px; }
.footer__brand .logo-text {
  display: flex; flex-direction: column; gap: 6px;
  line-height: 1;
}
.footer__brand .logo-text__main {
  font-family: var(--ff-sans);
  font-weight: 800;
  font-size: 52px;
  line-height: 1;
  color: #fff;
  letter-spacing: -.02em;
  display: inline-flex; align-items: baseline; gap: 0;
}
.footer__brand .logo-text__dot { color: #fff; }
.footer__brand .logo-text__pro {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--c-red);
  text-stroke: 1.5px var(--c-red);
  -webkit-text-fill-color: transparent;
}
.footer__brand .logo-text__desc {
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(255,255,255,.85);
}
@media (max-width: 640px) {
  .footer__brand .logo-text__main { font-size: 40px; }
  .footer__brand .logo-text__desc { font-size: 11px; }
}

/* Horizontal navigation in main bar */
.nav { display: flex; justify-content: center; align-items: center; min-width: 0; }
.nav ul {
  display: flex; flex-direction: row;
  align-items: center; justify-content: center;
  gap: clamp(14px, 1.8vw, 28px);
  flex-wrap: nowrap;
}
.nav a {
  font-size: 15px; font-weight: 500; color: #fff;
  padding: 6px 2px; position: relative;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--dur);
}
.nav a:hover, .nav a:focus { text-decoration: none; }
.nav a::after {
  content: ''; position: absolute; left: 2px; right: 2px; bottom: 0;
  height: 2px; background: var(--c-red);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--easing);
}
.nav a:hover { color: var(--c-red); }
.nav a:hover::after { transform: scaleX(1); }

.header__phones {
  display: inline-flex; align-items: center; gap: 12px;
}
.header__phones-ic {
  color: var(--c-red); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.header__phones-ic svg { width: 22px; height: 22px; stroke: var(--c-red); stroke-width: 2; }
.header__phones-list {
  display: flex; flex-direction: column; gap: 2px;
  line-height: 1.2;
}
.header__phone {
  font-weight: 700; font-size: 18px; color: #fff;
  white-space: nowrap;
  letter-spacing: -.01em;
  transition: color var(--dur);
}
.header__phone:hover { color: var(--c-red); }
.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
.burger svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 2; }

@media (max-width: 1200px) {
  .nav { display: none; }
  .header__inner {
    display: flex !important;
    align-items: center; justify-content: flex-start;
    min-height: 60px; padding-block: 10px;
    gap: 6px;
    grid-template-columns: none;
  }
  .logo { margin-right: auto; }
  .header__phones { order: 2; }
  .burger { order: 3; display: inline-flex; }
  .logo__img { height: 38px; }
  .header__phones-ic svg { width: 18px; height: 18px; }
  .header__phone { font-size: 15px; }
}
@media (max-width: 640px) {
  .header__phones-list { display: none; }
  .header__phones-ic {
    width: 44px; height: 44px;
    background: transparent;
    border-radius: var(--r-pill);
    transition: background var(--dur);
  }
  .header__phones-ic:hover,
  .header__phones-ic:active { background: rgba(255,255,255,.12); }
  .header__phones-ic svg { width: 22px; height: 22px; }
  .logo__img { height: 28px; }
}

/* mobile nav drawer */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: #fff;
  z-index: 49;
  transform: translateY(-105%);
  transition: transform .3s var(--easing);
  padding: var(--sp-8) var(--gutter);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
.mobile-nav.is-open { transform: translateY(0); visibility: visible; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav ul a {
  display: block; padding: 14px 0;
  font-size: 20px; font-weight: 600;
  border-bottom: 1px solid var(--c-line);
}

.mobile-nav__phones {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid var(--c-line);
  display: flex; flex-direction: column; gap: 12px;
}
.mobile-nav__phone {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--c-bg-soft);
  border-radius: var(--r-md);
  font-size: 19px; font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -.01em;
  transition: background var(--dur), color var(--dur);
}
.mobile-nav__phone:hover,
.mobile-nav__phone:active { background: var(--c-red-50); color: var(--c-red); }
.mobile-nav__phone-ic {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-red);
  background: #fff;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.mobile-nav__phone-ic svg { width: 18px; height: 18px; stroke: var(--c-red); stroke-width: 2; }

/* -------- 7. Hero -------- */
.hero {
  position: relative;
  padding: clamp(34px, 4.2vw, 60px) 0 clamp(38px, 5.4vw, 84px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero__eyebrow::before {
  content: ''; width: 28px; height: 2px; background: currentColor;
}
.hero__title {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}
.hero__descriptor {
  font-size: var(--fs-lead);
  color: var(--c-ink-2);
  line-height: 1.45;
  margin-bottom: 28px;
  max-width: 580px;
}
.hero__quote {
  position: relative;
  padding: 24px 28px 24px 32px;
  background: var(--c-bg-soft);
  border-left: 3px solid var(--c-red);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 36px;
  font-style: italic;
  color: var(--c-ink);
  max-width: 560px;
}
.hero__actions {
  display: flex; gap: 14px; flex-wrap: wrap;
}
.hero__media {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-bg-alt);
}
.hero__media img,
.hero__media .hero-photo {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.hero__media-deco {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero__media-deco::before {
  /* burgundy diagonal slice — overlay */
  content: '';
  position: absolute;
  top: 0; right: 0; width: 60%; height: 100%;
  background: var(--c-bordo);
  clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0;
  transition: opacity .6s ease;
}

/* Hero — Variant A: light bg with diagonal red mini-accent on media */
.hero--light {
  background: #fff;
}
.hero--light::before {
  /* subtle pattern blob */
  content: '';
  position: absolute;
  top: -160px; right: -160px;
  width: 520px; height: 520px;
  background: radial-gradient(circle at 50% 50%, rgba(169,27,46,.06), transparent 60%);
  pointer-events: none;
}
.hero--light .hero__title { color: var(--c-ink); }
.hero--light .hero__eyebrow { color: var(--c-red); }
.hero--light .hero__media {
  background: var(--c-bg-soft);
  box-shadow: 0 30px 80px rgba(40,40,40,.12);
}
.hero--light .hero__media::after {
  /* corner diagonal accent — bordo */
  content: '';
  position: absolute;
  bottom: 0; right: 0; width: 38%; height: 38%;
  background: var(--c-bordo);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.hero--light .hero__media-badge {
  position: absolute;
  bottom: 28px; right: 24px;
  z-index: 2;
  color: #fff;
  font-weight: 700;
  letter-spacing: .04em;
  font-size: 13px;
  text-transform: uppercase;
  text-align: right;
  max-width: 220px;
  line-height: 1.35;
}

/* Hero — Variant B: bordo bg with brand pattern */
.hero--bordo {
  background:
    linear-gradient(135deg, rgba(0,0,0,.20) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(225deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 55%),
    var(--c-bordo);
  color: #fff;
}
.hero--bordo::after {
  /* faint pattern texture */
  content: '';
  position: absolute; inset: 0;
  background-image: url('../patterns/pattern-3.png');
  background-size: 720px auto;
  background-repeat: repeat;
  opacity: .15;
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero--bordo .hero__title { color: #fff; }
.hero--bordo .hero__descriptor { color: rgba(255,255,255,.85); }
.hero--bordo .hero__eyebrow { color: var(--c-red-50); }
.hero--bordo .hero__quote {
  background: rgba(255,255,255,.08);
  border-left-color: #fff;
  color: rgba(255,255,255,.95);
}
.hero--bordo .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero--bordo .btn--ghost:hover { background: #fff; color: var(--c-bordo); border-color: #fff; }
.hero--bordo .hero__media {
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.1);
}
.hero--bordo .hero__media::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 40%; height: 36%;
  background: var(--c-red);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* hero photo — общее фото команды */
.hero-photo {
  position: relative;
  width: 100%; height: 100%;
  background: var(--c-bg-alt);
  overflow: hidden;
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
}

/* -------- 8. Services (2-блок) -------- */
.services {
  background: var(--c-bg);
  position: relative;
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .services__grid { grid-template-columns: 1fr; }
}
.service-card {
  position: relative;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 40px;
  transition: transform var(--dur) var(--easing),
              border-color var(--dur) var(--easing),
              box-shadow var(--dur) var(--easing);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  min-height: 280px;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-line-2);
  box-shadow: var(--sh-md);
}
.service-card__icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-red-50);
  border-radius: var(--r-md);
  color: var(--c-red);
  margin-bottom: 28px;
}
.service-card__icon .ic { width: 28px; height: 28px; stroke-width: 1.8; }
.service-card__title {
  font-size: 24px; font-weight: 700; line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}
.service-card__desc {
  font-size: 16px; color: var(--c-ink-2); line-height: 1.5;
  margin-bottom: 24px; flex-grow: 1;
}
.service-card__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--c-red); font-size: 15px;
  transition: gap var(--dur) var(--easing);
}
.service-card__link .ic { width: 16px; height: 16px; }
.service-card:hover .service-card__link { gap: 14px; }

/* -------- 9. Team -------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

.team-card {
  background: var(--c-bg);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
  display: flex; flex-direction: column;
  transition: transform var(--dur) var(--easing),
              box-shadow var(--dur) var(--easing);
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
}
.team-card__photo {
  aspect-ratio: 4/5;
  background: var(--c-bg-alt);
  overflow: hidden;
  position: relative;
}
.team-card__photo img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center top;
  filter: grayscale(.1);
  transition: transform .8s var(--easing), filter var(--dur) var(--easing);
}
.team-card:hover .team-card__photo img {
  transform: scale(1.04);
  filter: grayscale(0);
}
.team-card__photo::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 32%; height: 28%;
  background: var(--c-bordo);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.team-card__body { padding: 28px 28px 32px; display: flex; flex-direction: column; gap: 14px; flex-grow: 1; }
.team-card__name {
  font-size: 22px; font-weight: 700; line-height: 1.2;
  letter-spacing: -.005em;
}
.team-card__role {
  font-size: 14px; font-weight: 600; color: var(--c-red);
  letter-spacing: .02em;
}
.team-card__bio {
  font-size: 15px; color: var(--c-ink-2); line-height: 1.5;
  flex-grow: 1;
}
.team-card__footer {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
  margin-top: auto;
}
.team-card__stats {
  display: flex; gap: 24px;
  font-size: 13px;
}
.team-card__stat strong {
  display: block; font-size: 22px; font-weight: 700; color: var(--c-ink); line-height: 1;
  margin-bottom: 4px;
}
.team-card__stat span { color: var(--c-ink-3); }
.team-card__btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--c-bg-alt);
  color: var(--c-ink);
  border-radius: var(--r-md);
  font-weight: 600; font-size: 15px;
  transition: background var(--dur), color var(--dur);
}
.team-card__btn:hover { background: var(--c-ink); color: #fff; }
.team-card__btn .ic { width: 16px; height: 16px; }

/* -------- 10. About-text (раскрытие) -------- */
.service-content-heading {
  max-width: 920px;
  margin: 0 auto var(--sp-6);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-h);
  letter-spacing: -.01em;
  position: relative;
  padding-top: 28px;
}
.service-content-heading::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 56px; height: 4px;
  background: var(--c-red);
}
.about-text {
  max-width: 920px; margin: 0 auto;
}
.about-text__body {
  font-size: 18px; line-height: 1.7; color: var(--c-ink-2);
  position: relative;
}
.about-text__body p { margin-bottom: 1.2em; }
.about-text__body p:last-child { margin-bottom: 0; }
.about-text__body ol,
.about-text__body ul {
  margin: 0 0 1.2em;
  padding-left: 1.5em;
}
.about-text__body ol { list-style: decimal; }
.about-text__body ul { list-style: disc; }
.about-text__body li { margin-bottom: .4em; }
.about-text__body li:last-child { margin-bottom: 0; }
.about-text__body.is-collapsed {
  max-height: 9.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 60%, transparent 100%);
}
.about-text__toggle {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 28px;
  padding: 14px 24px;
  border: 1px solid var(--c-line-2);
  border-radius: var(--r-md);
  font-weight: 600; font-size: 15px;
  transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.about-text__toggle:hover { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.about-text__toggle .ic { width: 16px; height: 16px; transition: transform var(--dur); }
.about-text.is-open .about-text__toggle .ic { transform: rotate(180deg); }

/* -------- 11. Practice carousel -------- */
.practice {
  background: var(--c-bg-soft);
  overflow: hidden;
}
.practice__viewport {
  overflow: hidden;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
}
.practice__track {
  display: flex;
  align-items: stretch;
  gap: 24px;
  transition: transform .5s var(--easing);
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
}
.practice-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--c-bg);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-line);
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform var(--dur) var(--easing), box-shadow var(--dur);
  min-width: 0;
}
@media (max-width: 1024px) { .practice-card { flex-basis: calc(50% - 12px); } }
@media (max-width: 640px)  { .practice-card { flex-basis: 86%; } }
.practice-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.practice-card__doc {
  display: block; width: 100%;
  aspect-ratio: 4/3;
  background: #f0f0ec;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--c-line);
  padding: 0; border: 0;
  font: inherit; color: inherit;
  cursor: zoom-in;
}
.practice-card__doc img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) brightness(.99);
  transition: transform .6s var(--easing);
}
.practice-card:hover .practice-card__doc img { transform: scale(1.03); }
.practice-card__doc::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(255,255,255,.45) 100%);
}
.practice-card__stamp {
  position: absolute; top: 12px; right: 12px;
  background: var(--c-red);
  color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  z-index: 2;
}
.practice-card__body {
  padding: 24px 24px 26px;
  display: flex; flex-direction: column; gap: 12px; flex-grow: 1;
  color: inherit; text-decoration: none;
  transition: background var(--dur);
}
.practice-card__body:hover { background: var(--c-bg-soft); }
.practice-card__body:hover .practice-card__link { color: var(--c-red-700); }
.practice-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 4px;
  font-size: 13px; font-weight: 600;
  color: var(--c-red);
  transition: color var(--dur);
}
.practice-card__cat {
  font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-red);
}
.practice-card__title {
  font-size: 18px; font-weight: 700; line-height: 1.3;
  letter-spacing: -.005em;
}
.practice-card__desc {
  font-size: 14px; line-height: 1.5; color: var(--c-ink-2);
  margin-top: 4px;
}
.practice-card__meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--c-ink-3);
  padding-top: 12px;
  border-top: 1px solid var(--c-line);
}
.practice-card__meta span:first-child { font-weight: 600; color: var(--c-ink); }
.carousel-controls {
  display: flex; gap: 12px; align-items: center;
}
.carousel-arrow {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-bg);
  border: 1px solid var(--c-line-2);
  border-radius: var(--r-pill);
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.carousel-arrow:hover:not(:disabled) {
  background: var(--c-ink); color: #fff; border-color: var(--c-ink);
}
.carousel-arrow:disabled { opacity: .35; cursor: not-allowed; }
.carousel-arrow svg { width: 20px; height: 20px; stroke-width: 2; }
.carousel-progress {
  flex: 1; max-width: 240px;
  height: 2px; background: var(--c-line);
  margin: 0 18px; position: relative; border-radius: 999px;
}
.carousel-progress__bar {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--c-red); border-radius: 999px;
  transition: width .4s var(--easing), transform .4s var(--easing);
}

/* -------- 12. Certificates carousel -------- */
.certificates__viewport {
  overflow: hidden;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
}
.certificates__track {
  display: flex;
  gap: 24px;
  transition: transform .5s var(--easing);
  will-change: transform;
  touch-action: pan-y;
  user-select: none;
}
.cert-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 0;
  display: block;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
  font: inherit; color: inherit;
  min-width: 0;
}
@media (max-width: 1024px) { .cert-card { flex-basis: calc(50% - 12px); } }
@media (max-width: 640px)  { .cert-card { flex-basis: 86%; } }
.cert-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
  border-color: var(--c-red-50);
}
.cert-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 1413 / 2000;
  object-fit: cover;
  object-position: top center;
  background: var(--c-bg-soft);
}

/* -------- Modal (бренд-стиль) -------- */
[hidden] { display: none !important; }

.modal {
  position: fixed; inset: 0; z-index: 110;
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(12px, 2.5vw, 28px);
  opacity: 0;
  transition: opacity .22s ease;
}
.modal.is-open { display: flex; opacity: 1; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 8, 12, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 30px 80px rgba(20,8,12,.45);
  overflow: hidden;
  animation: modal-in .28s var(--easing);
  max-height: calc(100vh - 24px);
  display: flex; flex-direction: column;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.14);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 3;
  cursor: pointer;
  transition: background var(--dur);
}
.modal__close:hover { background: rgba(255,255,255,.28); }
.modal__close svg { width: 18px; height: 18px; stroke: #fff; stroke-width: 2; }
.modal__header {
  background: var(--c-bordo);
  background-image: url('../patterns/pattern-1.png');
  background-size: 360px auto;
  background-repeat: repeat;
  background-position: center center;
  color: #fff;
  padding: 20px 24px 18px;
  position: relative;
}
.modal__header::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.25));
  pointer-events: none;
}
.modal__eyebrow {
  position: relative;
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: 4px;
}
.modal__title {
  position: relative;
  font-size: 18px; font-weight: 800; line-height: 1.25;
  letter-spacing: -.005em;
  color: #fff;
}
.modal__form {
  padding: 18px 24px 22px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field__label {
  font-size: 12px; font-weight: 600;
  color: var(--c-ink-2);
  letter-spacing: .01em;
}
.field__req { color: var(--c-red); }
.field__input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--c-line-2);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color var(--dur), box-shadow var(--dur);
  font-family: inherit;
}
.field__input::placeholder { color: var(--c-ink-3); }
.field__input:focus {
  outline: 0;
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px var(--c-red-50);
}
.field__input--textarea { resize: vertical; min-height: 56px; }
.field-check {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11px; line-height: 1.4;
  color: var(--c-ink-2);
  cursor: pointer;
  margin-top: 2px;
}
.field-check input {
  margin-top: 1px;
  width: 14px; height: 14px;
  accent-color: var(--c-red);
  flex-shrink: 0;
}
.field-check a { color: var(--c-red); text-decoration: underline; }
.modal__form .btn { padding: 14px 20px; font-size: 15px; margin-top: 4px; }
.modal__alt {
  text-align: center;
  font-size: 12px;
  color: var(--c-ink-3);
  margin-top: 2px;
}
.modal__alt a { color: var(--c-ink); font-weight: 700; }
.modal__alt a:hover { color: var(--c-red); }
.modal__success {
  padding: 28px 24px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.modal__success-ic {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-red-50);
  color: var(--c-red);
  border-radius: var(--r-pill);
}
.modal__success-ic svg { stroke: var(--c-red); }
.modal__success p { font-size: 13px; color: var(--c-ink-2); line-height: 1.5; }
@media (max-width: 480px) {
  .modal__header { padding: 18px 20px 16px; }
  .modal__title { font-size: 17px; }
  .modal__form { padding: 16px 20px 20px; gap: 10px; }
}

/* Universal lightbox (certs + practice) */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 8, 12, .92);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  padding: clamp(20px, 4vw, 60px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity .22s ease;
}
.lightbox.is-open { display: flex; opacity: 1; }
.lightbox__stage {
  position: relative;
  max-width: 100%; max-height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  width: auto; height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  cursor: default;
}
.lightbox__counter {
  position: absolute;
  bottom: -36px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.12);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--dur), transform var(--dur);
  z-index: 2;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__close svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.05); }
.lightbox__nav svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 2; }
@media (max-width: 640px) {
  .lightbox__nav { width: 42px; height: 42px; }
  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
  .lightbox__close { top: 12px; right: 12px; }
}

/* -------- 13. Reviews -------- */
.reviews {
  background: var(--c-bg);
  overflow: hidden;
}
/* Карусель отзывов — нативный горизонтальный скролл со снэпом.
   Браузер сам разруливает жесты: горизонталь — листание, вертикаль —
   прокрутка текста внутри карточки. Никаких JS-конфликтов на тач. */
.reviews__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* горизонтальный скроллбар не показываем */
  scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter) 12px;
}
.reviews__viewport::-webkit-scrollbar { display: none; }
.reviews__track {
  display: flex; align-items: stretch; gap: 24px;
  /* ширина по контенту — обязательно для нативного горизонтального скролла */
  width: max-content;
}
.review-card {
  /* ширину задаёт JS (--rev-card-w) по числу видимых карточек на брейкпоинте */
  flex: 0 0 auto;
  width: var(--rev-card-w, 320px);
  scroll-snap-align: start;
  background: var(--c-bg-soft);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: 32px 32px 28px;
  display: flex; flex-direction: column;
  gap: 18px;
  /* фиксированная высота — карточки равные, выровнены по низу;
     текст прокручивается внутри */
  height: 360px;
}
.review-card__quote {
  font-size: 38px; line-height: 1; color: var(--c-red);
  font-family: Georgia, serif;
  height: 28px;
  flex-shrink: 0;
}
.review-card__text {
  font-size: 15px; line-height: 1.55; color: var(--c-ink);
  /* длинный отзыв прокручивается внутри карточки;
     touch-action не трогаем — браузер сам разруливает вертикаль (скролл
     текста) и горизонталь (нативный скролл карусели) */
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 10px;
  margin-right: -6px;
}
.review-card__text::-webkit-scrollbar { width: 4px; }
.review-card__text::-webkit-scrollbar-thumb {
  background: var(--c-red-50, #d99); border-radius: 4px;
}
.review-card__text {
  scrollbar-width: thin;
  scrollbar-color: var(--c-red-50, #d99) transparent;
}
.review-card__footer {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
}
.review-card__avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--c-red);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.review-card__name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.review-card__meta { font-size: 12px; color: var(--c-ink-3); margin-top: 3px; }
.review-card__stars { color: #f0b400; font-size: 14px; letter-spacing: 1px; margin-left: auto; }

/* -------- 14. FAQ -------- */
.faq {
  background: var(--c-bg);
}
.faq__list { max-width: 900px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--c-line);
}
.faq-item__btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 28px 8px;
  text-align: left;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-ink);
  transition: color var(--dur);
}
.faq-item__btn:hover { color: var(--c-red); }
.faq-item__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-bg-alt);
  border-radius: var(--r-pill);
  transition: background var(--dur), color var(--dur), transform var(--dur);
}
.faq-item.is-open .faq-item__icon {
  background: var(--c-red); color: #fff; transform: rotate(45deg);
}
.faq-item__icon svg { width: 16px; height: 16px; stroke-width: 2.4; }
.faq-item__body {
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--easing);
}
.faq-item__body-inner {
  padding: 0 8px 28px;
  font-size: 16px; line-height: 1.6;
  color: var(--c-ink-2);
  max-width: 780px;
}

/* -------- 15. Footer -------- */
.footer {
  background: var(--c-ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.footer__inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(48px, 6vw, 80px);
  padding: clamp(56px, 7vw, 96px) 0 36px;
}
/* Декоративная вертикальная линия между контактами и картой */
.footer__inner::before {
  content: '';
  position: absolute;
  top: clamp(56px, 7vw, 96px);
  bottom: 36px;
  left: 52.4%;
  width: 2px;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0) 0%,
      rgba(255,255,255,.08) 10%,
      var(--c-red) 30%,
      var(--c-red) 70%,
      rgba(255,255,255,.08) 90%,
      rgba(255,255,255,0) 100%);
  box-shadow: 0 0 24px rgba(169,27,46,.35);
  pointer-events: none;
}
@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__inner::before { display: none; }
}
.footer__brand { margin-bottom: 32px; }
.footer__contacts { display: flex; flex-direction: column; gap: 18px; }
.footer__contact {
  display: flex; align-items: flex-start; gap: 14px;
}
.footer__contact .ic {
  width: 20px; height: 20px;
  color: rgba(255,255,255,.6);
  flex-shrink: 0;
  margin-top: 3px;
  stroke-width: 2;
}
.footer__contact strong { font-weight: 700; display: block; font-size: 16px; line-height: 1.3; }
.footer__contact span { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.5; }
.footer__contact a { display: block; color: #fff; transition: color var(--dur); }
.footer__contact a:hover strong { color: var(--c-red); }
.footer__contact-phones { display: flex; flex-direction: column; gap: 4px; }
.footer__contact-phones span { margin-top: 4px; }
.footer__map {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  min-height: 320px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(255,255,255,.1);
  position: relative;
  max-width: 100%;
}
@media (max-width: 900px) {
  .footer__map {
    aspect-ratio: 16/10;
    min-height: 220px;
    height: 260px;
  }
}
.footer__map iframe { width: 100%; height: 100%; border: 0; display: block; }
.footer__map-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  color: rgba(255,255,255,.7);
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.07), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,.05), transparent 50%);
}
.footer__map-pin {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-red);
  color: #fff;
  border-radius: var(--r-pill);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.footer__map-pin svg { width: 28px; height: 28px; stroke-width: 2; }
.footer__map-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.footer__legal {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 24px 0 32px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: rgba(255,255,255,.6);
}
.footer__legal a { color: rgba(255,255,255,.8); }
.footer__legal a:hover { color: #fff; }

/* -------- 16. Fixed CTA (mobile / scroll) -------- */
.fixed-cta {
  position: fixed;
  bottom: 16px; right: 16px;
  z-index: 40;
  display: inline-flex; align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--c-red);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 600; font-size: 15px;
  box-shadow: var(--sh-lg);
  transform: translateY(120%);
  transition: transform .4s var(--easing), background var(--dur);
}
.fixed-cta.is-visible { transform: translateY(0); }
.fixed-cta:hover { background: var(--c-red-700); }
.fixed-cta .ic { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .fixed-cta { left: 16px; right: 16px; bottom: 16px; justify-content: center; }
}

/* -------- 17. Scroll animations -------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--easing), transform .8s var(--easing);
}
.reveal.is-in {
  opacity: 1; transform: none;
}
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* -------- 18. Helpers -------- */
.icon { width: 20px; height: 20px; stroke-width: 2; }
.lucide { stroke-width: 2; }
.divider {
  height: 1px; background: var(--c-line);
  margin-block: 0;
}
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }

/* -------- 19. Pattern decor strip (для секций) -------- */
.pattern-strip {
  height: 8px;
  background: var(--c-red);
  position: relative;
  overflow: hidden;
}
.pattern-strip::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 8px,
    rgba(0,0,0,.18) 8px,
    rgba(0,0,0,.18) 16px
  );
  opacity: .5;
}

/* ──────────────────────────────────────────────────────────────────────────
 * FSE / Gutenberg compatibility — Query Loop wraps content in <ul class="wp-block-post-template">.
 * Перенаправляем наш flex/grid с .__track на дочерний <ul>.
 * ────────────────────────────────────────────────────────────────────────── */

/* Сбрасываем дефолтные стили post-template */
.wp-block-post-template { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.wp-block-post-template > li { list-style: none; margin: 0; }
.wp-block-post { margin: 0 !important; }

/* Карусели — flex переходит на ul */
.practice__track > ul.wp-block-post-template,
.certificates__track > ul.wp-block-post-template,
.reviews__track > ul.wp-block-post-template {
  display: flex;
  flex-direction: row;
  gap: 24px;
  touch-action: pan-y;
  user-select: none;
}
.practice__track > ul > li      { flex: 0 0 calc(33.333% - 16px); min-width: 0; }
@media (max-width: 1024px) { .practice__track > ul > li { flex-basis: calc(50% - 12px); } }
@media (max-width: 640px)  { .practice__track > ul > li { flex-basis: 86%; } }

.certificates__track > ul > li  { flex: 0 0 calc(20% - 20px); min-width: 0; }
@media (max-width: 1200px) { .certificates__track > ul > li { flex-basis: calc(25% - 18px); } }
@media (max-width: 900px)  { .certificates__track > ul > li { flex-basis: calc(33.333% - 16px); } }
@media (max-width: 640px)  { .certificates__track > ul > li { flex-basis: calc(50% - 12px); } }
@media (max-width: 480px)  { .certificates__track > ul > li { flex-basis: 80%; } }

.reviews__track > ul > li       { flex: 0 0 calc(33.333% - 16px); min-width: 0; }
@media (max-width: 1024px) { .reviews__track > ul > li { flex-basis: calc(50% - 12px); } }
@media (max-width: 640px)  { .reviews__track > ul > li { flex-basis: 88%; } }

/* Team grid */
.team-grid > ul.wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .team-grid > ul.wp-block-post-template { grid-template-columns: 1fr; } }

/* Services grid */
.services__grid > ul.wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 720px) { .services__grid > ul.wp-block-post-template { grid-template-columns: 1fr; } }

/* Карточки внутри li (Query Loop) тянутся на всю высоту ячейки */
.wp-block-post > .team-card,
.wp-block-post > .practice-card,
.wp-block-post > .cert-card,
.wp-block-post > .review-card { height: 100%; }

/* Featured image в карточках — без wrapper-фигуры от FSE */
.team-card .wp-block-post-featured-image,
.practice-card .wp-block-post-featured-image,
.cert-card .wp-block-post-featured-image {
  margin: 0;
  display: block;
  width: 100%;
}
.team-card .wp-block-post-featured-image img,
.practice-card .wp-block-post-featured-image img,
.cert-card .wp-block-post-featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* (Сброс margin'ов карточек убран — глобальный `* { margin: 0 }` уже это делает,
   а этот селектор перебивал margin-top:auto и ломал прижатие футера/ссылки вниз.) */

/* Заголовок страницы (WP добавляет на single CPT) — наш кастомный заголовок уже в шаблоне */
.wp-block-post-title { font-family: inherit; }

/* Скрываем wp-admin-bar чтоб не ломал sticky-хедер на превью */
html.is-admin-bar-open { scroll-padding-top: 32px; }

/* FSE оборачивает template-part в <header class="wp-block-template-part">.
   Делаем обёртку «прозрачной» в layout-смысле — наш .header сам становится sticky прямо в .wp-site-blocks. */
header.wp-block-template-part,
footer.wp-block-template-part {
  display: contents;
}

/* Admin-bar (если залогинен) — отступ под админ-бар */
.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .header { top: 46px; }
}

/* ──────────────────────────────────────────────────────────────────────────
 * Case gallery — фото суд. решений на странице кейса (со стрелками)
 * ────────────────────────────────────────────────────────────────────────── */
.case-gallery {
  position: relative;
  width: 100%;
  background: var(--c-bg-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--sh-md);
}
.case-gallery__viewport {
  position: relative;
  width: 100%; height: 100%;
}
.case-gallery__slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; margin: 0; border: 0;
  background: transparent;
  cursor: zoom-in;
  opacity: 0;
  transition: opacity .3s var(--easing);
  pointer-events: none;
}
.case-gallery__slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.case-gallery__slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}
.case-gallery__arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.92);
  color: var(--c-ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--sh-md);
  z-index: 2;
  transition: background var(--dur), transform var(--dur);
}
.case-gallery__arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}
.case-gallery__arrow--prev { left: 12px; }
.case-gallery__arrow--next { right: 12px; }
.case-gallery__arrow svg { width: 22px; height: 22px; stroke: var(--c-ink); stroke-width: 2; }
.case-gallery__counter {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(40,40,40,.85);
  color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  letter-spacing: .04em;
  z-index: 2;
}

/* ──────────────────────────────────────────────────────────────────────────
 * Lawyer hero (single-lawyer)
 * ────────────────────────────────────────────────────────────────────────── */
.lawyer-hero { padding-block: clamp(34px, 4.2vw, 60px) clamp(38px, 5.4vw, 84px); }
.lawyer-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
@media (max-width: 900px) { .lawyer-hero__grid { grid-template-columns: 1fr; } }
.lawyer-hero__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-red);
  margin-bottom: 12px;
}
.lawyer-hero__title {
  font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-h);
  letter-spacing: -.01em; margin-bottom: 8px;
}
.lawyer-hero__role {
  font-size: var(--fs-lead); font-weight: 600; color: var(--c-red);
  margin-bottom: 16px;
}
.lawyer-hero__bio {
  font-size: var(--fs-body); color: var(--c-ink-2);
  line-height: 1.6; margin-bottom: 24px;
}
.lawyer-hero__stats {
  display: flex; gap: 32px; padding: 20px 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 28px;
}
.lawyer-hero__stat strong {
  display: block; font-size: 32px; font-weight: 800; color: var(--c-ink);
  line-height: 1; margin-bottom: 4px;
}
.lawyer-hero__stat span { font-size: 13px; color: var(--c-ink-3); }
.lawyer-hero__media {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--c-bg-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
.lawyer-hero__photo {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  display: block;
}
.lawyer-hero__media::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 38%; height: 36%;
  background: var(--c-bordo);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* ──────────────────────────────────────────────────────────────────────────
 * Case hero (single-case)
 * ────────────────────────────────────────────────────────────────────────── */
.case-hero { padding-block: clamp(34px, 4.2vw, 60px) clamp(38px, 5.4vw, 84px); }
.case-hero__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--c-ink-2);
  margin-bottom: 20px;
}
.case-hero__back:hover { color: var(--c-red); }
.case-hero__cat {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-red);
  margin-bottom: 12px;
}
.case-hero__title {
  font-size: var(--fs-h1); font-weight: 800; line-height: var(--lh-h);
  letter-spacing: -.01em; margin-bottom: 28px;
  max-width: 900px;
}
.case-hero__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 900px) { .case-hero__grid { grid-template-columns: 1fr; } }
.case-hero__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px; row-gap: 6px;
  font-size: 14px;
  padding: 16px 0; margin-bottom: 28px;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
.case-hero__meta dt { color: var(--c-ink-3); font-weight: 500; }
.case-hero__meta dd { color: var(--c-ink); font-weight: 600; margin: 0; }
.case-hero__section-h {
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--c-red);
  margin: 24px 0 8px;
}
.case-hero__copy p { line-height: 1.6; color: var(--c-ink-2); }
.case-hero__outcome {
  background: var(--c-red-50);
  padding: 14px 18px;
  border-left: 3px solid var(--c-red);
  border-radius: var(--r-sm);
  color: var(--c-ink) !important;
  font-weight: 500;
}

/* ──────────────────────────────────────────────────────────────────────────
 * Practice archive — страница /cases/ — сетка всех дел
 * ────────────────────────────────────────────────────────────────────────── */
.practice-archive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1024px) { .practice-archive { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .practice-archive { grid-template-columns: 1fr; } }

.practice-archive__card {
  background: var(--c-bg);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
  overflow: hidden;
  display: flex; flex-direction: column;
  color: inherit;
  transition: transform var(--dur), box-shadow var(--dur), border-color var(--dur);
  text-decoration: none;
}
.practice-archive__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--c-red-50);
}
.practice-archive__doc {
  position: relative;
  aspect-ratio: 4/3;
  background: #f0f0ec;
  overflow: hidden;
  border-bottom: 1px solid var(--c-line);
}
.practice-archive__doc img {
  width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) brightness(.99);
  transition: transform .6s var(--easing);
}
.practice-archive__card:hover .practice-archive__doc img { transform: scale(1.04); }
.practice-archive__stamp {
  position: absolute; top: 12px; right: 12px;
  background: var(--c-red);
  color: #fff;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  z-index: 2;
}
.practice-archive__body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 10px;
  flex-grow: 1;
}
.practice-archive__cat {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-red);
}
.practice-archive__title {
  font-size: 17px; font-weight: 700; line-height: 1.3;
  color: var(--c-ink);
}
.practice-archive__outcome {
  font-size: 13px; color: var(--c-ink-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.practice-archive__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: auto;
  font-size: 13px; font-weight: 600;
  color: var(--c-red);
}
.practice-archive-section { padding-block: clamp(38px, 4.8vw, 72px); }

/* ──────────────────────────────────────────────────────────────────────────
 * Cookie-баннер
 * ────────────────────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 90;
  width: 340px; max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: 0 10px 32px rgba(20,8,12,.16);
  animation: cookie-in .35s var(--easing);
}
.cookie-banner[hidden] { display: none; }
@keyframes cookie-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.cookie-banner__inner {
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.cookie-banner__icon { display: none; }
.cookie-banner__text {
  font-size: 12.5px; line-height: 1.45;
  color: var(--c-ink-2);
}
.cookie-banner__text a { color: var(--c-red); font-weight: 600; text-decoration: underline; }
.cookie-banner__accept {
  align-self: flex-start;
  padding: 8px 22px;
  font-size: 14px;
}
@media (max-width: 480px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; width: auto; }
  .cookie-banner__accept { align-self: stretch; }
}

/* ──────────────────────────────────────────────────────────────────────────
 * 404 страница
 * ────────────────────────────────────────────────────────────────────────── */
.notfound {
  padding-block: clamp(48px, 9vw, 120px);
  background: var(--c-bg-soft);
  position: relative;
  overflow: hidden;
}
.notfound::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../patterns/pattern-3.png');
  background-size: 480px auto;
  opacity: .04;
  pointer-events: none;
}
.notfound__inner {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.notfound__code {
  font-size: clamp(120px, 22vw, 240px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--c-red);
  background: linear-gradient(180deg, var(--c-red) 0%, var(--c-bordo) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.notfound__title {
  font-size: var(--fs-h1);
  font-weight: 800;
  line-height: var(--lh-h);
  letter-spacing: -.01em;
  margin-top: 8px;
}
.notfound__text {
  font-size: var(--fs-lead);
  color: var(--c-ink-2);
  line-height: 1.5;
  margin-top: 16px;
}
.notfound__actions {
  display: flex; gap: 14px; justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.notfound__links {
  display: flex; gap: 24px; justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line-2);
}
.notfound__links a {
  font-size: 15px; font-weight: 600;
  color: var(--c-ink-2);
  transition: color var(--dur);
}
.notfound__links a:hover { color: var(--c-red); }
@media (max-width: 600px) {
  .notfound__actions .btn { width: 100%; }
}

/* ──────────────────────────────────────────────────────────────────────────
 * Legal — страница политики конфиденциальности
 * ────────────────────────────────────────────────────────────────────────── */
.legal { padding-block: clamp(40px, 6vw, 80px); }
.legal__inner { max-width: 820px; margin: 0 auto; }
.legal__title {
  font-size: var(--fs-h1);
  font-weight: 800; line-height: var(--lh-h);
  letter-spacing: -.01em;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--c-red);
}
.legal__h2 {
  font-size: var(--fs-h3);
  font-weight: 700; line-height: 1.3;
  color: var(--c-ink);
  margin: 36px 0 12px;
}
.legal__p {
  font-size: 15px; line-height: 1.65;
  color: var(--c-ink-2);
  margin-bottom: 10px;
}
.legal__li {
  font-size: 15px; line-height: 1.6;
  color: var(--c-ink-2);
  padding-left: 18px;
  margin-bottom: 6px;
  position: relative;
}
.legal__li::before {
  content: '';
  position: absolute; left: 0; top: 11px;
  width: 6px; height: 6px;
  background: var(--c-red);
  border-radius: 50%;
}
.legal__inner a { color: var(--c-red); text-decoration: underline; }

/* Кредит разработчика в подвале */
.footer__credit {
  position: relative; z-index: 2;
  margin-top: 8px;
  padding: 16px 0 24px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.1);
}
.footer__credit a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  transition: color var(--dur);
}
.footer__credit a:hover { color: var(--c-red-50); }
