/* ==========================================================================
   ПрофЛаб — стиль «Отчёт консультанта»
   Светлая «бумага» по умолчанию, тёмная тема — переключателем.
   Заголовки — Source Serif 4, текст — Onest, цифры и метки — JetBrains Mono.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --f-serif: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; /* заголовки */
  --f-sans:  'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono:  'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; /* подписи */

  /* бумага */
  --bg:        #f2f0ea;
  --surface:   #f7f5f0;
  --surface-2: #e9e6de;
  --card:      #f9f7f2;
  --card-hi:   #fdfcf9;

  /* чернила */
  --text:      #16181d;
  --muted:     #4d525c;
  --muted-2:   #80848c;

  /* единственный акцент — чернильно-синий */
  --accent:      #2443b8;
  --accent-2:    #2443b8;
  --accent-soft: rgba(36,67,184,0.07);
  --on-ink:      #f2f0ea;

  --border:    rgba(22,24,29,0.11);
  --border-2:  rgba(22,24,29,0.2);
  --rule:      #16181d;

  --nav-bg:          rgba(242,240,234,0.88);
  --nav-bg-scrolled: rgba(242,240,234,0.96);
  --card-shadow:     none;
  --grain-opacity:   0.05;

  --radius:    4px;
  --radius-sm: 2px;
  --maxw:      1200px;
  --prose:     720px;
  --ease:      cubic-bezier(0.2, 0.7, 0.2, 1);
  --nav-h:     64px;

  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='square'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* ─────────────── DARK (графит, без свечений) ─────────────── */
:root[data-theme="dark"] {
  --bg:        #131417;
  --surface:   #17181b;
  --surface-2: #1c1d21;
  --card:      #18191c;
  --card-hi:   #1e1f23;

  --text:      #e8e6e0;
  --muted:     #a7a69f;
  --muted-2:   #77776f;

  --accent:      #8ea3f3;
  --accent-2:    #8ea3f3;
  --accent-soft: rgba(142,163,243,0.09);
  --on-ink:      #131417;

  --border:    rgba(232,230,224,0.1);
  --border-2:  rgba(232,230,224,0.19);
  --rule:      #e8e6e0;

  --nav-bg:          rgba(19,20,23,0.86);
  --nav-bg-scrolled: rgba(19,20,23,0.95);
  --grain-opacity:   0.035;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--f-sans);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  counter-reset: sec;
  transition: background-color 0.3s, color 0.3s;
}
/* бумажное зерно */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 500; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::after { filter: invert(1); }

a { color: inherit; }
img, svg, video { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.wrap { max-width: var(--maxw); margin: 0 auto; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
  top: 12px; left: 12px; z-index: 1000; padding: 10px 16px;
  background: var(--text); color: var(--on-ink); text-decoration: none;
}

/* ─────────────── NAV ─────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h); padding: 0 32px;
  background: var(--nav-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.site-nav.scrolled { background: var(--nav-bg-scrolled); }
.admin-bar .site-nav { top: 32px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none;
}
.logo-mark {
  width: 22px; height: 22px; border-radius: var(--radius-sm);
  background: var(--text); display: grid; place-items: center;
}
.logo-mark svg { width: 14px; height: 14px; }
.logo-mark svg path { stroke: var(--bg); }
.logo img.custom-logo { height: 28px; width: auto; }
.site-nav ul { list-style: none; display: flex; gap: 28px; }
.site-nav ul a {
  position: relative; color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 450;
  padding: 6px 0; transition: color 0.2s;
}
.site-nav ul a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.site-nav ul a:hover { color: var(--text); }
.site-nav ul a:hover::after { transform: scaleX(1); }
.site-nav ul .current-menu-item:not(.menu-item-home) > a { color: var(--text); }
.site-nav ul .current-menu-item:not(.menu-item-home) > a::after { transform: scaleX(1); }
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: transparent;
  color: var(--muted); cursor: pointer; padding: 0;
  transition: color 0.2s, border-color 0.2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--on-ink);
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; font-weight: 500;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--accent); color: #fff; }
.nav-cta:active { transform: translateY(1px); }

/* ─────────────── HERO ─────────────── */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 104px) 32px 96px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  position: relative; width: 100%;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
}
.hero-inner > * { grid-column: 1 / -1; }
.hero-tag {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted);
  margin-bottom: 40px; letter-spacing: 0;
}
.hero-tag::before { content: ''; width: 40px; height: 1px; background: var(--rule); flex-shrink: 0; }
.hero h1 {
  grid-column: 1 / 12;
  font-family: var(--f-serif); font-optical-sizing: auto;
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  font-weight: 700; line-height: 1.0; letter-spacing: -0.028em;
  max-width: 17ch; margin-bottom: 56px;
}
.hero h1 em, .page-hero h1 em, .sec-title em, .text-block h2 em { font-style: normal; color: var(--accent); }
.hero-lead {
  grid-column: 1 / 7;
  font-size: clamp(1.02rem, 1.3vw, 1.14rem); color: var(--muted);
  max-width: 52ch; line-height: 1.65; margin: 0;
  padding-top: 20px; border-top: 1px solid var(--border-2);
}
.hero-actions {
  grid-column: 8 / 13; align-self: end;
  display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center; justify-content: flex-end;
}

/* ─────────────── BUTTONS ─────────────── */
.btn-primary,
.wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--on-ink);
  padding: 15px 22px; border-radius: var(--radius-sm); border: none; box-shadow: none;
  text-decoration: none; font-family: var(--f-sans); font-weight: 500; font-size: 0.95rem; line-height: 1.4;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.btn-primary:hover,
.wp-block-button .wp-block-button__link:hover { background: var(--accent); color: #fff; }
.btn-primary:active,
.wp-block-button .wp-block-button__link:active { transform: translateY(1px); }
.wp-block-button:not(.is-style-outline) .wp-block-button__link::after {
  content: ''; width: 16px; height: 16px; flex-shrink: 0; background: currentColor;
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat;
  transition: transform 0.25s var(--ease);
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover::after { transform: translateX(3px); }
/* «контурная» кнопка = текстовая ссылка */
.btn-ghost,
.wp-block-button.is-style-outline .wp-block-button__link {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--text); border: none; box-shadow: none;
  padding: 15px 2px; border-radius: 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  text-decoration-color: var(--border-2);
  font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.btn-ghost:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: transparent; color: var(--accent); text-decoration-color: currentColor; }
.btn-primary svg, .btn-ghost svg { width: 16px; height: 16px; }

/* ─────────────── STATS ─────────────── */
.stats { background: var(--bg); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 28px 38px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: none; padding-left: 0; }
.stat-num {
  font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(2.3rem, 4vw, 3.4rem); letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--text); margin-bottom: 14px;
}
.stat-num span, .stat-num em { color: var(--accent); font-style: normal; }
.stat-label { font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); line-height: 1.5; max-width: 26ch; }

/* ─────────────── SECTIONS ─────────────── */
.block { padding: 120px 32px 132px; }
.bg-surface  { background: var(--surface); }
.bg-surface2 { background: var(--surface-2); }
.bg-base     { background: var(--bg); }
.pl-sec.block { border-top: 1px solid var(--border); }

.sec-head {
  display: grid; grid-template-columns: minmax(150px, 3fr) 9fr; column-gap: 24px;
  margin-bottom: 72px; max-width: none; text-align: left;
}
.sec-head.center { margin-left: 0; margin-right: 0; text-align: left; }
.sec-head > * { grid-column: 2; }
.sec-head > .eyebrow { grid-column: 1; grid-row: 1 / span 3; align-self: start; padding-top: 0.9em; }
.eyebrow {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--f-mono); font-size: 0.76rem; font-weight: 400; letter-spacing: 0;
  color: var(--muted); margin-bottom: 18px;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }
.sec-head > .eyebrow::before,
.contact-info > .eyebrow::before {
  counter-increment: sec; content: counter(sec, decimal-leading-zero);
  color: var(--text); font-weight: 500;
  padding-right: 10px; border-right: 1px solid var(--border-2);
}
.sec-title {
  font-family: var(--f-serif); font-optical-sizing: auto;
  font-size: clamp(2rem, 3.9vw, 3.15rem); font-weight: 700;
  letter-spacing: -0.022em; line-height: 1.06; margin-bottom: 22px; max-width: 20ch;
}
.sec-sub { color: var(--muted); font-size: 1.06rem; line-height: 1.65; max-width: 58ch; }

/* ─────────────── «ОТЧЁТНЫЕ» СЕТКИ КАРТОЧЕК ─────────────── */
.services, .case-grid, .post-grid, .team-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; row-gap: 0;
}
.services.cols-3, .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
.scard {
  position: relative;
  display: flex; flex-direction: column;
  padding: 30px 0 44px;
  border-top: 1px solid var(--border-2);
  background: transparent; border-radius: 0; box-shadow: none;
}
.scard::before {
  content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--text); transition: width 0.5s var(--ease);
}
.scard:hover::before { width: 100%; }
.scard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.scard-icon, .fcard-icon, .cdet-icon { display: none; }
.scard-num { font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0; text-align: left; }
.scard h3 {
  font-family: var(--f-serif); font-weight: 700; font-size: 1.62rem; line-height: 1.15;
  letter-spacing: -0.015em; margin-bottom: 14px; max-width: 22ch;
}
.scard h3 a { text-decoration: none; transition: color 0.2s; }
.scard:hover h3, .scard:hover h3 a { color: var(--accent); }
.scard > p, .scard .scard-text { color: var(--muted); font-size: 0.98rem; line-height: 1.65; margin-bottom: 28px; max-width: 54ch; }
.scard-result { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--border-2); }
.scard-result .lab, .tcard .lab {
  display: block; font-family: var(--f-mono); font-size: 0.7rem; color: var(--muted-2); margin-bottom: 6px;
}
.scard-result p:not(.lab) { color: var(--text); font-size: 0.93rem; margin: 0; line-height: 1.5; font-weight: 450; }
.scard-result p:not(.lab) + p { margin-top: 6px; }

/* ─────────────── PROCESS ─────────────── */
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--rule); }
.process.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.process.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pcard { padding: 26px 24px 0; border-left: 1px solid var(--border); }
.pcard:first-child { padding-left: 0; border-left: none; }
.pnum { font-family: var(--f-mono); font-size: 0.74rem; color: var(--accent); margin-bottom: 40px; letter-spacing: 0; }
.pcard h4 { font-family: var(--f-serif); font-weight: 700; font-size: 1.32rem; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 12px; }
.pcard p:not(.pnum) { font-size: 0.92rem; color: var(--muted); line-height: 1.6; }

/* ─────────────── FEATURES ─────────────── */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; counter-reset: feat; }
.features.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
.fcard { padding: 28px 0 40px; border-top: 1px solid var(--border-2); }
.fcard h4 { font-family: var(--f-serif); font-weight: 700; font-size: 1.42rem; line-height: 1.18; letter-spacing: -0.012em; margin-bottom: 12px; max-width: 24ch; }
.fcard h4::before {
  counter-increment: feat; content: counter(feat, decimal-leading-zero);
  display: block; margin-bottom: 18px;
  font-family: var(--f-mono); font-size: 0.74rem; color: var(--accent); letter-spacing: 0;
}
.fcard p { color: var(--muted); font-size: 0.97rem; line-height: 1.65; max-width: 52ch; }

/* ─────────────── TEXT SECTION / CTA ─────────────── */
.text-block { max-width: 760px; margin-left: calc(25% + 6px); }
.text-block.center { margin-left: auto; margin-right: auto; }
.text-block > p:not(.eyebrow) { color: var(--muted); font-size: 1.06rem; line-height: 1.75; margin-bottom: 18px; }
.text-block > p:last-child { margin-bottom: 0; }
.text-block ul, .text-block ol { color: var(--muted); line-height: 1.75; margin: 0 0 18px 1.2em; }
.text-block a { color: var(--accent); }

.cta-box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end;
  padding-top: 48px; border-top: 2px solid var(--rule);
}
.cta-box .sec-title { margin-bottom: 16px; max-width: 22ch; }
.cta-box .sec-sub { max-width: 54ch; }
.cta-box .eyebrow { margin-bottom: 22px; }
.cta-box .wp-block-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ─────────────── CONTACT ─────────────── */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 88px; align-items: start; }
.contact-info .sec-title { margin-bottom: 18px; }
.contact-info > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; margin-bottom: 44px; font-size: 1.04rem; max-width: 40ch; }
.contact-detail { display: flex; flex-direction: column; border-top: 2px solid var(--rule); }
.cdet { display: grid; grid-template-columns: 9rem 1fr; column-gap: 16px; row-gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cdet-txt { display: contents; }
.cdet-label { font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); padding-top: 3px; }
.cdet-val { grid-column: 2; font-size: 1.02rem; color: var(--text); font-weight: 500; }
.cdet-val a { color: inherit; text-decoration: none; transition: color 0.2s; }
.cdet-val a:hover { color: var(--accent); }

.contact-form {
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 40px;
}
.form-title { font-family: var(--f-serif); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 8px; }
.form-note { font-size: 0.9rem; color: var(--muted); margin-bottom: 30px; }
.contact-form form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); }
.field-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
input, textarea, select {
  background-color: var(--bg); border: 1px solid var(--border-2);
  color: var(--text); padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input[type=checkbox], input[type=radio] { width: auto; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:hover, textarea:hover, select:hover { border-color: var(--muted-2); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); background-color: var(--card-hi); }
textarea { resize: vertical; min-height: 104px; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2380848c' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
select option { background: var(--bg); color: var(--text); }
button[type=submit] {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--text); color: var(--on-ink); border: none;
  padding: 16px 20px; border-radius: var(--radius-sm); font-size: 0.96rem; font-weight: 500;
  font-family: inherit; cursor: pointer; margin-top: 8px;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
button[type=submit]:hover { background: var(--accent); color: #fff; }
button[type=submit]:active { transform: translateY(1px); }
button[type=submit]:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
button[type=submit]:disabled:hover { background: var(--text); color: var(--on-ink); }
button[type=submit].is-sending { opacity: 0.7; cursor: wait; }
button[type=submit] svg { width: 16px; height: 16px; }
.form-success {
  padding: 22px; border-left: 2px solid var(--accent); background: var(--accent-soft);
  color: var(--text); font-size: 0.96rem; line-height: 1.6;
}
.form-success svg { width: 22px; height: 22px; margin-bottom: 6px; }
.form-error {
  padding: 14px 16px; border-left: 2px solid #b42318; background: rgba(180,35,24,0.06);
  color: #b42318; font-size: 0.9rem; margin-bottom: 12px;
}
:root[data-theme="dark"] .form-error { color: #f4a19a; border-left-color: #f4a19a; }

/* ─────────────── FOOTER ─────────────── */
.site-footer { background: var(--bg); border-top: 2px solid var(--rule); padding: 56px 32px 32px; }
.foot-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid var(--border);
}
.foot-brand { max-width: 340px; }
.foot-brand .logo { margin-bottom: 16px; }
.foot-brand p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.foot-col h5 { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 400; color: var(--muted-2); margin-bottom: 18px; }
.foot-col ul { list-style: none; }
.foot-col a { display: table; color: var(--text); text-decoration: none; font-size: 0.94rem; margin-bottom: 10px; transition: color 0.2s; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  padding-top: 22px; color: var(--muted-2); font-family: var(--f-mono); font-size: 0.72rem;
}

/* ─────────────── ANIM ─────────────── */
.js .fade-up { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .fade-up.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .fade-up { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─────────────── BURGER + MOBILE MENU ─────────────── */
.burger {
  display: none;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-2); background: transparent;
  cursor: pointer; padding: 0;
  position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.burger span { display: block; width: 16px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease), opacity 0.2s; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 0; right: 0; z-index: 250;
  width: min(86vw, 360px); height: 100dvh;
  background: var(--bg); border-left: 1px solid var(--border-2);
  padding: calc(var(--nav-h) + 28px) 24px 32px;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.42s var(--ease);
  overflow-y: auto;
}
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; counter-reset: mm; border-top: 2px solid var(--rule); }
body.menu-open .mobile-menu { transform: translateX(0); }
.mobile-menu li a {
  display: flex; align-items: baseline; gap: 14px;
  color: var(--text); text-decoration: none; font-family: var(--f-serif); font-size: 1.5rem; font-weight: 700;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.mobile-menu li a::before { counter-increment: mm; content: counter(mm, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted-2); }
.mobile-menu li a:hover { color: var(--accent); }
.mobile-menu .mm-cta {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 9px;
  margin-top: 28px; background: var(--text); color: var(--on-ink); text-decoration: none;
  font-weight: 500; font-size: 0.98rem; padding: 16px 18px; border-radius: var(--radius-sm);
}
.mobile-scrim {
  position: fixed; inset: 0; z-index: 240; background: rgba(10,11,14,0.4);
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
body.menu-open .mobile-scrim { opacity: 1; visibility: visible; }

/* ==========================================================================
   WordPress: блоки, внутренние страницы, записи
   ========================================================================== */
.pl-sec.is-layout-flow > *,
.pl-sec .is-layout-flow > *,
.pl-sec .wp-block-group > * { margin-block-start: 0; }
.pl-sec .wp-block-buttons { margin-block: 0; }

/* ─────────────── PAGE HERO ─────────────── */
.page-hero { position: relative; padding: calc(var(--nav-h) + 88px) 32px 64px; background: var(--bg); border-bottom: 1px solid var(--border); }
.page-hero .wrap { position: relative; }
.page-hero h1 {
  font-family: var(--f-serif); font-optical-sizing: auto;
  font-size: clamp(2.3rem, 5.2vw, 4.2rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em;
  max-width: 20ch; margin-bottom: 26px;
}
.page-hero .hero-lead { margin-bottom: 0; border-top: none; padding-top: 0; max-width: 60ch; }
.page-hero .eyebrow .sep { color: var(--muted-2); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-family: var(--f-mono); font-size: 0.76rem; margin-top: 26px; }
.post-meta a { color: inherit; text-decoration: none; }
.post-meta a:hover { color: var(--accent); }

/* ─────────────── ENTRY CONTENT ─────────────── */
.site-main { min-height: 50vh; }
.page-body { padding: 72px 0 120px; }
.is-landing .page-body, .page-body.no-pad { padding: 0; }

.entry-content > * { max-width: calc(var(--prose) + 64px); margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }
.entry-content > .alignwide { max-width: calc(var(--maxw) + 64px); }
.entry-content > .alignfull,
.entry-content > .pl-sec { max-width: none; padding-left: 0; padding-right: 0; }
.entry-content > .pl-sec.block,
.entry-content > .pl-sec.hero { padding-left: 32px; padding-right: 32px; }
.entry-content > .pl-sec.stats { padding-left: 32px; padding-right: 32px; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content > .pl-sec + .pl-sec { margin-top: 0; }
.entry-content > :not(.pl-sec) + .pl-sec { margin-top: 72px; }
.entry-content > .pl-sec + :not(.pl-sec) { margin-top: 72px; }
.entry-content > .pl-sec:last-child { margin-bottom: -120px; }
.page-body > .entry-content > .pl-sec:first-child { margin-top: -72px; }
.page-body > .entry-content > .pl-sec.stats:first-child { border-top: none; }
.is-landing .entry-content > .pl-sec:last-child { margin-bottom: 0; }
.is-landing .entry-content > :not(.pl-sec):last-child { margin-bottom: 120px; }
.is-landing .entry-content > :not(.pl-sec):first-child { margin-top: calc(var(--nav-h) + 72px); }

.entry-content > p, .entry-content > ul, .entry-content > ol, .entry-content li { color: var(--muted); font-size: 1.06rem; line-height: 1.78; }
.entry-content strong { color: var(--text); font-weight: 600; }
.entry-content ul, .entry-content ol { padding-left: calc(32px + 1.2em); }
.entry-content li + li { margin-top: 6px; }
.entry-content li::marker { color: var(--accent); }
.entry-content > h2, .entry-content > h3, .entry-content > h4 { font-family: var(--f-serif); font-weight: 700; letter-spacing: -0.018em; line-height: 1.15; color: var(--text); }
.entry-content > h2 { font-size: clamp(1.7rem, 2.8vw, 2.2rem); margin-top: 2em; }
.entry-content > h3 { font-size: 1.45rem; margin-top: 1.8em; }
.entry-content > h4 { font-size: 1.2rem; margin-top: 1.6em; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content p a, .entry-content li a, .entry-content td a {
  color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px;
}
.entry-content p a:hover, .entry-content li a:hover { text-decoration-color: currentColor; }
.entry-content .pl-sec p a { text-decoration: none; }
.entry-content .cdet-val a { color: inherit; }
.entry-content .cdet-val a:hover { color: var(--accent); }

.entry-content blockquote, .wp-block-quote {
  border-left: 2px solid var(--accent); padding: 4px 0 4px 26px; background: none;
  font-family: var(--f-serif); font-size: 1.32rem; line-height: 1.5; color: var(--text);
}
.entry-content > blockquote { margin-left: 32px; margin-right: 32px; max-width: var(--prose); }
@media (min-width: 785px) { .entry-content > blockquote { margin-left: auto; margin-right: auto; } }
.wp-block-quote cite, .wp-block-pullquote cite { display: block; margin-top: 12px; color: var(--muted); font-family: var(--f-mono); font-size: 0.76rem; font-style: normal; }
.wp-block-pullquote { border-top: 2px solid var(--rule); border-bottom: 1px solid var(--border); padding: 36px 0; text-align: left; }
.wp-block-pullquote blockquote { border: none; padding: 0; font-size: 1.7rem; }

.entry-content img, .wp-block-image img { border-radius: var(--radius-sm); }
.wp-block-image figcaption, .wp-element-caption { color: var(--muted); font-family: var(--f-mono); font-size: 0.74rem; margin-top: 10px; }
.entry-content hr, .wp-block-separator { border: none; border-top: 1px solid var(--border-2); }
.entry-content > hr { margin-top: 2.4em; margin-bottom: 2.4em; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.entry-content thead th { border-bottom: 2px solid var(--rule); }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--border); padding: 12px 14px 12px 0; text-align: left; color: var(--muted); }
.entry-content th { color: var(--text); font-weight: 600; }
.wp-block-table { overflow-x: auto; }
.entry-content code { font-family: var(--f-mono); background: var(--surface-2); padding: 2px 6px; border-radius: var(--radius-sm); font-size: 0.86em; }
.entry-content pre { font-family: var(--f-mono); background: var(--surface-2); border-radius: var(--radius); padding: 20px; overflow-x: auto; font-size: 0.88rem; }
.entry-content pre code { background: none; padding: 0; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.wp-block-columns { gap: 40px; }
.has-text-align-center { text-align: center; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* ─────────────── POSTS ─────────────── */
.post-card { padding-top: 0; }
.post-card .post-thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; margin: 24px 0 24px; border-radius: var(--radius-sm); }
.post-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; filter: grayscale(0.2); transition: transform 0.6s var(--ease), filter 0.4s; }
.post-card:hover .post-thumb img { transform: scale(1.03); filter: none; }
.post-card-body { padding-top: 30px; display: flex; flex-direction: column; flex: 1; }
.post-card .post-thumb + .post-card-body { padding-top: 0; }
.post-card .scard-num { margin-bottom: 16px; }
.read-more {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  color: var(--text); font-weight: 500; font-size: 0.9rem; text-decoration: none;
}
.read-more::after {
  content: ''; width: 15px; height: 15px; background: currentColor;
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat;
  transition: transform 0.25s var(--ease);
}
.scard:hover .read-more { color: var(--accent); }
.scard:hover .read-more::after { transform: translateX(4px); }
.stretched { position: absolute; inset: 0; z-index: 1; }
.empty-state { color: var(--muted); padding: 40px 0; border-top: 1px solid var(--border-2); }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border-2); }
.page-numbers {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-family: var(--f-mono); font-size: 0.82rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.page-numbers:hover { border-color: var(--text); color: var(--text); }
.page-numbers.current { background: var(--text); border-color: var(--text); color: var(--on-ink); }
.page-numbers.dots { border: none; }

.post-featured { max-width: calc(var(--maxw) + 64px); margin: 0 auto 56px; padding: 0 32px; }
.post-featured img { width: 100%; border-radius: var(--radius-sm); }
.post-nav { max-width: calc(var(--prose) + 64px); margin: 80px auto 0; padding: 0 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-nav a { display: block; padding: 20px 0 4px; border-top: 1px solid var(--border-2); text-decoration: none; transition: border-color 0.2s; }
.post-nav a:hover { border-top-color: var(--text); }
.post-nav a:hover .ttl { color: var(--accent); }
.post-nav .lab { display: block; font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted-2); margin-bottom: 8px; }
.post-nav .ttl { font-family: var(--f-serif); font-size: 1.15rem; line-height: 1.3; transition: color 0.2s; }
.post-nav .next { text-align: right; grid-column: 2; }

.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form label { flex: 1; }
.search-form .search-submit { background: var(--text); color: var(--on-ink); border: none; border-radius: var(--radius-sm); padding: 0 20px; font-family: inherit; font-weight: 500; cursor: pointer; }

/* ─────────────── TEAM ─────────────── */
.tcard-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
.tcard-avatar {
  width: 52px; height: 52px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border-2); color: var(--text); background: var(--card);
  font-family: var(--f-mono); font-size: 0.86rem; font-weight: 500; margin: 0 !important;
}
.tcard h3 { margin-bottom: 8px; }
.tcard .tcard-role { color: var(--muted); font-size: 0.94rem; line-height: 1.5; margin: 0; max-width: 46ch; }
.tcard .lab { padding-top: 16px; border-top: 1px dashed var(--border-2); }
.tcard > p:last-child { margin-bottom: 0; color: var(--text); font-size: 0.97rem; }

/* ─────────────── CASES (референс-лист) ─────────────── */
.case-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 64px; }
.case-filter button {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-2); background: transparent; color: var(--muted);
  padding: 9px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--f-sans); font-size: 0.88rem; font-weight: 450;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.case-filter button span { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted-2); }
.case-filter button:hover { color: var(--text); border-color: var(--text); }
.case-filter button.is-active { background: var(--text); border-color: var(--text); color: var(--on-ink); }
.case-filter button.is-active span { color: inherit; opacity: 0.6; }
.case-filter button:active { transform: translateY(1px); }

.case-group + .case-group { margin-top: 96px; }
.case-group[hidden] { display: none; }
.cases.is-filtered .case-group + .case-group { margin-top: 0; }
.case-group-head {
  display: grid; grid-template-columns: minmax(150px, 3fr) 9fr; column-gap: 24px; align-items: baseline;
  padding-top: 18px; border-top: 2px solid var(--rule); margin-bottom: 8px;
}
.case-group-num { font-family: var(--f-mono); font-size: 0.8rem; color: var(--accent); }
.case-group-num::after { content: ' / раздел'; color: var(--muted-2); }
.case-group-title { font-family: var(--f-serif); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.018em; line-height: 1.15; }
.case-group-desc { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
.case-group .case-grid { margin-top: 24px; }

.case-card { cursor: pointer; }
.case-card .scard-top { margin-bottom: 22px; flex-wrap: wrap; }
.case-card .scard-num { white-space: nowrap; }
.case-card h3 { position: relative; }
.chips { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.chip {
  display: inline-block; padding: 3px 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--muted);
  font-family: var(--f-mono); font-size: 0.68rem; white-space: nowrap;
}
.case-metric { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 24px; }
.case-metric-val {
  font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(2.2rem, 3.6vw, 3rem); letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: lining-nums; color: var(--accent); white-space: nowrap;
}
.case-metric-val .arr { font-style: normal; color: var(--muted-2); margin: 0 0.1em; font-weight: 300; }
.case-metric-lab { color: var(--muted); font-size: 0.88rem; line-height: 1.4; flex: 1; min-width: 14ch; max-width: 30ch; }
.case-client { font-size: 0.9rem; color: var(--text); font-weight: 500; margin-bottom: 16px !important; }
.case-client span { color: var(--muted-2); font-weight: 400; font-family: var(--f-mono); font-size: 0.76rem; margin-right: 4px; }

/* страница проекта */
.case-hero h1 { max-width: 24ch; }
.case-num { display: block; font-family: var(--f-mono); font-size: 0.8rem; font-weight: 400; letter-spacing: 0; color: var(--accent); margin-bottom: 18px; }
.case-num::before { content: 'Проект № '; color: var(--muted-2); }
.case-facts { display: flex; flex-wrap: wrap; margin-top: 44px; border-top: 2px solid var(--rule); border-bottom: 1px solid var(--border); max-width: 980px; }
.case-fact { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; padding: 16px 24px 18px; border-left: 1px solid var(--border); }
.case-fact:first-child { border-left: none; padding-left: 0; }
.case-fact.wide { flex: 2 1 320px; }
.case-fact .cdet-label { padding-top: 0; }
.case-fact .cdet-val { font-size: 0.97rem; line-height: 1.5; font-weight: 450; }

.case-body { padding-top: 88px; padding-bottom: 0; border-top: none !important; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 80px; align-items: start; }
.case-section + .case-section { margin-top: 56px; }
.case-task { font-family: var(--f-serif); font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.42; color: var(--text); font-weight: 700; max-width: 40ch; letter-spacing: -0.01em; }
.check-list { list-style: none; border-top: 1px solid var(--border-2); counter-reset: chk; }
.check-list li { display: grid; grid-template-columns: 2.4rem 1fr; padding: 13px 0; border-bottom: 1px solid var(--border); color: var(--muted); line-height: 1.6; font-size: 0.98rem; }
.check-list li::before { counter-increment: chk; content: counter(chk, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted-2); padding-top: 4px; }
.case-side { position: sticky; top: calc(var(--nav-h) + 32px); display: flex; flex-direction: column; gap: 36px; }
.case-metric-box { padding-top: 20px; border-top: 2px solid var(--accent); }
.case-metric-box .case-metric-val { font-size: clamp(2.4rem, 3.8vw, 3.3rem); white-space: normal; margin-bottom: 12px; }
.case-results .check-list li { color: var(--text); font-size: 0.94rem; }
.case-results .check-list li::before { content: '—'; color: var(--accent); }
.case-tech { display: flex; flex-direction: column; gap: 10px; }
.case-tech .chips { justify-content: flex-start; }
.case-extra { margin-top: 56px; }
.case-extra > * { padding-left: 0; padding-right: 0; margin-left: 0; }
.case-nav { max-width: var(--maxw); padding: 0; margin-top: 104px; }

/* ─────────────── RESPONSIVE ─────────────── */
@media (max-width: 1080px) {
  .hero-lead { grid-column: 1 / 8; }
  .hero-actions { grid-column: 1 / -1; justify-content: flex-start; margin-top: 36px; }
}
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .process, .process.cols-4, .process.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; column-gap: 24px; border-top: none; }
  .pcard, .pcard:first-child { padding: 22px 0 0; border-left: none; border-top: 2px solid var(--rule); }
  .post-grid, .services.cols-3, .features.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-head, .case-group-head { grid-template-columns: 1fr; }
  .sec-head > *, .sec-head > .eyebrow { grid-column: 1; grid-row: auto; padding-top: 0; }
  .text-block { margin-left: 0; }
  .case-layout { grid-template-columns: 1fr; gap: 56px; }
  .case-side { position: static; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .site-nav ul { display: none; }
  .nav-cta { display: none; }
  .burger { display: flex; }
}
@media (max-width: 782px) { .admin-bar .site-nav { top: 46px; } }
@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .site-nav { padding: 0 20px; }
  .block { padding: 72px 20px 84px; }
  .entry-content > .pl-sec.block, .entry-content > .pl-sec.hero, .entry-content > .pl-sec.stats { padding-left: 20px; padding-right: 20px; }
  .entry-content > * { padding-left: 20px; padding-right: 20px; }
  .entry-content ul, .entry-content ol { padding-left: calc(20px + 1.2em); }
  .entry-content > blockquote { margin-left: 20px; margin-right: 20px; }
  .sec-head { margin-bottom: 44px; }
  .sec-title { font-size: clamp(1.85rem, 7.4vw, 2.3rem); }

  .hero { padding: calc(var(--nav-h) + 56px) 20px 64px; }
  .hero-inner { display: block; }
  .hero-tag { margin-bottom: 28px; font-size: 0.72rem; }
  .hero h1 { font-size: clamp(2.35rem, 10.5vw, 3rem); margin-bottom: 32px; letter-spacing: -0.025em; }
  .hero-lead { font-size: 1rem; }
  .hero-actions { margin-top: 32px; gap: 4px 20px; }
  .hero-actions .wp-block-button:not(.is-style-outline) { flex: 1 1 100%; }
  .hero-actions .wp-block-button:not(.is-style-outline) .wp-block-button__link { width: 100%; justify-content: space-between; }

  .page-hero { padding: calc(var(--nav-h) + 48px) 20px 44px; }
  .page-body { padding: 48px 0 84px; }
  .entry-content > .pl-sec:last-child { margin-bottom: -84px; }
  .page-body > .entry-content > .pl-sec:first-child { margin-top: -48px; }

  .stat { padding: 24px 16px 26px; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat-num { font-size: 2.3rem; margin-bottom: 10px; }

  .services, .services.cols-3, .case-grid, .post-grid, .team-grid, .features, .features.cols-3 { grid-template-columns: 1fr; }
  .scard { padding: 26px 0 36px; }
  .scard h3 { font-size: 1.42rem; }
  .fcard { padding: 24px 0 32px; }
  .process, .process.cols-4, .process.cols-3 { grid-template-columns: 1fr; row-gap: 32px; }
  .pnum { margin-bottom: 18px; }

  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 26px 20px; }
  .cdet { grid-template-columns: 7rem 1fr; }
  .contact-info > p:not(.eyebrow) { margin-bottom: 32px; }

  .cta-box { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }

  .case-filter { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 44px; padding: 0 20px 4px; scrollbar-width: none; }
  .case-filter button { white-space: nowrap; }
  .case-group + .case-group { margin-top: 64px; }
  .case-group-num::after { content: ''; }
  .case-facts { flex-direction: column; }
  .case-fact, .case-fact.wide { flex: none; border-left: none; padding-left: 0; border-top: 1px solid var(--border); }
  .case-fact:first-child { border-top: none; }
  .page-hero .eyebrow { flex-wrap: wrap; row-gap: 4px; }
  .case-body { padding-top: 56px; }
  .case-nav { margin-top: 64px; }

  .post-featured { padding: 0 20px; margin-bottom: 40px; }
  .post-nav { padding: 0 20px; grid-template-columns: 1fr; }
  .post-nav .next { grid-column: auto; text-align: left; }

  .site-footer { padding: 44px 20px 28px; }
  .foot-cols { gap: 24px; }
}
@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-left: none !important; padding: 20px 0; }
  .stat:not(:first-child) { border-top: 1px solid var(--border); }
  .cdet { grid-template-columns: 1fr; gap: 4px; }
  .cdet-val { grid-column: 1; }
}

/* ==========================================================================
   v1.3 — читаемость: Manrope, жирные заголовки, карточки вместо линеек
   (идёт последним и уточняет правила выше)
   ========================================================================== */
:root {
  --card:     #fdfcf9;
  --card-hi:  #ffffff;
  --surface:  #f8f7f3;
  --muted:    #4a4f59;
  --border:   rgba(22,24,29,0.09);
  --border-2: rgba(22,24,29,0.16);
  --radius:   12px;
  --radius-sm: 8px;
  --card-shadow: 0 1px 2px rgba(22,24,29,0.04), 0 6px 20px -8px rgba(22,24,29,0.08);
}
:root[data-theme="dark"] {
  --card:    #1b1c20;
  --card-hi: #212227;
  --surface: #17181b;
  --card-shadow: none;
}
body { line-height: 1.6; }

/* заголовки */
.hero h1 { font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; font-size: clamp(2.5rem, 5.6vw, 4.6rem); max-width: 16ch; }
.page-hero h1 { font-weight: 800; letter-spacing: -0.03em; font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.08; }
.sec-title { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 16px; }
.scard h3, .fcard h4, .pcard h4, .form-title, .case-group-title, .post-nav .ttl, .tcard h3 { font-weight: 700; letter-spacing: -0.015em; }
.scard h3 { font-size: 1.24rem; line-height: 1.3; max-width: none; margin-bottom: 10px; }
.fcard h4 { font-size: 1.12rem; line-height: 1.3; max-width: none; margin-bottom: 8px; }
.pcard h4 { font-size: 1.05rem; line-height: 1.3; margin-bottom: 8px; }
.form-title { font-size: 1.25rem; }
.case-group-title { font-size: clamp(1.25rem, 2vw, 1.55rem); }
.entry-content > h2, .entry-content > h3, .entry-content > h4 { font-weight: 800; letter-spacing: -0.02em; }
.mobile-menu li a { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }

/* подписи: мелкие, плотные, заглавными — сразу отличаются от текста */
.eyebrow, .hero-tag, .scard-num, .pnum, .scard-result .lab, .tcard .lab, .cdet-label, .stat-label,
.foot-col h5, .field label, .case-group-num, .case-num, .post-nav .lab, .post-meta, .chip,
.case-client span, .wp-element-caption, .wp-block-image figcaption {
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.7rem;
}
.eyebrow { color: var(--accent); }
.sec-head > .eyebrow::before, .contact-info > .eyebrow::before { color: var(--muted-2); border-right-color: var(--border-2); }
.hero-tag { color: var(--muted); font-size: 0.74rem; }
.stat-label { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 0.86rem; color: var(--muted); }
.field label { text-transform: none; letter-spacing: 0.01em; font-size: 0.8rem; font-weight: 600; }
.foot-bottom { font-family: var(--f-sans); font-size: 0.82rem; }
.stat-num { font-weight: 800; letter-spacing: -0.035em; }
.pnum { color: var(--accent); }
.case-num::before { content: 'Проект № '; }

/* разделы: чуть плотнее, заголовок отделён от содержимого */
.block { padding: 104px 32px 112px; }
.sec-head { margin-bottom: 52px; }
.sec-head > .eyebrow { padding-top: 0.55em; }
.sec-sub { font-size: 1.02rem; }

/* КАРТОЧКИ — у каждого блока свои границы */
.services, .case-grid, .post-grid, .team-grid { column-gap: 20px; row-gap: 20px; }
.scard {
  padding: 30px 30px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  transition: border-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.7s var(--ease);
}
.scard::before { display: none; }
.scard:hover { border-color: var(--border-2); transform: translateY(-3px); }
.js .scard.fade-up.visible:hover { transform: translateY(-3px); }
.scard:hover h3, .scard:hover h3 a { color: inherit; }
.scard-top { margin-bottom: 18px; }
.scard > p, .scard .scard-text { font-size: 0.95rem; margin-bottom: 22px; }
.scard-result { border-top: 1px solid var(--border); padding-top: 16px; }
.scard-result .lab { color: var(--muted-2); margin-bottom: 6px; }
.scard-result p:not(.lab) { font-weight: 600; font-size: 0.9rem; }

.features { column-gap: 20px; row-gap: 20px; }
.fcard {
  padding: 28px 30px 30px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.fcard h4::before { font-family: var(--f-sans); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.06em; margin-bottom: 14px; }
.fcard p { font-size: 0.95rem; }

.process {
  border-top: none; gap: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.pcard, .pcard:first-child { padding: 28px 26px 30px; border-left: 1px solid var(--border); }
.pcard:first-child { border-left: none; }
.pnum { margin-bottom: 22px; }

.tcard-avatar { border-radius: 10px; background: var(--accent); color: #fff; border: none; font-family: var(--f-sans); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em; }

.contact-detail { border-top: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 24px; box-shadow: var(--card-shadow); }
.cdet:last-child { border-bottom: none; }
.cdet-val { font-weight: 600; }
.contact-form { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--card-shadow); }
input, textarea, select { border-radius: 8px; background-color: var(--card-hi); }
:root[data-theme="dark"] input, :root[data-theme="dark"] textarea, :root[data-theme="dark"] select { background-color: var(--bg); }
button[type=submit], .btn-primary, .wp-block-button .wp-block-button__link, .nav-cta, .mobile-menu .mm-cta { border-radius: 8px; font-weight: 600; }
.wp-block-button.is-style-outline .wp-block-button__link, .btn-ghost { border-radius: 0; }

.cta-box {
  padding: 48px; border-top: none; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--card-shadow); align-items: center;
}

/* референс-лист */
.case-group-head { border-top: none; padding-top: 0; margin-bottom: 4px; }
.case-group-num { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.case-group-num::after { content: ''; }
.case-group-head { display: flex; align-items: center; gap: 14px; }
.case-filter button { border-radius: 8px; font-weight: 600; font-family: var(--f-sans); }
.case-filter button span { font-family: var(--f-sans); font-weight: 700; }
.case-metric {
  padding: 16px 18px; margin-bottom: 20px; border-radius: 10px; background: var(--accent-soft);
}
.case-metric-val { font-weight: 800; letter-spacing: -0.035em; font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.case-metric-val .arr { font-weight: 500; }
.case-client { font-weight: 600; }
.chip { letter-spacing: 0.04em; border-color: var(--border-2); }
.case-facts { border-top: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.case-fact:first-child { padding-left: 24px; }
.case-task { font-weight: 600; font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.55; }
.check-list { border-top: none; }
.check-list li { grid-template-columns: 2.2rem 1fr; }
.check-list li::before { font-family: var(--f-sans); font-weight: 800; color: var(--accent); font-size: 0.78rem; }
.case-metric-box { padding: 26px; border-top: none; background: var(--accent-soft); border-radius: var(--radius); }
.case-metric-box .case-metric-val { font-size: clamp(2rem, 3vw, 2.7rem); }
.case-results { padding: 24px 26px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); }
.case-results .check-list li:last-child { border-bottom: none; }
.post-nav a { padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.post-nav a:hover { border-color: var(--border-2); }
.page-numbers { border-radius: 8px; font-family: var(--f-sans); font-weight: 600; }

@media (max-width: 980px) {
  .process { background: none; border: none; box-shadow: none; gap: 16px; }
  .pcard, .pcard:first-child { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 24px; }
  .cta-box { padding: 36px; }
}
@media (max-width: 760px) {
  .block { padding: 64px 20px 72px; }
  .scard, .fcard { padding: 24px 22px; }
  .services, .case-grid, .post-grid, .team-grid, .features { row-gap: 14px; }
  .process { gap: 12px; }
  .cta-box { padding: 28px 22px; }
  .contact-detail { padding: 2px 18px; }
  .case-fact:first-child { padding-left: 18px; }
  .case-fact, .case-fact.wide { padding-left: 18px; padding-right: 18px; }
  .hero h1 { font-size: clamp(2.2rem, 9.6vw, 2.8rem); }
}

/* блок «Проекты» на главной */
.cases-more { margin-top: 32px; display: flex; }
.cases-more .btn-primary { border-radius: 8px; font-weight: 600; }

/* согласие на обработку ПД в форме */
.field-consent { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; margin-top: 4px; }
.field-consent input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; box-shadow: none; }
.field-consent label { font-size: 0.84rem; line-height: 1.5; color: var(--muted); cursor: pointer; }
.field-consent a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* подвал: документы и реквизиты */
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-legal a { color: var(--muted-2); text-decoration: none; transition: color 0.2s; }
.foot-legal a:hover { color: var(--accent); }
.foot-req { margin-top: 14px; color: var(--muted-2); font-size: 0.78rem; line-height: 1.5; }

/* пометка незаполненного реквизита в документах */
mark.req-missing { background: #fff1b8; color: #6b4e00; padding: 1px 5px; border-radius: 4px; font-weight: 600; font-size: 0.92em; }
:root[data-theme="dark"] mark.req-missing { background: #4a3d10; color: #ffe08a; }

/* юридические страницы: ровные списки и отступы */
.entry-content > h2 + p, .entry-content > h3 + p { margin-top: 0.7em; }
