@font-face {
  font-family: "P112 Web";
  src: url("p112-semibold.woff2") format("woff2"),
       local("P112 Semibold"), local("P112Semibold");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Цвета — без изменений */
  --ink: #171b26;
  --navy: #1b445a;
  --blue: #527a86;
  --mist: #a3b5b9;
  --stone: #dedad7;

  --page-width: 1210px;
  --gutter: clamp(16px, 3.2vw, 46px);
  --card-corner: 1.25em 0 1.25em 0;
  --glass-corner: 37px 0 37px 0;
  --display: "P112 Web", Oswald, "Arial Narrow", sans-serif;

  /* Шкала воздуха: четыре ступени, каждая заметно больше предыдущей */
  --gap-tight: clamp(6px, .7vw, 10px);      /* заголовок → свой текст */
  --gap-item: clamp(24px, 2.4vw, 34px);     /* пункт → пункт внутри блока */
  --gap-head: clamp(22px, 3.2vw, 46px);     /* заголовок раздела → содержимое */
  --gap-section: clamp(56px, 7.8vw, 112px); /* раздел → раздел */

  --rule: 1px solid rgb(23 27 38 / .22);

  font-family: Inter, system-ui, sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--mist);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

:root[lang="en"] { --display: "Bebas Neue", Oswald, "Arial Narrow", sans-serif; }

* { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
}
h1, h2, h3, p { margin: 0; }
.new-line { display: block; }

.site-frame {
  width: 100%;
  /* Фон целиком из макета Figma (1440x5292). Прижат к верху, ширина 100%,
     высота по пропорции. Ниже картинки — ровная заливка того же цвета,
     поэтому стыка не видно при любой высоте страницы. */
  background: url("background.webp") top center / 100% auto no-repeat, var(--mist);
}
.shell {
  width: 100%;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ─────────── Шапка ─────────── */
.site-header { background: var(--navy); padding-block: 26px 18px; }
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 40px;
  align-items: center;
}
.brand { display: block; width: 100%; max-width: 928px; height: auto; }

.button {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .07em;
  border-radius: var(--glass-corner);
  transition: filter 150ms ease;
}
.button:hover, .contact-tile:hover { filter: brightness(1.09); }
.header-cta {
  height: 133px;
  font-size: clamp(26px, 2.6vw + 6px, 42px);
  line-height: 1.07;
  letter-spacing: 0;
  color: var(--stone);
  background:
    radial-gradient(ellipse at 0 0, rgb(0 42 64 / .17), transparent 57%),
    radial-gradient(ellipse at 100% 100%, rgb(195 254 247 / .08), transparent 50%),
    rgb(53 255 231 / .20);
  backdrop-filter: blur(8px);
}
.header-cta span { white-space: pre; }
.button::before, .steps li::before, .contact-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #eff8f9 0%, rgb(228 244 245 / .58) 13%, transparent 36%, transparent 67%, rgb(231 246 248 / .48) 89%, #ecf6f7 100%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* ─────────── Общий фон и ритм страницы ─────────── */
.main {
  position: relative;
  isolation: isolate;
  overflow: clip;
  font-size: clamp(17px, 1.1vw + 9px, 25px);
  line-height: 1.42;
}
.content {
  position: relative;
  z-index: 1;
  padding-block: clamp(24px, 2.8vw, 40px) clamp(64px, 7vw, 100px);
}
.content > section + section { margin-top: var(--gap-section); }
.content > .hero + section { margin-top: clamp(44px, 5vw, 72px); }

/* ─────────── Заголовки ─────────── */
.display {
  font-family: var(--display);
  font-size: clamp(28px, 2.6vw + 16px, 54px);
  font-weight: 500;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
:root[lang="en"] .display { letter-spacing: .065em; }

/* Заголовок раздела + линейка до правого края: даёт странице «главы» */
.copy-section > .display,
.workflow > .display,
.contact > .display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  margin-bottom: var(--gap-head);
}
.copy-section > .display::after,
.workflow > .display::after,
.contact > .display::after {
  content: "";
  flex: 1 1 80px;
  height: 2px;
  background: rgb(23 27 38 / .28);
}

h3 {
  font-size: clamp(20px, 1.3vw + 11px, 30px);
  line-height: 1.17;
  font-weight: 700;
}

/* ─────────── Первый экран ─────────── */
.hero-heading { display: grid; gap: clamp(8px, .8vw, 12px); }
.hero-heading h1 {
  min-width: 0;
  letter-spacing: .008em;
  font-size: clamp(34px, 4.6vw + 8px, 74px);
  line-height: .96;
}
:root[lang="en"] .hero-heading h1 { letter-spacing: .035em; }
.languages {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  padding: .28em .55em;
  border: 1px solid rgb(222 218 215 / .65);
  border-radius: var(--card-corner);
  background: rgb(82 122 134 / .14);
  font-size: clamp(15px, .4vw + 10px, 19px);
  line-height: 1;
}
.languages button { border: 0; background: transparent; min-height: 26px; padding: 0 .3em; color: inherit; cursor: pointer; }
.languages button[aria-pressed="true"] { font-weight: 700; }

.hero-intro {
  margin-top: clamp(12px, 1.3vw, 18px);
  max-width: 62ch;
  font-size: clamp(19px, 1.5vw + 8px, 32px);
  line-height: 1.22;
  font-weight: 600;
}
/* Подпись под обещанием: кто это говорит. Тише основной фразы, но не мельче текста */
.hero-signature {
  margin-top: clamp(8px, .9vw, 13px);
  max-width: 62ch;
  font-size: max(16px, .86em);
  line-height: 1.3;
  font-weight: 500;
  color: rgb(23 27 38 / .74);
}

.sectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 20px);
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  padding: 0;
  list-style: none;
}
.sectors li {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 18px);
  min-block-size: clamp(74px, 6.4vw, 92px);
  padding: 14px 20px 14px 22px;
  border-radius: var(--card-corner);
  background: var(--blue);
  line-height: 1.14;
  overflow-wrap: break-word;
}
.sector-icon {
  display: block;
  flex: 0 0 auto;
  width: clamp(38px, 3.5vw, 50px);
  height: clamp(38px, 3.5vw, 50px);
}

/* Полоса доверия: заказчики — главное доказательство на странице */
.clients {
  margin-top: clamp(20px, 2.4vw, 32px);
  padding: clamp(16px, 1.7vw, 24px) clamp(20px, 2.2vw, 32px);
  border: 1px solid rgb(222 218 215 / .7);
  border-radius: var(--card-corner);
  background: rgb(222 218 215 / .4);
}
.clients > span {
  display: block;
  max-width: 68ch;
  font-size: .84em;
  line-height: 1.34;
}
.clients strong {
  display: block;
  margin-top: .5em;
  font-size: 1.1em;
  line-height: 1.22;
}

/* ─────────── Чем могу помочь: таблица «услуга — что это значит» ─────────── */
.entries { display: grid; }
.services .entries { gap: 0; border-bottom: var(--rule); }
.services .entries > div {
  padding-block: clamp(18px, 2.2vw, 30px);
  border-top: var(--rule);
}
.services .entries h3 { margin-bottom: var(--gap-tight); }
/* Описания услуг — во всю ширину колонки: блоки низкие (2-4 строки),
   цена длинной строки почти нулевая, зато нет пустого колодца справа. */

/* ─────────── Как строится сотрудничество ─────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  isolation: isolate;
  min-block-size: clamp(146px, 13.4vw, 194px);
  padding: clamp(22px, 2.3vw, 32px) clamp(22px, 2.3vw, 32px) clamp(24px, 2.6vw, 36px);
  overflow: hidden;
  border-radius: var(--glass-corner);
  background:
    radial-gradient(ellipse at 0 0, rgb(27 68 90 / .15), transparent 52%),
    radial-gradient(ellipse at 100% 100%, rgb(220 241 243 / .10), transparent 54%),
    rgb(27 68 90 / .20);
}
.steps h3 { margin-bottom: var(--gap-tight); }
.steps p { white-space: pre-line; padding-right: 2.2em; }
.step-number {
  position: absolute;
  z-index: -1;
  inset: auto .06em -.16em auto;
  color: rgb(222 218 215 / .64);
  font-family: var(--display);
  font-size: clamp(80px, 8.4vw, 126px);
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

.after-delivery {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(18px, 2vw, 28px);
  align-items: center;
  margin-top: clamp(26px, 3.4vw, 48px);
  padding: clamp(18px, 2vw, 28px) clamp(20px, 2.4vw, 34px);
  border: 1px solid rgb(222 218 215 / .7);
  border-radius: var(--glass-corner);
  background: rgb(222 218 215 / .34);
}
.after-delivery p { max-width: 72ch; }
.note-icon {
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border: .2em solid var(--stone);
  border-radius: 50%;
  color: var(--stone);
  font-size: clamp(22px, 1.8vw, 34px);
  font-weight: 700;
  line-height: 1;
}

.workflow-cta {
  margin-top: clamp(26px, 3.4vw, 48px);
  min-height: clamp(84px, 8vw, 118px);
  padding: .35em;
  font-size: clamp(26px, 2.8vw + 8px, 54px);
  background:
    linear-gradient(135deg, rgb(239 253 252 / .44), transparent 23%, transparent 76%, rgb(230 248 250 / .29)),
    linear-gradient(107deg, #9bafb5, #91c8c7 53%, #879fa7);
  box-shadow: 0 3px 5px rgb(23 27 38 / .22);
}

/* ─────────── Обо мне ─────────── */
/* Строку держим короткой: это самый длинный связный текст на странице.
   Пустоту справа занимает круг — он нарисован в фоновой картинке. */
.about p { max-width: 62ch; }
.about p + p { margin-top: 1em; }
.about .new-line { margin-top: .5em; }

/* ─────────── Опыт и компетенции ─────────── */
.experience .entries {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 36px) clamp(32px, 4vw, 56px);
  margin-top: var(--gap-head);
}
.experience .entries h3 { margin-bottom: var(--gap-tight); }

/* ─────────── Контакты ─────────── */
.contact { scroll-margin-top: 16px; min-block-size: clamp(280px, 26vw, 400px); padding-bottom: 1em; }
.contact:focus { outline: none; }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 278px));
  gap: clamp(16px, 1.9vw, 26px);
  align-items: start;
}
/* Срок ответа и то, что в мессенджеры можно звонить */
.contact-note {
  margin-top: clamp(18px, 2.1vw, 28px);
  max-width: 42ch;
  font-size: max(16px, .86em);
  line-height: 1.34;
  color: rgb(23 27 38 / .74);
}
/* По-английски строки длиннее — плашке нужно чуть больше места */
:root[lang="en"] .contact-grid { grid-template-columns: repeat(2, minmax(0, 294px)); }
.contact-tile {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.3vw, 18px);
  padding: 14px 16px 14px 20px;
  min-block-size: clamp(76px, 8vw, 118px);
  border-radius: var(--glass-corner);
  background: linear-gradient(135deg, #c2cacc, #c7ced0);
  color: var(--ink);
  font-size: clamp(18px, 1.5vw + 6px, 28px);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  overflow-wrap: break-word;
}
.contact-tile span { white-space: pre; }
.contact-tile::before { background: rgb(222 218 215 / .78); }
.contact-tile img {
  display: block;
  flex: 0 0 auto;
  width: clamp(38px, 3.5vw, 50px);
  height: clamp(38px, 3.5vw, 50px);
}
.contact-mark {
  position: absolute;
  z-index: 0;
  inset-inline-end: max(0px, calc(50% - 605px));
  bottom: 0;
  width: clamp(200px, 34vw, 502px);
  height: auto;
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  z-index: 2;
  inset-inline-end: max(16px, calc(50% - 674px));
  inset-block-end: 24px;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgb(222 218 215 / .6);
  border-radius: 15px 0 15px 0;
  background: var(--navy);
  color: var(--stone);
}
.back-to-top:not([hidden]) { display: grid; }
.back-to-top:hover { background: var(--ink); }
.back-to-top:focus-visible { outline-color: var(--ink); }

/* ─────────── Планшет ─────────── */
@media (max-width: 1080px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) 200px; gap: 24px; }
  .header-cta { height: 108px; }
}

/* ─────────── Телефон ─────────── */
@media (max-width: 760px) {
  .site-header { padding-block: 20px; }
  .header-inner { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .header-cta { width: 100%; height: 76px; }
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-heading { display: block; }
  .languages { float: right; margin: 0 0 8px 14px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps p { white-space: normal; padding-right: 1.1em; }
  .steps p br { display: none; }
  .step-number { font-size: clamp(60px, 15vw, 92px); }
  .experience .entries { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { min-block-size: 0; }
  .contact-mark { width: 58vw; opacity: .9; }
  .back-to-top { inset-block-end: 16px; }
}

@media (max-width: 520px) {
  .sectors { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sectors li { min-block-size: 58px; padding: 10px 16px 10px 18px; }
  .sector-icon { width: 34px; height: 34px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .contact { padding-bottom: 150px; }
  .after-delivery { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-intro { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}
