/* Дёмин Ю.Ю. — судебный строительно-технический эксперт */
:root {
  --bg: #ffffff;
  --bg-muted: #f4f4f4;
  --bg-dark: #161616;
  --bg-dark-2: #222;
  --text: #1a1a1a;
  --text-muted: #666;
  --text-on-dark: #f2f2f2;
  --line: #e6e6e6;
  --accent: #8b1e2d;
  --accent-hover: #6f1623;
  --max: 1120px;
  --header-h: 52px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --ease: 0.2s ease;
  --section-y: 2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.section {
  padding: var(--section-y) 0;
}

.section--muted {
  background: var(--bg-muted);
}

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section__title {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section__link {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem;
  white-space: nowrap;
}

.section__link:hover {
  color: var(--accent-hover);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header--dark {
  background: #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}

.site-header--dark .logo {
  color: #fff;
}

.site-header--dark .nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.site-header--dark .nav a:hover,
.site-header--dark .nav a.is-active {
  color: #fff;
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--text);
}

.logo span {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: color var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-phone {
  display: none;
}

.header-actions .btn {
  display: none;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  transition: border-color var(--ease), color var(--ease);
}

.icon-btn--dark {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.icon-btn:hover,
.icon-btn--dark:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.burger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.burger--dark {
  border-color: rgba(255, 255, 255, 0.28);
}

.burger--dark span {
  background: #fff;
}

.burger span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 3px auto;
  background: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

/* Hero — как на макете: тёмный блок, текст слева с красной полосой, фото справа */
.hero {
  position: relative;
  min-height: 0;
  height: auto;
  display: block;
  color: #fff;
  overflow: hidden;
  background: #1a1a1a;
}

.hero__shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}

.hero__photo {
  position: relative;
  width: clamp(210px, 26vw, 280px);
  aspect-ratio: 607 / 680;
  overflow: hidden;
  background: #111;
  align-self: center;
}

.hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: grayscale(1) contrast(1.05);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.75rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: none;
  border-left: 3px solid var(--accent);
  margin-left: clamp(0.75rem, 5vw, 3rem);
}

.hero__title {
  margin: 0 0 0.7rem;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__name {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.hero__lead {
  margin: 0 0 1.25rem;
  max-width: 26rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.btn-cta {
  display: inline-flex;
  align-items: stretch;
  width: fit-content;
  text-decoration: none;
  color: #fff;
}

.btn-cta__label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1.15rem;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-cta__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-height: 42px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 0;
  font-size: 1rem;
}

.btn-cta:hover .btn-cta__label {
  background: var(--accent-hover);
}

.hero__media,
.hero__inner {
  display: none;
}

/* Trust bar */
.trust {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
}

.trust__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--line);
}

.trust__item:last-child {
  border-right: 0;
}

.trust__icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  color: #222;
}

.trust__icon svg {
  width: 24px;
  height: 24px;
}

.trust__text {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: #222;
}

/* Services — список 2 колонки как на макете */
.section--services {
  padding-top: 2.25rem;
  padding-bottom: 1.5rem;
}

.section--services-home {
  padding-top: 2.75rem;
  padding-bottom: 2.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.section__title--prominent {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  margin-bottom: 1.25rem;
}

.section--services .section__title {
  margin-bottom: 1rem;
}

.services-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 36px 1fr 20px;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
}

.service-row:hover .service-row__title {
  color: var(--accent);
}

.service-row__icon {
  color: #888;
  padding-top: 0.1rem;
}

.service-row__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.service-row__text {
  display: block;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.service-row__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

.service-row__more {
  color: #bbb;
  padding-top: 0.15rem;
  justify-self: end;
}

/* legacy service cards keep working on other pages */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  padding: 0.95rem 1rem 0.85rem;
  border: 1px solid var(--line);
  border-top: 0;
  border-left: 0;
  background: #fff;
  transition: background var(--ease);
}

.service-card:hover {
  border-color: var(--line);
  box-shadow: none;
  background: #fafafa;
}

.service-card__icon {
  width: 28px;
  height: 28px;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.service-card__icon svg {
  width: 26px;
  height: 26px;
}

.service-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.service-card p {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
  font-size: 0.84rem;
  line-height: 1.4;
}

.service-card__more {
  color: #bbb;
  font-size: 1rem;
  margin-top: 0.35rem;
}

/* Cases */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

/* Homepage chronicle — auto-scrolling ribbon */
.cases-marquee {
  margin-top: 0.25rem;
}

.cases-marquee__viewport {
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 2.5rem,
    #000 calc(100% - 2.5rem),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 2.5rem,
    #000 calc(100% - 2.5rem),
    transparent 100%
  );
}

.cases-marquee__track {
  display: flex;
  gap: 0.65rem;
  width: max-content;
  padding: 0 1.25rem;
}

.cases-marquee__track[data-marquee-ready="1"] {
  animation: cases-marquee-scroll 55s linear infinite;
}

.cases-marquee:hover .cases-marquee__track[data-marquee-ready="1"] {
  animation-play-state: paused;
}

.cases-marquee__track .case-card {
  flex: 0 0 220px;
  width: 220px;
  height: 150px;
  min-height: 0;
  max-height: 150px;
}

.cases-marquee__track .case-card img {
  opacity: 0.95;
  filter: none;
  object-position: center center;
}

.cases-marquee__track .case-card:hover img {
  opacity: 1;
  transform: scale(1.03);
}

.cases-marquee__track .case-card__body {
  padding: 0.4rem 0.55rem;
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

.cases-marquee__track .case-card h3 {
  font-size: 0.72rem;
  line-height: 1.2;
}

.cases-marquee__track .case-card__tag {
  font-size: 0.58rem;
  margin-bottom: 0.1rem;
}

@keyframes cases-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cases-marquee__track[data-marquee-ready="1"] {
    animation: none;
  }

  .cases-marquee__viewport {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

.cases-grid--compact .case-card {
  min-height: 0;
  height: 140px;
  max-height: 140px;
}

.cases-grid--compact .case-card img {
  opacity: 0.95;
  filter: none;
  object-position: center center;
}

.cases-grid--compact .case-card:hover img {
  opacity: 1;
  transform: scale(1.03);
}

.cases-grid--compact .case-card__body {
  padding: 0.4rem 0.55rem;
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

.cases-grid--compact .case-card h3 {
  font-size: 0.72rem;
  line-height: 1.2;
}

.cases-grid--compact .case-card__tag {
  font-size: 0.58rem;
  margin-bottom: 0.1rem;
}

.case-card {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.case-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.45s ease, opacity var(--ease);
}

.case-card:hover img {
  transform: scale(1.04);
  opacity: 0.4;
}

.case-card__body {
  position: absolute;
  inset: auto 0 0;
  padding: 0.85rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
}

.case-card__tag {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.case-card h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

/* About */
.about-grid {
  display: block;
}

.about-grid__content h2 {
  margin: 0 0 0.65rem;
}

.about-grid__body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: start;
}

.about-grid__photo {
  overflow: visible;
  background: transparent;
  min-height: 0;
  height: auto;
  width: max-content;
  max-width: none;
}

.about-grid__photo img {
  display: block;
  height: auto;
  max-height: 22rem;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: top left;
}

.about-grid__text {
  min-width: 0;
}

.about-grid__text p,
.about-grid__content p {
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

body[data-page="ob-eksperte"] .section + .section {
  padding-top: 0.35rem;
}

body[data-page="ob-eksperte"] .about-grid__content h2 {
  margin-bottom: 0.85rem;
}

.checklist {
  display: grid;
  gap: 0.4rem;
  margin: 0.9rem 0 1.1rem;
}

.checklist li {
  position: relative;
  padding-left: 1.15rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--accent);
}

/* Documents */
.docs-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
}

.doc-card {
  scroll-snap-align: start;
  background: var(--bg-dark-2);
  border: 1px solid #333;
  min-height: 0;
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: inherit;
  text-align: left;
}

.doc-card__preview {
  flex: 1;
  background: #fff;
  min-height: 140px;
  max-height: 160px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.doc-card__preview img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  object-position: center top;
  background: #fff;
}

.doc-card__label {
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.8);
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.docs-grid .doc-card {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.docs-grid .doc-card__label {
  color: var(--text-muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(960px, 100%);
  max-height: 90vh;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: 0;
  background: #fff;
  color: #111;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 0;
}

/* Split: map + publications */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.map-block {
  background: #fff;
  min-height: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
}

.map-block h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.map-block p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.work-map {
  height: 320px;
  border: 1px solid #d0d0d0;
  background: #ececec;
  z-index: 0;
}

.section--map {
  background: #f7f7f7;
}

.section__title--center {
  text-align: center;
}

.map-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0.5rem auto 1.25rem;
  font-size: 0.95rem;
}

.work-map--wide {
  height: 560px;
  width: 100%;
  border: none;
}

.work-map .leaflet-tile-pane {
  filter: grayscale(0.92) saturate(0.15) contrast(1.04) brightness(1.04);
}

.map-block--large {
  padding: 1.25rem;
}

.split-grid--map {
  align-items: start;
}

.map-marker {
  background: transparent;
  border: 0;
}

.map-marker__dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(139, 30, 45, 0.22);
}

.work-map-pin {
  background: transparent;
  border: 0;
}

.work-map-pin__dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 2px;
  border-radius: 50%;
  background: #c62828;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95);
}

.map-cluster {
  background: #c62828 !important;
  color: #fff;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  margin: 0 !important;
}

.map-cluster span {
  line-height: 1;
}

.map-cluster--sm {
  width: 32px !important;
  height: 32px !important;
}

.map-cluster--md {
  width: 40px !important;
  height: 40px !important;
  font-size: 0.9rem;
}

.map-cluster--lg {
  width: 48px !important;
  height: 48px !important;
  font-size: 1rem;
}

.map-popup-type {
  color: #666;
  font-size: 0.9em;
}

.map-placeholder {
  height: 180px;
  background:
    radial-gradient(circle at 42% 48%, rgba(139, 30, 45, 0.18), transparent 28%),
    linear-gradient(135deg, #d9d9d9, #ececec);
  border: 1px solid #d0d0d0;
  position: relative;
  overflow: hidden;
}

.map-pin {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(139, 30, 45, 0.18);
}

.pubs-list {
  display: grid;
  gap: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.pub-item--link {
  color: inherit;
  transition: opacity var(--ease);
}

.pub-item--link:hover h3 {
  color: var(--accent);
}

.pub-item__thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  background: #ddd;
}

.pub-item__meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.pub-item h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.3;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--line);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 0.3rem;
}

.badge--vak {
  border-color: var(--accent);
  color: var(--accent);
}

/* Form */
.lead-form {
  max-width: 640px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.form-field {
  display: grid;
  gap: 0.25rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 600;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid #d0d0d0;
  background: #fff;
  padding: 0.65rem 0.75rem;
  border-radius: 0;
  color: var(--text);
}

.form-field textarea {
  min-height: 96px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid rgba(139, 30, 45, 0.2);
  border-color: var(--accent);
}

.form-note {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-success {
  display: none;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: #eef7ef;
  border: 1px solid #b7d7b9;
  color: #1f5a24;
}

.form-success.is-visible {
  display: block;
}

.form-error {
  display: none;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: #fbeeee;
  border: 1px solid #e3b6b6;
  color: #7a1f1f;
}

.form-error.is-visible {
  display: block;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Page hero (inner) */
.page-hero {
  padding: 1.75rem 0 1.35rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumbs {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* Service detail blocks */
.service-block {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.service-block h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.85rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.segment-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.segment-nav a {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  background: #fff;
}

.segment-nav a:hover,
.segment-nav a.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.filter-btn.is-active,
.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cases-list {
  display: grid;
  gap: 1rem;
}

.case-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: #fff;
}

.case-row img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #ddd;
}

.case-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.35rem 0 0.7rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.review-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: #fff;
}

.review-card p {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
}

.review-card__author {
  font-weight: 700;
}

.review-card__role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
}

.contact-list {
  display: grid;
  gap: 1rem;
}

.contact-list a {
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--accent);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.article-card {
  border: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #ddd;
}

.article-card__body {
  padding: 1.1rem 1.2rem 1.3rem;
}

.article-card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.landing-hero {
  padding: 2.5rem 0 2rem;
  background: var(--bg-dark);
  color: #fff;
}

.landing-hero h1 {
  margin: 0 0 0.65rem;
  max-width: 20ch;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.landing-hero p {
  margin: 0 0 1.1rem;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.feature-list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
}

.feature-list li {
  padding-left: 1.2rem;
  position: relative;
}

.feature-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 1.75rem 0 1.25rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.1rem;
}

.footer-grid--compact {
  grid-template-columns: 1.4fr 1fr;
}

.site-footer .logo {
  color: #fff;
  margin-bottom: 0.35rem;
}

.site-footer .logo span {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  font-weight: 500;
}

.site-footer a:hover {
  color: #fff;
}

.footer-copy {
  border-top: 1px solid #333;
  padding-top: 0.85rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0;
  background: #fff;
  padding: 0.5rem 1.25rem 2rem;
  z-index: 99;
  border-top: 1px solid var(--line);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.05rem;
  min-height: 48px;
}

.mobile-nav a.is-active {
  color: var(--accent);
}

body.nav-open,
body.lightbox-open {
  overflow: hidden;
}

/* Detail pages */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.detail-aside__title,
.detail-section__title {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-section__title:first-of-type {
  margin-top: 0;
}

.detail-layout__main > p {
  white-space: pre-line;
}

.related-list {
  display: grid;
  gap: 0.65rem;
}

.related-link {
  display: block;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}

.related-link:hover {
  color: var(--accent);
}

.case-page__hero {
  margin-bottom: 1rem;
  overflow: hidden;
  background: #ddd;
}

.case-page__hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.case-page__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.case-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.gallery-item {
  display: block;
  overflow: hidden;
  background: #ddd;
  color: inherit;
  text-decoration: none;
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.gallery-item__caption {
  display: block;
  padding: 0.45rem 0.5rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
  background: #f3f3f3;
}

.article-page {
  max-width: 720px;
}

.article-page__title {
  margin: 0.5rem 0 1rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.2;
}

.article-page__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.rich-text h2,
.rich-text h3 {
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
}

.rich-text h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rich-text h3 {
  font-size: 1.02rem;
}

.rich-text p {
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.rich-text ul,
.rich-text ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  color: var(--text-muted);
  list-style: revert;
}

.rich-text li {
  margin-bottom: 0.4rem;
  list-style: inherit;
}

.rich-text img {
  max-width: 100%;
  margin: 1rem 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
}

.service-formats {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.service-formats th,
.service-formats td {
  border: 1px solid var(--line);
  padding: 0.7rem 0.8rem;
  text-align: left;
  vertical-align: top;
  color: var(--text-muted);
}

.service-formats th {
  background: #f3f3f3;
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.service-formats td:first-child {
  color: var(--text);
  font-weight: 600;
  width: 22%;
}

.article-cover {
  margin: 0 0 1.25rem;
  background: #f7f7f7;
}

.article-cover img {
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: contain;
}

.article-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem !important;
}

.article-author {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.article-author__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-author__label::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  flex: 0 0 10px;
}

.article-author__row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.article-author__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  flex: 0 0 64px;
  background: #ddd;
}

.article-author__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.article-author__name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}

.article-author__stats {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: none;
}

.article-author__info {
  min-width: 0;
}

.article-author__link {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 0.45rem;
  background: #6b6b6b;
  color: #fff;
}

.article-author__link:hover {
  background: var(--accent);
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

@media (max-width: 1100px) {
  .header-phone {
    display: none;
  }
}

@media (max-width: 980px) {
  .nav,
  .header-phone,
  .header-actions .btn {
    display: none;
  }

  .burger {
    display: inline-grid;
    place-items: center;
  }

  .trust__grid,
  .services-grid,
  .reviews-grid,
  .article-grid,
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cases-grid,
  .cases-grid--compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-grid,
  .contact-grid,
  .case-row,
  .footer-grid,
  .footer-grid--compact,
  .detail-layout,
  .case-gallery,
  .hero__shell,
  .services-list,
  .editor-meta {
    grid-template-columns: 1fr;
  }

  .about-grid__body {
    grid-template-columns: 1fr;
  }

  .about-grid__photo {
    width: min(220px, 55vw);
    max-width: min(220px, 55vw);
    height: auto;
    margin: 0 auto;
  }

  .about-grid__photo img {
    width: 100%;
    height: auto;
  }

  .hero__shell {
    grid-template-columns: 1fr;
  }

  .hero__photo {
    width: min(72vw, 260px);
    aspect-ratio: 607 / 680;
    height: auto;
    margin: 0 auto;
    order: -1;
  }

  .hero__content {
    margin-left: 0;
    padding: 1.5rem 1.25rem 1.75rem;
    border-left-width: 3px;
  }

  .hero__title {
    font-size: clamp(1.25rem, 5.5vw, 1.7rem);
  }

  .work-map {
    height: 260px;
  }

  .work-map--wide {
    height: 420px;
  }

  .map-block--large {
    padding: 1rem;
  }

  .trust__item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .filters,
  .segment-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    margin-right: -0.75rem;
    padding-right: 0.75rem;
  }

  .filter-btn,
  .segment-nav a {
    flex: 0 0 auto;
    min-height: 40px;
  }

  .case-row img {
    height: 180px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 56px;
    --section-y: 1.75rem;
  }

  body {
    font-size: 16px;
  }

  .container {
    width: min(100% - 1.25rem, var(--max));
  }

  .site-header__inner {
    gap: 0.5rem;
  }

  .logo {
    font-size: 0.82rem;
    max-width: calc(100% - 96px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .icon-btn,
  .burger {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .section {
    padding: var(--section-y) 0;
  }

  .section__title,
  .section__title--prominent {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  .trust__grid,
  .services-grid,
  .reviews-grid,
  .article-grid,
  .docs-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .cases-grid,
  .cases-grid--compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .cases-grid--compact .case-card {
    height: 120px;
    max-height: 120px;
  }

  .cases-grid--compact .case-card h3 {
    font-size: 0.68rem;
  }

  .cases-grid--compact .case-card__body {
    padding: 0.35rem 0.45rem;
  }

  .services-grid {
    border: 0;
  }

  .service-card {
    border: 1px solid var(--line);
    margin-bottom: -1px;
  }

  .service-row {
    grid-template-columns: 32px 1fr 18px;
    gap: 0.65rem;
    padding: 0.95rem 0;
    min-height: 64px;
  }

  .service-row__title {
    font-size: 0.95rem;
  }

  .service-row__text {
    font-size: 0.82rem;
  }

  .hero {
    min-height: 0;
    height: auto;
  }

  .hero__photo {
    width: min(72vw, 240px);
    aspect-ratio: 607 / 680;
  }

  .hero__content {
    padding: 1.15rem 1rem 1.5rem;
  }

  .hero__lead {
    font-size: 0.92rem;
    max-width: none;
  }

  .btn-cta {
    width: 100%;
  }

  .btn-cta__label {
    flex: 1;
    justify-content: center;
    min-height: 48px;
    font-size: 0.78rem;
  }

  .btn-cta__arrow {
    min-height: 48px;
    width: 48px;
  }

  .btn {
    min-height: 44px;
  }

  .pub-item,
  .pub-item--link {
    grid-template-columns: 72px 1fr;
    gap: 0.7rem;
    align-items: start;
  }

  .pub-item__thumb {
    width: 72px;
    height: 54px;
  }

  .work-map {
    height: 220px;
  }

  .work-map--wide {
    height: 360px;
  }

  .docs-track {
    grid-auto-columns: minmax(140px, 70%);
    gap: 0.55rem;
  }

  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-field input,
  .form-field textarea,
  .form-field select {
    font-size: 16px;
    min-height: 44px;
    padding: 0.7rem 0.8rem;
  }

  .form-field textarea {
    min-height: 110px;
  }

  .page-hero {
    padding: 1.35rem 0 1.1rem;
  }

  .page-hero h1 {
    font-size: 1.35rem;
  }

  .contact-list {
    gap: 0.85rem;
  }

  .contact-list a {
    word-break: break-word;
  }

  .footer-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .lightbox {
    padding: 0.75rem;
  }

  .lightbox__close {
    top: 0.65rem;
    right: 0.65rem;
    width: 44px;
    height: 44px;
  }

  .case-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-item img {
    height: 110px;
  }

  .detail-layout__aside {
    order: 2;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 380px) {
  .cases-grid,
  .cases-grid--compact {
    grid-template-columns: 1fr;
  }

  .cases-grid--compact .case-card {
    height: 130px;
    max-height: 130px;
  }

  .logo {
    font-size: 0.75rem;
  }
}
