@font-face {
  font-family: "Roboto Flex";
  src: url("../fonts/roboto-flex-cyrillic-slim.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 50% 151%;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}

@font-face {
  font-family: "Roboto Flex";
  src: url("../fonts/roboto-flex-latin-slim.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 50% 151%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-cyrillic-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0400-052F, U+2116;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}

:root {
  color-scheme: dark;
  --night: #06102a;
  --night-2: #0c1b45;
  --frost: #e7edf9;
  --frost-2: rgba(231, 237, 249, .68);
  --paper: #e9ecf1;
  --ink: #0b1530;
  --ink-2: #4b5571;
  --brand: #13306f;
  --line-dark: rgba(231, 237, 249, .14);
  --line-light: rgba(11, 21, 48, .14);
  --button-line: rgba(231, 237, 249, .28);
  --gutter: 16px;
  --column-gap: 24px;
  --container: 1344px;
  --mono: "JetBrains Mono", monospace;
  --h2-size: clamp(34px, 4.4vw, 60px);
  --h3-size: clamp(24px, 2.2vw, 32px);
  --h3-weight: 620;
  --h3-stretch: 112%;
  --h3-leading: 1.1;
  font-family: "Roboto Flex", Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.5;
  hyphens: manual;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(ellipse 42% 520px at 74% 420px, var(--night-2), transparent) var(--night);
  color: var(--frost);
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-inline-size: 100%; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { text-wrap: balance; }
/* Абзацы: строки во всю ширину колонки, без одиночного слова в конце */
p { text-wrap: pretty; }
dd { text-wrap: balance; }

h2 {
  font-size: var(--h2-size);
  font-weight: 640;
  font-stretch: 112%;
  font-variation-settings: "opsz" 144;
  line-height: 1.02;
  letter-spacing: -.02em;
}

h3 {
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
  font-stretch: var(--h3-stretch);
  line-height: var(--h3-leading);
}

.fitted-line {
  display: inline-block;
  white-space: nowrap;
  transform-origin: left;
}

:focus-visible {
  outline: 2px solid #8fb0ff;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  inline-size: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--column-gap);
}

.icon-library {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  inline-size: 20px;
  block-size: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-inline-size: 0;
  block-size: 56px;
  padding-inline: 8px;
  border: 1px solid var(--button-line);
  border-radius: 4px;
  color: var(--frost);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;
  transition: color 200ms, background-color 200ms, border-color 200ms;
}

.button-primary {
  border-color: var(--frost);
  background-color: var(--frost);
  color: var(--night);
}

@media (hover: hover) {
  .button:hover {
    border-color: var(--frost);
    background-color: var(--night-2);
  }

  .button-primary:hover {
    border-color: #fff;
    background-color: #fff;
  }
}

/* Шапка и фасад */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  block-size: 72px;
}

.wordmark {
  font-size: 19px;
  font-weight: 800;
}

.header-phone {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  color: var(--frost-2);
  text-decoration: none;
  transition: color 200ms;
}

.header-phone:hover { color: var(--frost); }
.header-phone .icon { display: none; }

/* Первый экран */

.hero { position: relative; isolation: isolate; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-block: 8px 0;
}

.hero-name {
  position: relative;
  z-index: 3;
  font-size: var(--name-size, 12.4vw);
  font-weight: 720;
  font-stretch: 112%;
  font-variation-settings: "opsz" 144;
  line-height: .92;
  letter-spacing: -.04em;
}

.name-line { display: inline-block; white-space: nowrap; }

.hero-role {
  position: relative;
  z-index: 3;
  margin-block-start: 12px;
  font-size: 17px;
  line-height: 1.3;
  color: var(--frost-2);
}

.hero-person {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  block-size: clamp(240px, 74vw, 380px);
  margin-block-start: 8px;
  pointer-events: none;
}

.hero-person img {
  inline-size: auto;
  block-size: 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 64%, transparent 98%), linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 64%, transparent 98%), linear-gradient(to right, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}

.hero-details { position: relative; z-index: 3; margin-block-start: -8px; container-type: inline-size; }

/* Кегль от ширины колонки: самая длинная строка лида равна ширине карточки контактов */
.hero-lead {
  font-size: 8.2cqi;
  font-weight: 520;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--frost);
}

.contact-card { margin-block-start: 24px; }

.contact-row {
  display: grid;
  grid-template-columns: 20px auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-block-size: 56px;
  padding-inline: 4px;
  border-block-end: 1px solid var(--line-dark);
  font-size: 16px;
  text-decoration: none;
  transition: background-color 160ms;
}

.contact-label { font-weight: 600; }

.contact-value {
  justify-self: end;
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--frost-2);
}

.contact-save {
  padding-inline: 16px;
  border: 0;
  border-radius: 10px;
  background-color: var(--frost);
  color: var(--night);
}

.contact-save .contact-value {
  display: flex;
  color: rgba(6, 16, 42, .6);
}

.contact-row[download] .contact-value .icon { rotate: 90deg; }

@media (hover: hover) {
  .contact-row:not(.contact-save):hover { background-color: rgba(231, 237, 249, .05); }
  .contact-row:not(.contact-save):hover .contact-value { color: var(--frost); }
  .contact-save:hover { background-color: #fff; }
}

.contact-row:active { transform: scale(.99); }

@media (max-width: 599.98px) {
  .hero-lead { font-size: 7.8cqi; }
}

@media (max-width: 1023.98px) and (max-height: 700px) {
  .hero-person { block-size: 210px; }
}

@media (600px <= width < 1024px) {
  .hero-person { block-size: 440px; }
  .hero-details { max-inline-size: 560px; }
}

/* Десктоп: слева имя, подпись, фраза и контакты по центру высоты; справа человек во всю высоту экрана */
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    column-gap: var(--column-gap);
    min-block-size: max(640px, calc(100svh - 72px));
    padding-block: 0;
  }

  .hero-name { grid-column: 1 / 7; grid-row: 1; margin-block-start: 40px; }

  .hero-role {
    grid-column: 1 / 7;
    grid-row: 2;
    margin-block-start: 16px;
    font-size: 20px;
  }

  .hero-details {
    grid-column: 1 / 7;
    grid-row: 3;
    align-self: end;
    margin: 0;
    padding-block: 48px 72px;
  }

  .hero-lead {
    font-size: clamp(24px, 2.1vw, 30px);
    font-weight: 480;
    line-height: 1.25;
    letter-spacing: -.012em;
  }

  .contact-card { margin-block-start: 40px; }

  .contact-row { min-block-size: 60px; font-size: 17px; }

  .hero-person {
    grid-column: 7 / -1;
    grid-row: 1 / -1;
    justify-content: flex-end;
    align-self: stretch;
    contain: size;
    block-size: auto;
    margin: 0 calc(var(--gutter) * -1) 0 0;
  }

  .hero-person img {
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%), linear-gradient(to right, transparent 0, #000 12%);
    mask-image: linear-gradient(to bottom, #000 78%, transparent 100%), linear-gradient(to right, transparent 0, #000 12%);
  }
}

/* Разрез */

.cut-section { padding-block-start: 72px; }

.cut-grid > * { grid-column: 1 / -1; }

.cut-grid {
  align-items: start;
  row-gap: 24px;
}

.comparison {
  --cut: 50%;
  --band-start: max(0%, var(--cut) - 12%);
  --band-end: min(100%, var(--cut) + 12%);
  position: relative;
  isolation: isolate;
  min-inline-size: 0;
  background: radial-gradient(ellipse at 50% 62%, var(--night-2), transparent 70%);
}

.cut-stage {
  position: relative;
  aspect-ratio: 624 / 350;
}

.cut-stage::before {
  content: "";
  position: absolute;
  inset: auto 8% -4% 8%;
  block-size: 12%;
  background: radial-gradient(ellipse closest-side, rgba(0, 0, 0, .45), transparent);
  pointer-events: none;
}

.comparison.is-interactive .cut-stage {
  touch-action: pan-y;
  user-select: none;
  cursor: ew-resize;
}

.cut-layer {
  position: absolute;
  inset: auto 0 0;
  inline-size: 100%;
  block-size: auto;
  pointer-events: none;
}

.cut-layer-npm { clip-path: inset(0 calc(100% - var(--band-start)) 0 0); }
.cut-layer-ifc { clip-path: inset(0 calc(100% - var(--band-end)) 0 var(--band-start)); }
.is-interactive .cut-layer-render { clip-path: inset(0 0 0 var(--band-end)); }

.cut-labels {
  position: relative;
  block-size: 16px;
  color: var(--frost-2);
  font: 500 12px / 16px var(--mono);
  white-space: nowrap;
  pointer-events: none;
}

.cut-side-label {
  position: absolute;
  container-type: inline-size;
  text-align: center;
}

.cut-side-label-npm {
  inset-inline-start: 0;
  inline-size: var(--band-start);
}

.cut-side-label-render {
  inset-inline-end: 0;
  inline-size: calc(100% - var(--band-end));
}

@container (width < 4ch) {
  .cut-side-label-npm span { visibility: hidden; }
}

@container (width < 7ch) {
  .cut-side-label-render span { visibility: hidden; }
}

.cut-label-ifc {
  position: absolute;
  inset-inline-start: clamp(5ch, (var(--band-start) + var(--band-end)) / 2, 100% - 5ch);
  translate: -50% 0;
}

.cut-edge {
  position: absolute;
  inset-block: 8px 0;
  inline-size: 1px;
  background-color: rgba(231, 237, 249, .5);
  translate: -50% 0;
  pointer-events: none;
}

.cut-edge-start { inset-inline-start: var(--band-start); }
.cut-edge-end { inset-inline-start: var(--band-end); }

.cut-handle {
  position: absolute;
  inset-block-start: 60%;
  inset-inline-start: clamp(14px, var(--cut), 100% - 14px);
  display: grid;
  place-items: center;
  inline-size: 48px;
  block-size: 48px;
  border-radius: 50%;
  background-color: var(--frost);
  color: var(--night);
  translate: -50% -50%;
}

.cut-handle .icon { inline-size: 24px; block-size: 24px; }

.stages {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stages li, .steps li {
  border-block-start: 1px solid var(--line-dark);
  padding-block-start: 20px;
}

.stages li { position: relative; }

.stages h3, .steps h3 { font-size: 24px; }

.stages h3 {
  color: var(--frost-2);
  transition: color 200ms;
}

.stages li.is-active h3 { color: var(--frost); }

.stages button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.stages button::after {
  content: "";
  position: absolute;
  inset: 0;
}

.stages p, .steps p {
  margin-block-start: 8px;
  font-size: 17px;
  color: var(--frost-2);
}



/* Кейсы */

.projects {
  padding-block: 96px;
  background-color: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.cases {
  display: grid;
  gap: 96px;
  margin-block-start: 48px;
}

.case {
  align-items: start;
  row-gap: 24px;
}

.case > * { grid-column: 1 / -1; }

.case-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-inline-size: 0;
}

.case-details h3 { font-size: 24px; }

.case-image {
  inline-size: 100%;
  block-size: auto;
  border-radius: 4px;
  background-color: #fff;
  object-fit: contain;
}

.case-image-road { aspect-ratio: 1400 / 968; }
.case-image-kos { aspect-ratio: 1400 / 900; }

.case-image.is-revealed { animation: case-enter 600ms cubic-bezier(.2, .7, .25, 1) both; }

@keyframes case-enter {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.case-data { margin-block-start: 0; }

.case-data > div {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  align-items: baseline;
  border-block-start: 1px solid var(--line-light);
  padding-block: 8px;
}

.case-data dt {
  padding-inline-end: 8px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
}

.case-data dd { font-size: 17px; }

/* Контакт и панель */

.contact { padding-block: 96px 48px; }

.contact-grid {
  align-items: start;
  row-gap: 48px;
}

.contact-grid > * { grid-column: 1 / -1; }

.contact-actions {
  display: grid;
  gap: 12px;
}

.contact-details {
  margin-block-start: 32px;
  font-size: 20px;
  font-style: normal;
}

.contact-details > div {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 8px;
  border-block-start: 1px solid var(--line-dark);
}

.contact-details > div:last-child { border-block-end: 1px solid var(--line-dark); }

.contact-details a {
  display: flex;
  align-items: center;
  min-inline-size: 0;
  min-block-size: 48px;
  padding-block: 8px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-details a:hover { text-decoration: underline; text-underline-offset: 4px; }

.copy-button {
  flex: none;
  min-block-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--frost-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.copy-button:hover { color: var(--frost); }

.steps {
  display: grid;
  gap: 24px;
  max-inline-size: 100%;
}

.steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
}

.step-number {
  color: #8fb0ff;
  font: 600 15px / 1.5 var(--mono);
}

.steps p {
  grid-column: 2;
  max-inline-size: 56ch;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-block-start: 72px;
  border-block-start: 1px solid var(--line-dark);
  padding-block-start: 24px;
  color: var(--frost-2);
  font-size: 14px;
}

.sticky-actions { display: none; }

@media (min-width: 600px) {
  :root { --gutter: 32px; }
}



@media (max-width: 767.98px) {
  .header-inner { block-size: 56px; }

  .header-phone {
    justify-content: end;
    inline-size: 44px;
  }

  .header-phone .icon { display: block; }
  .header-phone span { display: none; }

  #cut-title span { display: block; }

  .contact { padding-block-end: calc(48px + 72px + env(safe-area-inset-bottom)); }
  .contact-grid { row-gap: 32px; }
  .steps { margin-block-start: 16px; }

  .sticky-actions {
    position: fixed;
    z-index: 5;
    inset: auto var(--gutter) calc(12px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, 48px);
    align-items: center;
    gap: 8px;
    max-inline-size: 480px;
    block-size: 60px;
    margin-inline: auto;
    padding-inline: 6px;
    border-radius: 16px;
    background-color: var(--frost);
    color: var(--night);
    visibility: hidden;
    translate: 0 calc(100% + 12px + env(safe-area-inset-bottom));
    transition: translate 200ms, visibility 200ms;
  }

  .sticky-actions.is-visible {
    visibility: visible;
    translate: 0 0;
  }

  .sticky-actions .button {
    block-size: 48px;
    border-color: rgba(6, 16, 42, .22);
    color: var(--night);
  }

  .sticky-actions .button-primary { border-color: transparent; }

  .sticky-actions .button:hover { background-color: #fff; }
}

@media (width < 384px) {
  #cut-title { font-stretch: 80%; }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 48px;
    font-size: 18px;
  }

  .cut-grid { row-gap: 48px; }

  .comparison {
    grid-column: 5 / -1;
    grid-row: 2;
  }

  .stages {
    grid-column: 1 / 5;
    grid-row: 2;
    align-self: stretch;
    justify-content: space-between;
    gap: 8px;
  }

  .stages li { padding-block-start: clamp(12px, 5vw - 52px, 20px); }

  .cut-handle { inset-inline-start: var(--cut); }

  .projects { padding-block: 120px 144px; }

  .case-image {
    grid-column: 1 / 8;
    grid-row: 1;
    align-self: stretch;
    object-position: center bottom;
  }

  .case-details {
    grid-column: 8 / -1;
    grid-row: 1;
    align-self: center;
  }

  .case-details h3 { font-size: 28px; }
  .case-reversed .case-image { grid-column: 6 / -1; }
  .case-reversed .case-details { grid-column: 1 / 6; }

  .contact { padding-block-start: 144px; }

  .contact-grid { grid-template-rows: max-content 1fr; }

  #contact-title { grid-column: 1 / 7; grid-row: 1; }
  .steps { grid-column: 1 / 7; grid-row: 2; }
  .contact-side { grid-column: 8 / -1; grid-row: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Разрез: заголовок сверху; слева здание, справа стадии */


.cut-labels, .cut-labels * {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

.stages li { padding-block: 20px; border-block-start: 1px solid var(--line-dark); }
.stages li:last-child { border-block-end: 1px solid var(--line-dark); }
.stages h3 { font-size: 20px; font-stretch: 100%; font-weight: 620; transition: color 200ms; }
.stages p { margin-block-start: 6px; font-size: 16px; line-height: 1.45; }



/* Кейсы: светлый раздел, картинка без плашки (белый фон растворяется) */
.projects { margin-block-start: 96px; padding-block: 96px; }

.case-image {
  border-radius: 0;
  background: none;
  mix-blend-mode: multiply;
}

.case-image-road { aspect-ratio: 1400 / 925; }
.case-image-kos { aspect-ratio: 1270 / 776; }

.case-details h3 { font-size: 24px; font-stretch: 112%; }

/* Финал */
.contact-card-final { margin-block-start: 32px; }

@media (min-width: 1024px) {

  .cut-section h2 { max-inline-size: none; }

  .cut-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: 56px;
  }

  #cut-title { grid-column: 1 / -1; grid-row: 1; }

  .comparison { grid-column: 1 / 7; grid-row: 2; }

  .stages {
    grid-column: 8 / -1;
    grid-row: 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
  }

  .stages li { padding-block: 0 20px; border: 0; border-block-end: 1px solid var(--line-dark); }
  .stages li:last-child { border-block-end: 0; padding-block-end: 0; }
  .stages h3 { font-size: 22px; }
  .stages p { font-size: 17px; }

  .projects { margin-block-start: 144px; padding-block: 144px; }

  .case-details {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .case-details h3 { font-size: 32px; line-height: 1.1; }

  .contact { padding-block-start: 144px; }

  .contact-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto;
    row-gap: 56px;
  }

  #contact-title { grid-column: 1 / -1; grid-row: 1; }
  .contact-card-final { grid-column: 1 / 7; grid-row: 2; align-self: start; margin: 0; }
  .contact-card-final .contact-row { min-block-size: 72px; }
  .steps { grid-column: 8 / -1; grid-row: 2; align-self: start; gap: 0; }
  .steps li { padding-block: 18px; }
  .steps li:first-child { padding-block-start: 0; border-block-start: 0; }
  .steps li:last-child { padding-block-end: 0; }
  .steps h3 { font-size: 22px; }
  .steps p { font-size: 16px; line-height: 1.45; }
}

.nowrap { white-space: nowrap; }


/* Телефон: все заголовки разделов одного размера; две строки заголовка кейсов помещаются в ширину */
@media (max-width: 599.98px) {
  :root { --h2-size: 6.8vw; }
  .stages { gap: 0; }
  .stages li { padding-block: 18px; }
  .case-details h3 { font-size: 20px; }
}

/* ===== Единые интервалы (v5) =====
   Лист кейсов: одинаковый отступ со всех сторон (--sheet-pad).
   Заголовок раздела → содержимое: везде --title-gap. */
:root { --title-gap: 32px; --case-gap: 64px; }
@media (min-width: 1024px) { :root { --title-gap: 56px; --case-gap: 96px; } }


.cut-grid, .contact-grid { row-gap: var(--title-gap) !important; }
.contact-card-final { margin-block-start: 0 !important; }
.cases { gap: var(--case-gap) !important; }

/* Кейс: название → таблица всегда 24px, блок по центру картинки */
.case-details { gap: 24px !important; }
@media (min-width: 1024px) {
  .case-details { align-self: center !important; justify-content: flex-start !important; }
  .case-data { margin-block-start: 0 !important; }
}

/* ===== Нижняя панель на телефоне (v2): одна плашка из трех сегментов, без кнопок внутри кнопки ===== */
@media (max-width: 767.98px) {
  .sticky-actions {
    grid-template-columns: minmax(0, 1fr) 56px 56px !important;
    gap: 0 !important;
    block-size: 56px !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(6, 16, 42, .08);
    border-radius: 14px !important;
    background-color: var(--frost) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .18);
  }

  .sticky-actions .button {
    block-size: 100% !important;
    padding-inline: 0;
    border: 0 !important;
    border-radius: 0;
    background: none !important;
    color: var(--night) !important;
  }

  .sticky-actions .button-primary {
    justify-content: flex-start;
    gap: 12px;
    padding-inline: 18px;
    font-size: 16px;
    font-weight: 620;
  }

  .sticky-actions .button + .button { border-inline-start: 1px solid rgba(6, 16, 42, .14) !important; }

  .sticky-actions .button:active { background-color: rgba(6, 16, 42, .06) !important; }
}




/* 1024–1279: в листе кейсов меньше поля, картинка и текст поровну */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .case-image { grid-column: 1 / 7 !important; }
  .case-details { grid-column: 7 / -1 !important; }
  .case-reversed .case-image { grid-column: 7 / -1 !important; }
  .case-reversed .case-details { grid-column: 1 / 7 !important; }
  .case-details h3 { font-size: 26px; }
}
@media (max-width: 599.98px) {
  .stages h3, .steps h3 { font-size: 18px; }
}


/* ===== Разделы-полосы (v6) =====
   Каждый раздел после первого экрана: полоса на всю ширину со своим фоном.
   Полоса заезжает на предыдущую на --overlap и скруглена сверху, как лист поверх.
   Внутри одинаковый отступ сверху и снизу (--band-pad), контент на общей сетке. */
:root { --band-pad: 72px; --overlap: 24px; }
@media (min-width: 1024px) { :root { --band-pad: 128px; --overlap: 32px; } }

.hero { padding-block-end: calc(var(--band-pad) + var(--overlap)); }
@media (min-width: 1024px) { .hero { padding-block-end: 0; } }

section.band, footer.band {
  position: relative;
  margin: calc(-1 * var(--overlap)) 0 0;
  padding: var(--band-pad) 0 calc(var(--band-pad) + var(--overlap));
  border-radius: var(--overlap) var(--overlap) 0 0;
}

.band-dark { background-color: var(--night); color: var(--frost); }

.band-light {
  --frost: #0b1530;
  --frost-2: #4b5571;
  --line-dark: rgba(11, 21, 48, .14);
  --button-line: rgba(11, 21, 48, .24);
  background-color: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.band-brand {
  --brand-bg: #13306f;
  --frost-2: rgba(231, 237, 249, .74);
  --line-dark: rgba(231, 237, 249, .2);
  background-color: var(--brand-bg);
  color: var(--frost);
}

/* Полоса внутри: контейнер страницы, без старых отступов */
section.band > .container { margin-block: 0; }
.projects .container { padding: 0; }

/* Разрез на светлом: ручка и линии в темном цвете */
.band-light .cut-handle { background-color: #0b1530; color: #fff; }
.band-light .cut-edge { background-color: rgba(11, 21, 48, .45); }
.band-light .cut-stage::before { background: radial-gradient(ellipse closest-side, rgba(11, 21, 48, .22), transparent); }

/* Подвал */
footer.band { padding-block: calc(var(--overlap) + 8px) 32px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-block: 0; padding: 0; border: 0; font-size: 14px; color: var(--frost-2); }
@media (max-width: 767.98px) { footer.band { padding-block-end: calc(32px + env(safe-area-inset-bottom)); } }

/* Первый экран на компьютере: низ контактов на том же расстоянии от листа, что и везде */
@media (min-width: 1024px) {
  .hero-details { padding-block-end: calc(72px + var(--overlap)) !important; }
}

/* Стадии разреза: все названия основного цвета, активная отмечена полосой слева */
.stages h3 { color: var(--frost) !important; }
.stages li::before {
  content: "";
  position: absolute;
  inset-block: 20px 20px;
  inset-inline-start: -16px;
  inline-size: 3px;
  border-radius: 2px;
  background-color: transparent;
  transition: background-color 200ms;
}
.stages li.is-active::before { background-color: #2a55c8; }
.stages p { max-inline-size: 44ch; }
@media (min-width: 1024px) {
  .stages li::before { inset-block: 0 20px; }
  .stages li:last-child::before { inset-block-end: 0; }
}

/* Кейсы: 6 + 6 с общей средней линией */
@media (min-width: 1024px) {
  .case-image { grid-column: 1 / 7 !important; }
  .case-details { grid-column: 7 / -1 !important; }
  .case-reversed .case-image { grid-column: 7 / -1 !important; }
  .case-reversed .case-details { grid-column: 1 / 7 !important; }
}

/* Шаги: номер и заголовок в строку, описание от того же левого края */
.steps li { grid-template-columns: auto minmax(0, 1fr) !important; column-gap: 12px !important; }
.steps p { grid-column: 1 / -1 !important; max-inline-size: 46ch; }

/* ===== Телефон: доводка (v6) ===== */
@media (max-width: 599.98px) {
  /* заголовки разделов не мельче фразы первого экрана */
  :root { --h2-size: 7.6vw; }
  .stages li::before { inset-inline-start: -10px; }

  /* таблица кейса: подписи уже, значения шире */
  .case-data > div { grid-template-columns: 34% minmax(0, 1fr); }
}




/* ===== Что готовим для согласования (v7) =====
   Компьютер: таблица, заголовок раздела в левом верхнем углу, значения по центру колонок.
   Телефон: два блока друг под другом, в каждом только то, что готовим. */
.approval-table { display: none; }
.approvals-title-mobile { display: block; }

.approval-cards { display: grid; gap: 32px; margin-block-start: var(--title-gap); }
.approval-card { padding-block-start: 20px; border-block-start: 1px solid rgba(231, 237, 249, .32); }
.approval-card .region { font-size: 22px; font-weight: 640; font-stretch: 112%; line-height: 1.1; }
.approval-card .authority { margin-block-start: 6px; font-size: 14px; color: var(--frost-2); }
.approval-card ul { margin-block-start: 16px; }
.approval-card li {
  display: flex; align-items: center; gap: 12px;
  min-block-size: 48px;
  border-block-start: 1px solid var(--line-dark);
  font-size: 16px;
}
.approval-card li .icon { flex: none; inline-size: 18px; block-size: 18px; color: #8fb0ff; }

.presentations-grid { display: grid; margin-block-start: 48px; }
.presentations-grid a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-block-size: 56px;
  border-block-start: 1px solid var(--line-dark);
  color: var(--frost); font-size: 16px; text-decoration: none;
}
.presentations-grid li:last-child a { border-block-end: 1px solid var(--line-dark); }
.presentations-grid .icon { flex: none; transition: translate 160ms; }
@media (hover: hover) {
  .presentations-grid a:hover .icon { translate: 4px 0; }
  .presentations-grid a:hover span { text-decoration: underline; text-underline-offset: 4px; }
}

@media (min-width: 1024px) {
  .approvals-title-mobile, .approval-cards { display: none; }

  .approval-table {
    display: table;
    inline-size: 100%;
    border-collapse: collapse;
    table-layout: fixed;
  }
  .approval-table .col-what { inline-size: calc((100% - 11 * var(--column-gap)) / 12 * 6 + 5 * var(--column-gap)); }

  .approval-table thead td, .approval-table thead th {
    padding: 0 0 32px;
    vertical-align: bottom;
    border-block-end: 1px solid rgba(231, 237, 249, .32);
  }
  .table-corner h2 { margin: 0; }

  .approval-table thead th { text-align: center; }
  .approval-table .region { display: block; font-size: 32px; font-weight: 640; font-stretch: 112%; line-height: 1.1; }
  .approval-table .authority { display: block; margin-block-start: 8px; font-size: 16px; line-height: 1.35; color: var(--frost-2); }

  .approval-table tbody th, .approval-table tbody td {
    padding: 0;
    block-size: 64px;
    border-block-end: 1px solid var(--line-dark);
    font-size: 18px;
    vertical-align: middle;
  }
  .approval-table tbody th { text-align: start; font-weight: 600; }
  .approval-table tbody td { text-align: center; }
  .approval-table tbody .icon { inline-size: 22px; block-size: 22px; color: #8fb0ff; vertical-align: middle; }
  .no-mark { display: inline-block; inline-size: 14px; block-size: 2px; vertical-align: middle; background: rgba(231, 237, 249, .3); }

  .presentations-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--column-gap); margin-block-start: 56px; }
  .presentations-grid a { align-items: flex-start; min-block-size: 0; padding-block: 20px 0; font-size: 17px; line-height: 1.35; }
  .presentations-grid li:last-child a { border-block-end: 0; }
  .presentations-grid .icon { margin-block-start: 2px; }
}

/* ===== Разрез: доводка (v7) ===== */
/* нижний край модели в исходнике срезан: растворяем его */
.cut-stage .cut-layer {
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.cut-stage::before { display: none; }

/* активная стадия: акцентная линия сверху во всю ширину пункта вместо полосы сбоку */
.stages li::before { display: none !important; }
.stages li { border: 0 !important; box-shadow: inset 0 1px 0 var(--line-dark); padding-block: 20px !important; transition: box-shadow 200ms; }
.stages li.is-active { box-shadow: inset 0 2px 0 #2a55c8; }
.stages li:last-child { padding-block-end: 0 !important; }
@media (min-width: 1024px) { .stages { justify-content: space-between !important; } }

/* ===== Интервалы разделов (v7): меньше и одинаковые сверху и снизу ===== */
:root { --band-pad: 64px; }
@media (min-width: 1024px) { :root { --band-pad: 112px; } }

/* телефон: h2 по ширине колонки, чтобы самая длинная строка помещалась */
@media (max-width: 599.98px) { :root { --h2-size: calc((100vw - 32px) / 12.9); } }
/* стадии на компьютере по высоте здания */
@media (min-width: 1024px) {
  .stages li { padding-block: 14px 0 !important; }
  .stages li:first-child { padding-block-start: 14px !important; }
  .stages h3 { font-size: 19px !important; }
  .stages p { margin-block-start: 4px; font-size: 15px !important; line-height: 1.4; max-inline-size: 48ch; }
}
/* презентации на компьютере 2 × 2: каждая подпись в одну строку */
@media (min-width: 1024px) {
  .presentations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .presentations-grid a { align-items: center !important; padding-block: 18px !important; }
  .presentations-grid li:nth-last-child(-n+2) a { border-block-end: 1px solid var(--line-dark) !important; }
}
.presentations-grid a span { text-wrap: balance; }

/* таблица кейса на телефоне: подпись над значением, значение во всю ширину */
@media (max-width: 599.98px) {
  .case-data > div { display: block !important; padding-block: 10px; }
  .case-data dt { font-size: 13px; }
  .case-data dd { margin-block-start: 2px; }
}
@media (max-width: 1023.98px) { .steps li:first-child { border-block-start: 0 !important; padding-block-start: 0 !important; } }

/* ===== Шаги (v8): без линий, чтобы не сливаться со строками контактов ===== */
.steps { display: grid !important; gap: 28px !important; }
.steps li { border: 0 !important; padding: 0 !important; }
.steps p { max-inline-size: none !important; margin-block-start: 6px; }
@media (max-width: 1023.98px) {
  .steps { margin-block-start: 48px !important; }
  .stages p { max-inline-size: none !important; }
}
@media (min-width: 1024px) {
  .steps { gap: 32px !important; align-content: start; }
}
@media (min-width: 600px) {
  .stages p, .steps p { max-inline-size: 52ch !important; }
}

/* ===== Доводка по второму разбору (v9) ===== */
.case-image-road { aspect-ratio: 1400 / 920 !important; }
.case-image-kos { aspect-ratio: 1137 / 683 !important; }

/* Одна схема 6 + 6 на всей странице: правая колонка везде с 7-й */
@media (min-width: 1024px) {
  .comparison { grid-column: 1 / 7 !important; }
  .stages { grid-column: 7 / -1 !important; }
  .contact-card-final { grid-column: 1 / 7 !important; }
  .steps { grid-column: 7 / -1 !important; }
}

/* Презентации продолжают таблицу: без линии сверху, линии только между строками */
@media (min-width: 1024px) {
  .presentations-grid { margin-block-start: 0 !important; }
  .presentations-grid a { border-block-start: 0 !important; border-block-end: 1px solid var(--line-dark) !important; padding-block: 20px !important; }
}

/* Разрез: срез здания растворяется сильнее, линии разреза не доходят до среза */
.cut-stage .cut-layer {
  -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 98%) !important;
  mask-image: linear-gradient(to bottom, #000 66%, transparent 98%) !important;
}
.cut-edge { inset-block: 8px 22% !important; }

/* Активная стадия: светлая плашка, текст на месте */
.stages li { margin-inline: -16px 0; padding-inline: 16px !important; border-radius: 12px; transition: background-color 200ms, box-shadow 200ms; }
.stages li.is-active { background-color: #fff; box-shadow: none !important; }
.stages li.is-active + li { box-shadow: none !important; }
@media (min-width: 1024px) { .stages li { padding-block: 14px !important; } }
@media (min-width: 600px) { .stages p { text-wrap: balance; } }

/* Шаги: номер над заголовком, все по одному левому краю */
.steps li { display: block !important; }
.step-number { display: block; margin-block-end: 4px; }

/* Шаги на компьютере: номер на висячей позиции, текст по одному краю; низ шагов = низ карточки */
@media (min-width: 1024px) {
  .steps li { display: grid !important; grid-template-columns: 36px minmax(0, 1fr) !important; column-gap: 0 !important; }
  .steps .step-number { grid-column: 1; grid-row: 1; margin: 0; align-self: baseline; }
  .steps h3 { grid-column: 2; }
  .steps p { grid-column: 2 !important; }
  .contact-grid { align-items: stretch !important; }
  .contact-card-final { display: flex; flex-direction: column; align-self: stretch !important; }
  .contact-card-final li { flex: 1; display: flex; }
  .contact-card-final .contact-row { flex: 1; }
}
@media (min-width: 1024px) {
  .steps p { max-inline-size: none !important; font-size: 16px !important; }
  .steps { justify-content: space-between; align-content: space-between !important; }
}
.stages li { border-radius: 0 !important; }
.stages li.is-active { border-radius: 12px !important; }
@media (min-width: 1024px) { .steps p { text-wrap: balance; } }
@media (max-width: 1023.98px) { .stages li { margin-inline: -12px !important; padding-inline: 12px !important; } }

/* ===== Интервалы разделов (v10): плотнее ===== */
:root { --band-pad: 48px; }
@media (min-width: 600px) { :root { --band-pad: 56px; } }
@media (min-width: 1024px) { :root { --band-pad: 88px; --title-gap: 48px; } }

/* ===== Интервалы разделов (v11): еще плотнее ===== */
:root { --band-pad: 36px; --title-gap: 24px; }
@media (min-width: 600px) { :root { --band-pad: 44px; --title-gap: 28px; } }
@media (min-width: 1024px) { :root { --band-pad: 64px; --title-gap: 40px; } }
@media (min-width: 1024px) { .hero-details { padding-block-end: calc(var(--band-pad) + var(--overlap)) !important; } }
:root { --case-gap: 48px; }
@media (min-width: 1024px) { :root { --case-gap: 64px; } }

/* ===== Финал (v12): заголовок, три шага и три кнопки на одной трехколоночной сетке ===== */
#contact .contact-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: none !important; row-gap: 0 !important; }
#contact #contact-title { grid-row: 1 !important; grid-column: 1 / -1 !important; max-inline-size: none !important; margin-block-end: var(--title-gap); }
#contact .steps { grid-row: 2 !important; grid-column: 1 / -1 !important; display: grid !important; gap: 28px !important; margin: 0 !important; padding: 0 !important; }
#contact .steps li { display: block !important; margin: 0 !important; padding: 20px 0 0 !important; border-block-start: 1px solid var(--line-dark) !important; }
#contact .steps li:first-child { border-block-start: 1px solid var(--line-dark) !important; padding-block-start: 20px !important; }
#contact .step-number { display: block; margin: 0 0 12px; color: #8fb0ff; font: 640 28px / 1 "Roboto Flex", Arial, sans-serif; font-stretch: 112%; letter-spacing: -.01em; }
#contact .steps h3 { font-size: 20px !important; }
#contact .steps p { margin-block-start: 8px !important; max-inline-size: none !important; font-size: 16px !important; line-height: 1.45; color: var(--frost-2); text-wrap: pretty; }

.final-actions { grid-row: 3; display: grid; gap: 12px; margin-block-start: 32px; }
.final-btn {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 12px;
  align-items: center;
  min-block-size: 72px;
  padding: 14px 20px;
  border: 1px solid rgba(231, 237, 249, .28);
  border-radius: 14px;
  color: var(--frost);
  text-decoration: none;
  transition: background-color 160ms, border-color 160ms;
}
.final-btn .icon { grid-row: 1 / 3; inline-size: 20px; block-size: 20px; }
.final-btn-label { font-size: 16px; font-weight: 620; line-height: 1.25; }
.final-btn-value { grid-column: 2; font-size: 14px; line-height: 1.3; color: var(--frost-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-btn-primary { border-color: var(--frost); background-color: var(--frost); color: var(--night); }
.final-btn-primary .final-btn-value { color: rgba(6, 16, 42, .62); }
@media (hover: hover) {
  .final-btn:hover { border-color: var(--frost); background-color: rgba(255, 255, 255, .06); }
  .final-btn-primary:hover { background-color: #fff; border-color: #fff; }
}
.final-btn:active { transform: scale(.99); }

@media (min-width: 1024px) {
  #contact .steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: var(--column-gap) !important; }
  #contact .steps p { text-wrap: balance; }
  .final-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--column-gap); margin-block-start: 48px; }
  .final-btn { min-block-size: 80px; padding-inline: 24px; }
}
@media (min-width: 768px) {
  #contact .steps { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; column-gap: var(--column-gap) !important; }
  .final-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--column-gap); margin-block-start: 40px; }
}
@media (768px <= width < 1024px) {
  #contact .steps p { font-size: 15px !important; }
  .final-btn { padding-inline: 16px; column-gap: 10px; }
  .final-btn-label { font-size: 15px; }
  .final-btn-value { font-size: 13px; }
}

/* v13: линия над первой стадией не нужна, сверху ее отделяет заголовок раздела */
.stages li:first-child { box-shadow: none !important; }

/* v13: на компьютере фраза и карточка контактов мельче, по масштабу как подпись под именем */
@media (min-width: 1024px) {
  .hero-lead { font-size: clamp(20px, 1.6vw, 24px) !important; line-height: 1.3 !important; }
  .hero-details .contact-card { margin-block-start: 28px !important; }
  .hero-details .contact-row { min-block-size: 50px !important; font-size: 15px !important; }
  .hero-details .contact-save { border-radius: 8px; }
}

/* v13: презентации отдельным блоком под таблицей: плитки как кнопки финала, отступ от таблицы */
.presentations-grid { gap: 12px !important; margin-block-start: var(--title-gap) !important; }
.presentations-grid li a.pres-btn {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 20px;
  grid-template-rows: auto auto;
  align-items: center !important;
  column-gap: 12px;
  min-block-size: 72px;
  padding: 14px 20px !important;
  border: 1px solid rgba(231, 237, 249, .22) !important;
  border-radius: 14px;
  transition: background-color 160ms, border-color 160ms;
}
.pres-label { font-size: 14px; line-height: 1.3; color: var(--frost-2); }
.pres-value { grid-column: 1; font-size: 16px; font-weight: 620; line-height: 1.25; }
.presentations-grid .pres-btn .icon { grid-column: 2; grid-row: 1 / 3; margin: 0 !important; }
@media (hover: hover) {
  .presentations-grid .pres-btn:hover { border-color: var(--frost) !important; background-color: rgba(255, 255, 255, .06); }
  .presentations-grid .pres-btn:hover span { text-decoration: none !important; }
}
@media (min-width: 600px) { .presentations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: 12px !important; } }
@media (min-width: 1024px) {
  .presentations-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; column-gap: var(--column-gap) !important; }
  .presentations-grid li a.pres-btn { min-block-size: 80px; padding-inline: 24px !important; }
  .hero-lead { text-wrap: balance; }
}
.presentations-grid li a.pres-btn { align-content: center; row-gap: 2px; }

/* v13: номер шага в одну строку с заголовком, текст висит под заголовком: справа от номера нет пустоты */
#contact .steps li { display: grid !important; grid-template-columns: 40px minmax(0, 1fr) !important; column-gap: 0 !important; align-items: baseline; }
#contact .step-number { grid-column: 1; grid-row: 1; margin: 0 !important; font-size: 20px !important; letter-spacing: 0; }
#contact .steps h3 { grid-column: 2; grid-row: 1; }
#contact .steps p { grid-column: 2 !important; }
@media (max-width: 599.98px) {
  .presentations-grid { gap: 8px !important; }
  .presentations-grid li a.pres-btn { min-block-size: 64px; padding: 10px 16px !important; }
}
/* v13: на планшете шаги друг под другом: в три колонки с номером слева текст слишком узкий */
@media (600px <= width < 1024px) {
  #contact .steps { grid-template-columns: minmax(0, 1fr) !important; gap: 24px !important; }
  #contact .steps p { font-size: 16px !important; max-inline-size: 60ch !important; }
}

/* v14: фирменный стиль из исходников логотипа 3D Build */
/* Знак «3D Build» в шапке вместо набранного текста */
.wordmark { display: block; inline-size: auto; block-size: 36px; aspect-ratio: 69.1 / 47.5; color: var(--frost); }
@media (max-width: 767.98px) { .wordmark { block-size: 30px; } }
/* Финальный раздел в фирменном синем логотипа (#00448F) */
:root { --brand-bg: #00448f; }
.band-brand { --brand-bg: #00448f; }
/* Знак в шапке белым, без плашки: плашка выглядела наклейкой и не вписывалась в темный первый экран */
.wordmark { block-size: 32px; padding: 0; background: none; }
@media (min-width: 768px) { .wordmark { block-size: 40px; } }

/* ===== v15: структура от клиента 22.11.2026 =====
   Первый экран → «С чем можно обратиться» (светлый) → «Опыт и доверие» (темный) → контакты (фирменный синий) → подвал */

/* Карточка контактов: «Сохранить контакт» главная и самая крупная, «Поделиться» кнопкой */
.contact-row.contact-share {
  inline-size: 100%;
  margin: 0;
  border: 0;
  border-block-end: 1px solid var(--line-dark);
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.contact-card .contact-save { min-block-size: 60px !important; font-size: 17px !important; }
.contact-card .contact-save .contact-label { font-weight: 680; }
.contact-share .contact-value:empty { display: none; }
@media (hover: hover) { .contact-row.contact-share:hover { background-color: rgba(231, 237, 249, .05); } }

/* С чем можно обратиться: на компьютере слева пять направлений, справа белая карточка выбранного
   (как активная стадия в разрезе раньше); на телефоне и планшете те же пункты раскрываются по очереди */
.offer-list { display: grid; gap: 8px; margin-block-start: var(--title-gap); }
.offer-heading { margin: 0; font: inherit; }
.offer-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  inline-size: 100%;
  min-block-size: 64px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .5);
  color: var(--ink);
  font: inherit;
  font-size: 20px;
  font-weight: 620;
  font-stretch: 112%;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-align: start;
  cursor: pointer;
  transition: background-color 160ms, color 160ms;
}
.offer-tab .icon { rotate: 90deg; transition: rotate 200ms; color: var(--ink-2); }
.offer.is-open .offer-tab { background: #fff; border-end-start-radius: 0; border-end-end-radius: 0; }
.offer.is-open .offer-tab .icon { rotate: -90deg; }
.js .offer:not(.is-open) .offer-panel { display: none; }
.offer-panel {
  display: flex;
  flex-direction: column;
  padding: 0 20px 24px;
  border-radius: 0 0 14px 14px;
  background: #fff;
}
.offer-who { font-size: 15px; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.offer-what { margin-block-start: 12px; font-size: 18px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.offer-facts { display: grid; gap: 16px; margin: 20px 0 0; padding-block-start: 20px; border-block-start: 1px solid var(--line-light); }
.offer-facts dt { font-size: 14px; font-weight: 620; line-height: 1.3; color: var(--ink-2); }
.offer-facts dd { margin-block-start: 4px; font-size: 16px; line-height: 1.45; color: var(--ink); text-wrap: pretty; }
.offer-cases span { display: block; }
.offer-cases span + span { margin-block-start: 6px; }
.offer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 52px;
  margin-block-start: 24px;
  padding-inline: 22px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 620;
  text-decoration: none;
  transition: background-color 160ms;
}
.offer-link-note { font-weight: 400; opacity: .7; }
@media (hover: hover) {
  .offer-tab:hover { background: rgba(255, 255, 255, .85); }
  .offer-link:hover { background: #1b2a55; }
}
@media (min-width: 600px) {
  .offer-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--column-gap); }
  .offer-link { align-self: flex-start; }
}
@media (min-width: 1024px) {
  .offer-list {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(5, auto);
    column-gap: var(--column-gap);
    row-gap: 8px;
  }
  .offer { display: contents; }
  .offer-heading { grid-column: 1 / 6; grid-row: var(--row); display: grid; }
  .offer-tab { min-block-size: 76px; padding-inline: 28px; font-size: 26px; color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1px var(--line-light); }
  .offer-tab .icon { rotate: 0deg; opacity: 0; }
  .offer.is-open .offer-tab { color: var(--ink); background: #fff; box-shadow: none; border-radius: 14px; }
  .offer.is-open .offer-tab .icon { rotate: 0deg; opacity: 1; color: var(--ink); }
  .offer-panel { grid-column: 6 / -1; grid-row: 1 / -1; padding: 40px 44px; border-radius: 20px; }
  .offer-who { font-size: 17px; }
  .offer-what { margin-block-start: 16px; font-size: 24px; font-weight: 480; line-height: 1.35; letter-spacing: -.01em; text-wrap: balance; }
  .offer-facts { margin-block-start: 28px; padding-block-start: 24px; }
  .offer-facts dd { font-size: 17px; }
  .offer-link { margin-block-start: auto; }
  .offer-facts { margin-block-end: 32px; }
}

/* Опыт и доверие: слева карточка с отзывом, справа четыре цифры карточками 2 × 2, обе части одной высоты */
.trust-grid { display: grid; gap: 12px; margin-block-start: var(--title-gap); }
.review,
.stats li {
  border-radius: 20px;
  background: rgba(231, 237, 249, .06);
  box-shadow: inset 0 0 0 1px rgba(231, 237, 249, .08);
}
.review { display: flex; flex-direction: column; margin: 0; padding: 28px 24px; }
.review blockquote { margin: 0; }
.review blockquote p { font-size: 20px; font-weight: 460; line-height: 1.4; letter-spacing: -.005em; text-wrap: pretty; }
.review figcaption {
  display: grid;
  gap: 4px;
  margin-block-start: 24px;
  padding-block-start: 20px;
  border-block-start: 1px solid var(--line-dark);
  font-size: 15px;
  line-height: 1.45;
}
.review-author { font-size: 17px; font-weight: 680; }
.review-note, .review-facts { color: var(--frost-2); text-wrap: pretty; }
.review-letter { display: block; margin-block-end: 24px; }
.review-letter img { display: block; inline-size: 100%; block-size: auto; border-radius: 8px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.stats li { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 20px; }
.stat-value { font-size: clamp(30px, 3.6vw, 52px); font-weight: 640; font-stretch: 112%; line-height: 1; letter-spacing: -.02em; }
.stat-label { font-size: 14px; line-height: 1.4; color: var(--frost-2); text-wrap: balance; }
@media (min-width: 1024px) {
  .trust-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--column-gap); row-gap: 0; }
  .review { grid-column: 1 / 7; justify-content: space-between; padding: 40px; }
  .review blockquote p { font-size: 26px; line-height: 1.35; letter-spacing: -.01em; }
  .review figcaption { margin-block-start: 32px; font-size: 16px; }
  .stats { grid-column: 7 / -1; grid-template-rows: 1fr 1fr; gap: var(--column-gap); }
  .stats li { padding: 28px 32px; }
  .stat-label { font-size: 16px; }
}

/* Контакты внизу: заголовок и человек слева, та же карточка контактов справа */
#contact .contact-grid { row-gap: 0 !important; }
#contact #contact-title { margin-block-end: var(--title-gap) !important; }
.contact-person { display: flex; align-items: center; gap: 16px; margin-block-end: 24px; }
.contact-person img { flex: none; inline-size: 64px; block-size: 64px; border-radius: 50%; object-fit: cover; }
.contact-person p { display: grid; gap: 2px; }
.contact-person-name { font-size: 18px; font-weight: 680; line-height: 1.25; }
.contact-person-role { font-size: 15px; line-height: 1.35; color: var(--frost-2); }
@media (min-width: 1024px) {
  #contact .contact-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-rows: auto 1fr !important;
    column-gap: var(--column-gap) !important;
  }
  #contact #contact-title { grid-column: 1 / 7 !important; grid-row: 1 !important; margin: 0 !important; }
  #contact .contact-person { grid-column: 1 / 7 !important; grid-row: 2 !important; align-self: end; margin: 0; }
  #contact .contact-card { grid-column: 7 / -1 !important; grid-row: 1 / 3 !important; margin: 0; }
  #contact .contact-row { min-block-size: 56px; }
}
.contact-save .contact-value .icon { rotate: 90deg; }
@media (min-width: 1024px) {
  .contact-title-end { display: block; }
}
/* Короткие абзацы в предложениях: строки ровные */
.offer-cases span, .stat-label { text-wrap: balance; }
/* Фраза на первом экране стала длинной (≈40 слов): на телефоне и планшете обычным крупным текстом, а не кеглем от ширины */
@media (max-width: 1023.98px) {
  .hero-lead { font-size: 19px !important; font-weight: 480 !important; line-height: 1.38 !important; letter-spacing: -.005em !important; text-wrap: pretty; }
}
@media (max-width: 599.98px) { .stat-label { font-size: 14px; } }

/* Фраза на первом экране: обычный текстовый кегль, не заголовок */
@media (min-width: 1024px) {
  .hero-lead { font-size: 18px !important; font-weight: 400 !important; line-height: 1.5 !important; letter-spacing: 0 !important; max-inline-size: 36em; text-wrap: pretty !important; }
}
@media (max-width: 1023.98px) {
  .hero-lead { font-size: 17px !important; font-weight: 400 !important; line-height: 1.5 !important; letter-spacing: 0 !important; }
}
@media (min-width: 1024px) { .hero-lead { text-wrap: balance !important; } }
/* Цифры на телефоне: одна карточка, строки «число — подпись», без узких колонок по четыре строки */
@media (max-width: 599.98px) {
  .stats { grid-template-columns: minmax(0, 1fr); gap: 0; border-radius: 20px; background: rgba(231, 237, 249, .06); box-shadow: inset 0 0 0 1px rgba(231, 237, 249, .08); }
  .stats li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: center; gap: 12px; padding: 18px 20px; border-radius: 0; background: none; box-shadow: none; }
  .stats li + li { border-block-start: 1px solid var(--line-dark); }
  .stat-value { font-size: 28px; white-space: nowrap; }
}

/* ===== v16: фото без растворения снизу; на телефоне и планшете переход после фото и чередование цветов ===== */
.hero-person img {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%) !important;
  mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%) !important;
}
@media (min-width: 1024px) {
  .hero-person img {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%) !important;
    mask-image: linear-gradient(to right, transparent 0, #000 12%) !important;
  }
}

@media (max-width: 1023.98px) {
  /* Под фото светлый лист: фраза и контакты. Лист заходит на низ фото и обрезает его ровным краем */
  .hero { padding-block-end: 0 !important; }
  .hero-details {
    --frost: #0b1530;
    --frost-2: #4b5571;
    --line-dark: rgba(11, 21, 48, .14);
    max-inline-size: none !important;
    margin: calc(-1 * var(--overlap)) calc(-1 * var(--gutter)) 0 !important;
    padding: var(--band-pad) var(--gutter) calc(var(--band-pad) + var(--overlap)) !important;
    border-radius: var(--overlap) var(--overlap) 0 0;
    background: var(--paper);
    color: var(--ink);
  }
  .hero-details > * { max-inline-size: 560px; margin-inline: auto; }
  .hero-lead { font-size: 16px !important; color: var(--ink-2); }
  .hero-details .contact-card { margin-block-start: 24px !important; }
  .hero-details .contact-save { background: var(--ink); color: #fff; }
  .hero-details .contact-save .contact-value { color: rgba(255, 255, 255, .7); }
  @media (hover: hover) {
    .hero-details .contact-save:hover { background: #1b2a55; }
    .hero-details .contact-row:not(.contact-save):hover { background-color: rgba(11, 21, 48, .04); }
  }

  /* «С чем можно обратиться» темный: белая карточка открытого пункта на темном */
  .offers.band-light {
    --frost: #e7edf9;
    --frost-2: rgba(231, 237, 249, .68);
    --line-dark: rgba(231, 237, 249, .14);
    --button-line: rgba(231, 237, 249, .28);
    background-color: var(--night);
    color: var(--frost);
    color-scheme: dark;
  }
  .offers .offer-tab { background: rgba(231, 237, 249, .07); color: var(--frost); }
  .offers .offer-tab .icon { color: var(--frost-2); }
  .offers .offer.is-open .offer-tab { background: #fff; color: var(--ink); }
  .offers .offer.is-open .offer-tab .icon { color: var(--ink-2); }

  /* «Опыт и доверие» светлый: белые карточки на листе */
  .trust.band-dark {
    --frost: #0b1530;
    --frost-2: #4b5571;
    --line-dark: rgba(11, 21, 48, .12);
    background-color: var(--paper);
    color: var(--ink);
    color-scheme: light;
  }
  .trust .review, .trust .stats, .trust .stats li { background: #fff; box-shadow: none; }
}
@media (600px <= width < 1024px) {
  .trust .stats { background: none; }
}
/* Фраза под фото: компактный кегль, первое предложение главное */
.hero-lead { font-size: 15px !important; line-height: 1.5 !important; color: var(--frost-2) !important; }
.lead-main { color: var(--frost); font-weight: 560; }
@media (min-width: 1024px) { .hero-lead { font-size: 16px !important; max-inline-size: 34em; } }
@media (max-width: 599.98px) { .trust .stats li { background: none !important; } .trust .stats { overflow: hidden; } }
@media (min-width: 1024px) { .hero-lead { max-inline-size: none !important; } }
/* Переключение направлений плавнее: плашка пункта меняет цвет мягко, содержимое карточки проявляется со сдвигом */
.offer-tab { transition: background-color 280ms ease, color 280ms ease, box-shadow 280ms ease; }
.offer-panel { overflow: hidden; }
@keyframes offer-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .js .offer.is-open .offer-panel > * { animation: offer-in 420ms cubic-bezier(.2, .7, .2, 1) both; }
  .js .offer.is-open .offer-panel > :nth-child(2) { animation-delay: 50ms; }
  .js .offer.is-open .offer-panel > :nth-child(3) { animation-delay: 100ms; }
  .js .offer.is-open .offer-panel > :nth-child(4) { animation-delay: 150ms; }
}

/* ===== v17: первый экран на компьютере =====
   Фото без рамки (рамку Арсалан забраковал): крупно, от верха до края следующего листа.
   Слева подряд имя, должность, фраза и кнопки плиткой: «Сохранить контакт» во всю ширину, под ней 2 × 2. */
@media (min-width: 1024px) {
  .hero { padding-block-end: 0 !important; }
  .hero-grid {
    grid-template-rows: auto auto auto !important;
    min-block-size: 0 !important;
    padding-block: 24px calc(var(--band-pad) + var(--overlap)) !important;
    row-gap: 0;
  }
  .hero-name { margin-block-start: 0 !important; }
  .hero-details { align-self: start !important; margin: 0 !important; padding: 40px 0 0 !important; }

  /* Фото без рамки: человек стоит на темном фоне и уходит за край следующего листа */
  .hero-person {
    grid-column: 7 / -1 !important;
    grid-row: 1 / -1 !important;
    align-self: stretch !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    contain: size;
    margin: -24px 0 calc(-1 * (var(--band-pad) + var(--overlap))) !important;
    background: none;
  }
  .hero-person img {
    block-size: 100% !important;
    inline-size: auto !important;
    max-inline-size: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%) !important;
    mask-image: linear-gradient(to right, transparent 0, #000 9%, #000 91%, transparent 100%) !important;
  }

  /* Кнопки плиткой */
  .hero-details .contact-card,
  #contact .contact-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .hero-details .contact-card { margin-block-start: 28px !important; }
  .hero-details .contact-card li:first-child,
  #contact .contact-card li:first-child { grid-column: 1 / -1; }
  .hero-details .contact-card li,
  #contact .contact-card li { display: flex; }
  .hero-details .contact-row:not(.contact-save),
  #contact .contact-row:not(.contact-save) {
    flex: 1;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    grid-template-rows: auto auto;
    align-content: center;
    column-gap: 12px !important;
    row-gap: 2px;
    min-block-size: 72px !important;
    padding: 12px 18px !important;
    border: 1px solid rgba(231, 237, 249, .2) !important;
    border-radius: 14px;
    font-size: 16px !important;
  }
  .hero-details .contact-row:not(.contact-save) .icon,
  #contact .contact-row:not(.contact-save) .icon { grid-row: 1 / 3; }
  .hero-details .contact-row:not(.contact-save) .contact-label,
  #contact .contact-row:not(.contact-save) .contact-label { grid-column: 2; font-weight: 620; }
  .hero-details .contact-row:not(.contact-save) .contact-value,
  #contact .contact-row:not(.contact-save) .contact-value { grid-column: 2; justify-self: start; font-size: 14px; }
  .contact-share .contact-value:empty { display: none; }
  .hero-details .contact-save,
  #contact .contact-save { flex: 1; min-block-size: 64px !important; padding-inline: 20px !important; border-radius: 14px !important; font-size: 17px !important; }
  @media (hover: hover) {
    .hero-details .contact-row:not(.contact-save):hover,
    #contact .contact-row:not(.contact-save):hover { border-color: var(--frost) !important; background-color: rgba(255, 255, 255, .05); }
  }
  #contact .contact-row:not(.contact-save) { border-color: rgba(231, 237, 249, .3) !important; }
}
/* Содержимое карточки проявляется дольше и заметнее */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .js .offer.is-open .offer-panel > * { animation-duration: 520ms; }
}
/* Фото крупнее: голова у верха, низ уходит за край следующего листа */
@media (min-width: 1024px) {
  .hero { overflow: clip; }
  .hero-person { align-items: flex-start !important; }
  .hero-person img { block-size: 122% !important; }
}
.offer-who, .offer-what { text-wrap: balance; }
@media (max-width: 1023.98px) { .hero-lead { line-height: 1.36 !important; } }
/* Фото на телефоне и планшете крупнее: шире колонки, края плеч мягко уходят, низ под светлым листом */
@media (max-width: 1023.98px) {
  .hero { overflow-x: clip; }
  .hero-person { block-size: clamp(320px, 112vw, 520px) !important; margin-block-start: 4px !important; }
  .hero-person img { block-size: 100% !important; inline-size: auto !important; max-inline-size: none !important; }
}
@media (max-width: 1023.98px) and (max-height: 700px) { .hero-person { block-size: clamp(300px, 96vw, 400px) !important; } }
/* Фото крупное (122% высоты колонки), поднято: макушка на уровне логотипа, низ за краем следующего листа.
   Экран обрезается только снизу и по бокам, вверх фото заходит под шапку. */
@media (min-width: 1024px) {
  .hero { overflow: visible !important; clip-path: inset(-120px 0 0 0); }
  .hero-person { margin-block-start: -24px !important; align-items: flex-start !important; }
  .hero-person img { block-size: 122% !important; translate: 0 -56px; }
}

/* v18: телефон и планшет. Все кнопки на первом экране: «Сохранить контакт» во всю ширину,
   под ней ряд из четырех плиток (иконка + подпись). Фото подстраивается под высоту экрана. */
@media (max-width: 1023.98px) {
  .hero-person { block-size: clamp(240px, calc(100svh - 480px), 112vw) !important; }
  .hero-details { padding-block-start: 28px !important; }
  .hero-details .contact-card { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-block-start: 20px !important; }
  .hero-details .contact-card li { display: flex; }
  .hero-details .contact-card li:first-child { grid-column: 1 / -1; }
  .hero-details .contact-row:not(.contact-save) {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-block-size: 64px !important;
    padding: 8px 4px !important;
    border: 1px solid var(--line-dark) !important;
    border-radius: 12px;
    background: #fff;
    font-size: 13px !important;
    text-align: center;
  }
  .hero-details .contact-row:not(.contact-save) .contact-value { display: none; }
  .hero-details .contact-row:not(.contact-save) .contact-label { font-weight: 600; line-height: 1.2; }
  .hero-details .contact-share .contact-label { font-size: 0; }
  .hero-details .contact-share .contact-label::after { content: "Поделиться"; font-size: 13px; }
  .hero-details .contact-save { min-block-size: 56px !important; border-radius: 12px; }
}
@media (max-width: 1023.98px) {
  .hero-details .contact-save { flex: 1; }
  .hero-details .contact-row:not(.contact-save) { font-size: 12px !important; }
  .hero-details .contact-share .contact-label::after { font-size: 12px; }
}
@media (max-width: 1023.98px) { .hero-person { block-size: clamp(180px, calc(100svh - 480px), 112vw) !important; } }
@media (min-width: 1024px) { .hero { overflow-x: clip !important; overflow-y: visible !important; } }
@media (max-width: 1023.98px) { .hero-details { padding-block-end: calc(28px + var(--overlap)) !important; } }
@media (max-width: 1023.98px) { .review blockquote p { font-size: 17px; line-height: 1.42; } .review { padding: 24px 20px; } }
/* Цифры на телефоне: число над подписью во всю ширину строки, без пустой колонки */
@media (max-width: 599.98px) {
  .stats li { display: flex !important; flex-direction: column; align-items: flex-start; gap: 6px !important; padding: 16px 20px !important; }
  .stat-label { font-size: 15px !important; text-wrap: pretty; }
}
@media (max-width: 1023.98px) { #contact .contact-card { margin-block-start: 0 !important; } }
/* Фраза двумя блоками: главное предложение и пояснение, у каждого свои ровные строки */
.lead-main, .lead-rest { display: block; }
.lead-main { text-wrap: pretty; }
.lead-rest { margin-block-start: 6px; text-wrap: pretty; }
@media (max-width: 1023.98px) {
  .lead-main { font-size: 17px; line-height: 1.3; letter-spacing: -.005em; }
  .lead-rest { font-size: 15px; line-height: 1.4; }
}
/* Пока пункт сворачивается, карточка видна; у открытого пункта плашка и карточка одного белого, без шва при наведении */
.js .offer.is-closing .offer-panel { display: flex; }
.offer.is-closing .offer-tab { border-end-start-radius: 14px; border-end-end-radius: 14px; }
@media (hover: hover) { .offer.is-open .offer-tab:hover { background: #fff; } }
@media (max-width: 1023.98px) { .offer-panel { padding-block-start: 2px; } }
/* Цифры на телефоне: мозаика синих плиток (фирменный #00448F), отличается от белой карточки отзыва.
   Сверху «24» и «30» пополам, ниже во всю ширину «11», последней крупно «1,5 млн м²». */
@media (max-width: 599.98px) {
  .trust .stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible;
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
  }
  .trust .stats li {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px !important;
    padding: 18px !important;
    border: 0 !important;
    border-radius: 18px !important;
    background: #00448f !important;
    color: #fff;
  }
  .trust .stats li + li { border: 0 !important; }
  .trust .stats li:nth-child(1) { grid-column: 1; grid-row: 1; }
  .trust .stats li:nth-child(3) { grid-column: 2; grid-row: 1; }
  .trust .stats li:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .trust .stats li:nth-child(4) { grid-column: 1 / -1; grid-row: 3; background: #0b1530 !important; }
  .trust .stat-value { font-size: 36px !important; color: #fff; }
  .trust .stats li:nth-child(2) .stat-value, .trust .stats li:nth-child(4) .stat-value { font-size: 44px !important; }
  .trust .stat-label { font-size: 14px !important; color: rgba(255, 255, 255, .78) !important; text-wrap: balance; }
}
@media (max-width: 599.98px) {
  .trust .stats li { justify-content: flex-start !important; }
  /* «11» во всю ширину: число слева, подпись справа, без пустоты в плитке */
  .trust .stats li:nth-child(2) { flex-direction: row !important; align-items: center; gap: 18px !important; }
  .trust .stats li:nth-child(2) .stat-label { flex: 1; }
}

/* Отзыв со сканом письма НДК: на компьютере скан слева в карточке, цитата и подпись справа;
   на телефоне цитата сверху, ниже скан-миниатюра рядом с подписью. Скан открывается целиком по клику. */
.review.has-letter { display: grid !important; grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; }
.review.has-letter blockquote { grid-column: 1 / -1; grid-row: 1; padding-block-end: 20px; border-block-end: 1px solid var(--line-dark); }
.review.has-letter .review-letter { grid-column: 1; grid-row: 2; align-self: start; margin: 20px 0 0; }
.review.has-letter figcaption { grid-column: 2; grid-row: 2; margin: 20px 0 0 !important; padding: 0 !important; border: 0 !important; }
.review-letter img { border-radius: 6px; box-shadow: 0 0 0 1px rgba(11, 21, 48, .12), 0 8px 20px rgba(11, 21, 48, .18); transition: transform 200ms; }
@media (hover: hover) { .review-letter:hover img { transform: scale(1.02); } }
@media (min-width: 1024px) {
  .review.has-letter { grid-template-columns: 200px minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 32px; }
  .review.has-letter .review-letter { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .review.has-letter blockquote { grid-column: 2; grid-row: 1; padding: 0; border: 0; }
  .review.has-letter blockquote p { font-size: 21px; line-height: 1.38; }
  .review.has-letter figcaption { grid-column: 2; grid-row: 2; align-self: end; margin: 24px 0 0 !important; padding-block-start: 20px !important; border-block-start: 1px solid var(--line-dark) !important; }
}
@media (max-width: 599.98px) { .review.has-letter figcaption { font-size: 14px; } }
/* Скан письма на всю высоту текста: верх по цитате, низ по подписи, лишнее снизу листа обрезается */
@media (min-width: 1024px) {
  .review.has-letter { grid-template-columns: 236px minmax(0, 1fr); }
  .review.has-letter .review-letter { align-self: stretch !important; position: relative; overflow: hidden; border-radius: 8px; min-block-size: 0; }
  .review.has-letter .review-letter img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: top center; border-radius: 8px; }
}

/* Скан письма: видно, что его можно открыть. Метка «Открыть письмо», лист приподнимается при наведении и проседает при нажатии */
.review-letter { position: relative; display: block; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.review-letter img { transition: transform 260ms cubic-bezier(.2, .7, .2, 1), box-shadow 260ms; }
.review-letter-hint {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  inline-size: max-content;
  margin-inline: auto;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: rgba(11, 21, 48, .86);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(11, 21, 48, .25);
  transition: transform 260ms cubic-bezier(.2, .7, .2, 1), background-color 200ms;
}
.review-letter-hint .icon { inline-size: 16px; block-size: 16px; }
@media (hover: hover) {
  .review-letter:hover img { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 18px 36px rgba(0, 0, 0, .35); }
  .review-letter:hover .review-letter-hint { transform: translateY(-4px); background: #00448f; }
}
.review-letter:active img, .review-letter:active .review-letter-hint { transform: scale(.97); transition-duration: 120ms; }
@media (max-width: 599.98px) {
  .review-letter-hint { inset-block-end: 6px; padding: 5px 8px; font-size: 0; gap: 0; }
  .review-letter-hint .icon { inline-size: 16px; block-size: 16px; }
}
@media (min-width: 1024px) {
  .review.has-letter .review-letter { overflow: visible !important; }
}

/* Письмо во весь экран */
.letter-dialog {
  inline-size: min(92vw, 720px);
  max-block-size: 92svh;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.letter-dialog img { display: block; inline-size: 100%; block-size: auto; }
.letter-dialog::backdrop { background: rgba(6, 16, 42, .78); backdrop-filter: blur(4px); }
.letter-dialog-close {
  position: sticky;
  inset-block-start: 10px;
  float: right;
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  margin: 10px 10px -50px 0;
  border: 0;
  border-radius: 50%;
  background: rgba(11, 21, 48, .86);
  color: #fff;
  cursor: pointer;
}
.letter-dialog-close .icon { inline-size: 18px; block-size: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .letter-dialog[open] { animation: letter-in 320ms cubic-bezier(.2, .7, .2, 1); }
  .letter-dialog[open]::backdrop { animation: letter-fade 320ms ease; }
  .letter-dialog.is-closing { animation: letter-out 200ms ease forwards; }
  .letter-dialog.is-closing::backdrop { animation: letter-fade 200ms ease reverse forwards; }
}
@keyframes letter-in { from { opacity: 0; transform: translateY(16px) scale(.92); } }
@keyframes letter-out { to { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes letter-fade { from { opacity: 0; } }

/* Без системной голубой подсветки при касании на телефоне: своя реакция, кнопка чуть проседает */
a, button, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
.offer-tab:active, .offer-link:active, .contact-row:active, .final-btn:active, .button:active { transform: scale(.98); }
.offer-tab, .offer-link { transition-property: background-color, color, box-shadow, transform; transition-duration: 280ms, 280ms, 280ms, 120ms; }
.offer-tab:focus:not(:focus-visible), .contact-row:focus:not(:focus-visible) { outline: none; }

/* Письмо на телефоне и планшете: подпись НДК во всю ширину, под ней строка-кнопка со сканом */
.review-letter-text, .review-letter-icon { display: none; }
@media (max-width: 1023.98px) {
  .review.has-letter { grid-template-columns: minmax(0, 1fr) !important; }
  .review.has-letter blockquote { grid-column: 1; grid-row: 1; }
  .review.has-letter figcaption { grid-column: 1; grid-row: 2; margin: 20px 0 0 !important; font-size: 15px !important; }
  .review.has-letter .review-letter {
    grid-column: 1; grid-row: 3;
    display: flex; align-items: center; gap: 14px;
    margin: 20px 0 0 !important;
    padding: 10px 14px 10px 10px;
    border-radius: 14px;
    background: var(--paper);
    color: var(--ink);
    text-decoration: none;
    transition: transform 120ms, background-color 200ms;
  }
  .review.has-letter .review-letter img { flex: none; inline-size: 44px !important; block-size: 62px !important; object-fit: cover; object-position: top; border-radius: 4px; box-shadow: 0 0 0 1px rgba(11, 21, 48, .1), 0 4px 10px rgba(11, 21, 48, .12); transform: none !important; }
  .review-letter-hint { display: none !important; }
  .review-letter-text { display: grid; gap: 2px; flex: 1; min-inline-size: 0; }
  .review-letter-title { font-size: 15px; font-weight: 640; line-height: 1.3; }
  .review-letter-date { font-size: 13px; line-height: 1.3; color: var(--ink-2); }
  .review-letter-icon { display: block; flex: none; inline-size: 22px; block-size: 22px; color: var(--ink); }
  .review.has-letter .review-letter:active { transform: scale(.98); background: #dfe4ec; }
}
/* На компьютере вместо плашки маленькая лупа в правом нижнем углу листа */
@media (min-width: 1024px) {
  .review-letter-hint {
    inset-inline: auto 10px !important;
    inset-block-end: 10px !important;
    margin: 0 !important;
    inline-size: 32px !important;
    block-size: 32px;
    padding: 0 !important;
    gap: 0 !important;
    font-size: 0 !important;
    border-radius: 50% !important;
  }
  .review-letter-hint .icon { inline-size: 16px !important; block-size: 16px !important; }
}
/* Телефон и планшет: открытый пункт одной белой карточкой (фон у общего блока, а не у плашки и карточки по отдельности),
   поэтому между названием и текстом не может появиться шов-полоска */
@media (max-width: 1023.98px) {
  .offer.is-open, .offer.is-closing { border-radius: 14px; background: #fff; overflow: hidden; }
  .offers .offer.is-open .offer-tab, .offers .offer.is-closing .offer-tab, .offer.is-open .offer-panel, .offer.is-closing .offer-panel { background: transparent !important; box-shadow: none !important; }
  .offers .offer.is-closing .offer-tab { color: var(--ink); }
  .offer.is-open .offer-tab { padding-block-end: 10px; }
  .offer-panel { padding-block-start: 0; }
}
/* Подпись отзыва: описание НДК обычным абзацем во всю ширину, факты плашками */
.review-note { text-wrap: wrap !important; }
.review-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; color: inherit !important; }
.review-facts > span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(231, 237, 249, .1);
  color: var(--frost);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.trust .review-facts > span { background: var(--paper); color: var(--ink); }
@media (min-width: 1024px) { .trust .review-facts > span { background: rgba(231, 237, 249, .1); color: var(--frost); } }
.review-facts > span { padding: 5px 9px; font-size: 12.5px; }
.review figcaption { min-inline-size: 0; }
.review-facts { flex-wrap: nowrap; }
@media (max-width: 359.98px) { .review-facts { flex-wrap: wrap; } }
.review-facts { flex-wrap: wrap !important; }
/* Никаких системных рамок при касании: подсветка выключена у всех элементов, у кнопок нет выделения текста;
   кольцо фокуса только при управлении с клавиатуры */
* { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
.offer-tab, .offer-heading, .contact-row, .offer-link, .review-letter, .button { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none !important; }
.offer-tab:focus-visible { outline-offset: 2px; border-radius: 14px; }
/* Плашки фактов в узкой колонке переносят текст, а не вылезают */
.review-facts > span { white-space: normal; }
/* Закрытый пункт на телефоне: фон у общего блока (как у открытого), плашка прозрачная — цвет меняется плавно, одним элементом */
@media (max-width: 1023.98px) {
  .offers .offer { border-radius: 14px; background: rgba(231, 237, 249, .07); }
  .offers .offer .offer-tab { background: transparent !important; }
  .offers .offer.is-open, .offers .offer.is-closing { background: #fff; }
  .offers .offer.is-closing { background: rgba(231, 237, 249, .07); }
  .offers .offer.is-closing .offer-tab { color: var(--frost); }
}
/* Факты в узкой колонке (1024–1279) не вылезают; скан там уже */
.review-facts > span { min-inline-size: 0; max-inline-size: 100%; }
@media (1024px <= width < 1280px) { .review.has-letter { grid-template-columns: 160px minmax(0, 1fr) !important; column-gap: 24px !important; } }

/* ===== v19: анимации. Только при включенном JS и если в системе не выбрано «уменьшить движение» ===== */
@media (prefers-reduced-motion: no-preference) {
  /* 1. Первый экран при загрузке: имя, должность, фото, фраза, кнопки по очереди */
  @keyframes hero-rise { from { opacity: 0; transform: translateY(28px); } }
  @keyframes hero-photo { from { opacity: 0; transform: translateY(48px) scale(.98); } }
  .is-ready .hero-name { animation: hero-rise 900ms cubic-bezier(.16, .8, .2, 1) backwards; }
  .is-ready .hero-role { animation: hero-rise 800ms 120ms cubic-bezier(.16, .8, .2, 1) backwards; }
  .is-ready .hero-person { animation: hero-photo 1100ms 150ms cubic-bezier(.16, .8, .2, 1) backwards; }
  .is-ready .hero-lead { animation: hero-rise 800ms 260ms cubic-bezier(.16, .8, .2, 1) backwards; }
  .is-ready #hero-actions li { animation: hero-rise 700ms cubic-bezier(.16, .8, .2, 1) backwards; }
  .is-ready #hero-actions li:nth-child(1) { animation-delay: 360ms; }
  .is-ready #hero-actions li:nth-child(2) { animation-delay: 420ms; }
  .is-ready #hero-actions li:nth-child(3) { animation-delay: 470ms; }
  .is-ready #hero-actions li:nth-child(4) { animation-delay: 520ms; }
  .is-ready #hero-actions li:nth-child(5) { animation-delay: 570ms; }

  /* 2. Появление при прокрутке */
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity 800ms cubic-bezier(.16, .8, .2, 1), transform 800ms cubic-bezier(.16, .8, .2, 1); transition-delay: var(--d, 0ms); }
  .reveal.is-in { opacity: 1; transform: none; }

  /* 4. Один блик по главной кнопке после загрузки */
  #hero-actions .contact-save { position: relative; overflow: hidden; isolation: isolate; }
  #hero-actions .contact-save::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-110%);
    animation: save-shine 1300ms 1300ms cubic-bezier(.4, 0, .2, 1) forwards;
    pointer-events: none;
  }
  @media (max-width: 1023.98px) {
    #hero-actions .contact-save::after { background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%); z-index: 0; }
  }
  @keyframes save-shine { to { transform: translateX(110%); } }
}
.stat-value { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
  #hero-actions .contact-save::after { background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, .95) 47%, rgba(143, 176, 255, .45) 53%, transparent 66%); }
}
@media (max-width: 1023.98px) { .hero-details .contact-card { gap: 12px !important; margin-block-start: 22px !important; } }
/* После разделения фразы на два блока она стала выше: фото на телефоне подстраивается с запасом */
@media (max-width: 1023.98px) { .hero-person { block-size: clamp(140px, calc(100svh - 520px), 112vw) !important; } }
@media (max-width: 359.98px) { .lead-main { font-size: 16px; } .lead-rest { font-size: 14px; } }
/* 1024–1279: карточка отзыва во всю ширину, цифры под ней в ряд из четырех; иначе цитата зажата в узкую колонку */
@media (1024px <= width < 1280px) {
  .trust-grid { row-gap: var(--column-gap) !important; }
  .review { grid-column: 1 / -1 !important; }
  .stats { grid-column: 1 / -1 !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; grid-template-rows: auto !important; }
  .review.has-letter { grid-template-columns: 200px minmax(0, 1fr) !important; column-gap: 32px !important; }
}
@media (1024px <= width < 1280px) { .lead-main, .lead-rest { text-wrap: balance; } }

/* Пока шрифт и фото не загрузились, содержимое первого экрана скрыто (шапка и фон видны) */
.js:not(.is-ready) .hero-grid > * { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .js:not(.is-ready) .hero-grid > * { opacity: 1; } }
/* Нижние разделы тоже ждут: пока первый экран подгоняется, его высота может меняться, и лист снизу прыгал бы */
.js:not(.is-ready) main > section.band { opacity: 0; }
@media (prefers-reduced-motion: no-preference) { main > section.band { transition: opacity 600ms 250ms ease; } }
@media (prefers-reduced-motion: reduce) { .js:not(.is-ready) main > section.band { opacity: 1; } }
/* Телефон: светлый лист под фото проявляется плавно, а не появляется пустым */
@keyframes sheet-in { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) and (max-width: 1023.98px) {
  .is-ready .hero-details { animation: sheet-in 500ms 180ms ease backwards; }
}
/* Телефон: Олег крупнее за счет кадра. Фото увеличено и прижато к верху, низ уходит под светлый лист */
@media (max-width: 1023.98px) {
  .hero-person { block-size: clamp(230px, calc(100svh - 470px), 112vw) !important; align-items: flex-start !important; overflow: visible; }
  .hero-person img { block-size: 168% !important; margin-block-start: 0; }
}
/* Шапка на телефоне и планшете: плашка с мягким фоном, логотип компактнее, телефон круглой кнопкой */
@media (max-width: 1023.98px) {
  .page-header .header-inner {
    block-size: 56px !important;
    margin-block-start: 10px;
    padding-inline: 16px 8px;
    border-radius: 16px;
    background: rgba(231, 237, 249, .07);
    box-shadow: inset 0 0 0 1px rgba(231, 237, 249, .09);
  }
  .page-header .wordmark { block-size: 26px !important; }
  .page-header .header-phone {
    display: grid !important;
    place-items: center;
    inline-size: 40px !important;
    min-block-size: 40px !important;
    block-size: 40px;
    border-radius: 50%;
    background: var(--frost);
    color: var(--night) !important;
  }
  .page-header .header-phone .icon { inline-size: 18px; block-size: 18px; }
  .hero-grid { padding-block-start: 20px !important; }
}
@media (max-width: 1023.98px) {
  .page-header .header-inner { block-size: 52px !important; margin-block-start: 8px; padding-inline: 14px 6px; }
  .page-header .wordmark { block-size: 24px !important; }
  .page-header .header-phone { justify-content: center !important; align-items: center !important; }
  .hero-grid { padding-block-start: 16px !important; }
  .hero-person { block-size: clamp(190px, calc(100svh - 485px), 112vw) !important; }
  .hero-person img { block-size: 138% !important; }
  .hero-details { padding-block-start: 24px !important; }
}
/* На айфоне Safari считает «маленький экран» с запасом под панели: фото берет и часть места, которое реально видно (lvh) */
@media (max-width: 1023.98px) {
  .hero-person { block-size: clamp(200px, max(100svh - 485px, 100lvh - 560px), 112vw) !important; }
  .hero-person img { block-size: 150% !important; }
}
/* Телефон: на первом экране имя, крупное фото и кнопки; фраза уходит под кнопки.
   Так фото получает место, которое занимала фраза, а все кнопки остаются на первом экране. */
@media (max-width: 1023.98px) {
  .hero-details { display: flex; flex-direction: column; }
  .hero-details .contact-card { order: 1; margin-block-start: 0 !important; }
  .hero-details .hero-lead { order: 2; margin-block-start: 28px; }
  .hero-person { block-size: clamp(260px, max(100svh - 318px, 100lvh - 390px), 125vw) !important; }
  .hero-person img { block-size: 122% !important; }
}
/* Телефон: высота фото от экрана, замеренного при открытии (--screen-h), а не от единиц svh/lvh, которые меняются при прокрутке */
@media (max-width: 1023.98px) {
  .hero-person { block-size: clamp(260px, calc(var(--screen-h, 100svh) - 318px), 125vw) !important; }
  /* Кнопки и фраза во всю ширину листа (в колонке флекса автоотступы сжимали блок кнопок) */
  .hero-details > * { inline-size: 100%; max-inline-size: 560px; margin-inline: 0 !important; align-self: center; }
}
.build-mark { opacity: .5; }
@media (max-width: 1023.98px) { .lead-main, .lead-rest { text-wrap: wrap !important; } }
/* Компьютер: обе части фразы с ровными строками (сломалось, когда фраза стала двумя блоками) */
@media (min-width: 1024px) { .lead-main, .lead-rest { text-wrap: balance !important; } }

/* Отзыв НДК по просьбе клиента: сначала кто (НДК, описание, факты), потом письмо, под ним цитата */
.review.has-letter figcaption { order: 1; }
@media (max-width: 1023.98px) {
  .review.has-letter figcaption { grid-row: 1 !important; margin: 0 !important; }
  .review.has-letter .review-letter { grid-row: 2 !important; margin: 18px 0 0 !important; }
  .review.has-letter blockquote { grid-row: 3 !important; margin-block-start: 18px; padding: 0 !important; border: 0 !important; }
  .review.has-letter blockquote p { font-size: 15px !important; line-height: 1.5; color: var(--frost-2); }
}
@media (min-width: 1024px) {
  .review.has-letter figcaption { grid-row: 1 !important; align-self: start !important; margin: 0 !important; padding: 0 0 20px !important; border: 0 !important; border-block-end: 1px solid var(--line-dark) !important; }
  .review.has-letter blockquote { grid-row: 2 !important; align-self: end; margin-block-start: 24px; }
  .review.has-letter blockquote p { font-size: 19px !important; line-height: 1.42; }
}
@media (max-width: 1023.98px) { .review.has-letter blockquote p { font-size: 16px !important; color: var(--frost) !important; } }
