/* Шрифты — самодостаточные поднаборы woff2, скачаны с Google Fonts 05.09.2026
   (наряд §2.2: только кириллица и латиница, только нужные начертания).
   unicode-range оставлен: браузер грузит лишь нужный странице поднабор. */

@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/golos-text-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/golos-text-400-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/golos-text-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/golos-text-500-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/golos-text-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/golos-text-600-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/golos-text-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/golos-text-700-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/golos-text-800-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/golos-text-800-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Оформление сайта Дайлос — направление «Небо и кровля», утверждено Ильёй 05.09.2026
   (наряд НАРЯДЫ/сайт-дайлос-оформление.md). Палитра снята с собственных фотографий
   кровель. Образец — websiteDaylos/design/live/page.template.html.
   Внешних CDN нет (спека §11): шрифты лежат рядом, в assets/fonts/.

   Сайт компании — один визуальный мир, светлый. Тёмной темы у него нет
   намеренно: так он выглядит одинаково у всех, кто придёт проверять фирму. */

:root {
  --ink: #0F1B26;          /* основной текст, тёмные полосы */
  --ink-soft: #47596A;     /* второстепенный текст */
  --paper: #FFFFFF;        /* фон страницы */
  --panel: #F2F6F8;        /* фон панелей и карточек */
  --line: #E0E8EE;         /* линии и рамки */
  --accent: #A9612B;       /* акцент (охра) */
  --accent-dark: #7D4720;  /* акцент при наведении */
  --on-dark: #C6D4E0;      /* текст на тёмном */
  --on-dark-dim: #8399AB;  /* приглушённый текст на тёмном */
  --dim: #6E8496;          /* совсем мелкие надписи на тёмном */
  --pad: clamp(22px, 5vw, 72px);
  --sans: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Контент не растягется шире 1240 px даже на большом экране — строки
     остаются читаемыми, а тёмные полосы по-прежнему во всю ширину. */
  --gutter: max(var(--pad), calc((100% - 1240px) / 2));
}

/* ---------- База ---------- */

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

body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding-left: 1.35em; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Липкая шапка съедает высоту при прыжке по ссылке на секцию — возвращаем. */
[id] { scroll-margin-top: 84px; }

/* ---------- Шапка ---------- */
/* Едем вниз — шапка уходит и не закрывает текст. Едем вверх — возвращается,
   и телефон звонит из неё в одно касание. Переключается только класс. */
.hdr {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  transition: transform 320ms cubic-bezier(.22,.68,.3,1), box-shadow 320ms ease;
}
.hdr.stuck { box-shadow: 0 10px 26px -18px rgba(15,27,38,.5); }
.hdr.hide { transform: translateY(-101%); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand span {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; flex-shrink: 1; min-width: 0; }
.nav a { white-space: nowrap; }
.nav a { position: relative; color: var(--ink-soft); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 240ms cubic-bezier(.22,.68,.3,1);
}
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.hdr-right { display: flex; align-items: center; gap: 8px; }
.hdr-phone {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--accent); border-radius: 2px;
  color: var(--ink);
}
.hdr-phone .num { font-family: var(--mono); font-size: 15px; font-weight: 500; white-space: nowrap; }

/* Меню на узких экранах: чекбокс + подпись, без скрипта — работает и там,
   где JavaScript выключен. Сам чекбокс спрятан, но остаётся в табуляции. */
.menu-toggle {
  position: absolute; width: 1px; height: 1px; margin: 0;
  opacity: 0; pointer-events: none;
}
.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer;
}
.burger i { display: block; height: 2px; background: var(--ink);
  transition: transform 200ms ease, opacity 200ms ease; }
.menu-toggle:focus-visible ~ .hdr-right .burger {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
.menu-toggle:checked ~ .hdr-right .burger i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle:checked ~ .hdr-right .burger i:nth-child(2) { opacity: 0; }
.menu-toggle:checked ~ .hdr-right .burger i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 40%;
}
.hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(9,19,28,.94) 0%, rgba(9,19,28,.84) 38%,
    rgba(9,19,28,.2) 74%, rgba(9,19,28,.06) 100%);
}
.hero .inner {
  position: relative;
  display: flex; flex-direction: column; gap: clamp(16px, 2.2vw, 26px);
  max-width: 830px;
  padding: clamp(34px, 6vw, 92px) var(--pad) clamp(38px, 6vw, 92px);
}
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow i { display: block; width: 30px; height: 2px; background: var(--accent); }
.eyebrow span {
  font-family: var(--mono);
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}
.hero h1 { font-size: clamp(29px, 4.4vw, 58px); line-height: 1.1; color: #fff; }
.hero p {
  font-size: clamp(16px, 1.5vw, 20px); line-height: 1.55;
  color: var(--on-dark); max-width: 62ch;
}
.hero p strong { color: #fff; font-weight: 600; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 24px; border-radius: 2px;
  font-size: 16px; font-weight: 600;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border: 1px solid rgba(255,255,255,.42); color: #fff; font-weight: 500; }
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,.7); }

/* ---------- Тёмная полоса цифр ---------- */

.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--ink); color: #fff;
}
.facts div { padding: clamp(20px, 2.4vw, 30px) clamp(20px, 2.8vw, 40px);
  border-right: 1px solid rgba(255,255,255,.12); }
.facts div:last-child { border-right: 0; }
.facts b {
  display: block;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: clamp(25px, 2.6vw, 34px); font-weight: 500;
  color: var(--accent);
}
.facts small { display: block; font-size: 13px; color: var(--on-dark-dim); margin-top: 4px; }

/* ---------- Секции главной ---------- */

.sec { padding: clamp(42px, 5.4vw, 84px) var(--gutter); }
.sec-panel { background: var(--panel); }
.sec-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: clamp(20px, 2.6vw, 40px);
}
.sec-head h2 { font-size: clamp(26px, 3vw, 38px); }
.sec-head .rule { flex-grow: 1; height: 1px; background: var(--line); }
.sec-head .tag {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em;
  color: #8296A6; white-space: nowrap;
}
.sec > p { max-width: 72ch; }
/* Ссылка «Все кейсы →» и подобные абзацы после сетки — не прижимаются к карточкам. */
.sec > .grid-3 + p, .sec > .grid-4 + p { margin-top: clamp(18px, 2.2vw, 30px); }
/* Абзац после цифр доверия — тем же ритмом, что после сеток карточек. */
.sec > .fact-list { margin-bottom: clamp(18px, 2.2vw, 30px); }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.7vw, 24px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 1.7vw, 24px); }

.card {
  display: flex; flex-direction: column; gap: 11px;
  padding: clamp(20px, 2.2vw, 30px) clamp(18px, 2vw, 28px);
  background: var(--panel);
  border-top: 3px solid var(--accent);
}
.sec-panel .card { background: var(--paper); }
.card h3 { font-size: clamp(17px, 1.5vw, 19px); }
.card p { font-size: 16px; line-height: 1.58; color: var(--ink-soft); }
.card-dark { background: var(--ink); border-top-color: var(--ink); justify-content: flex-end; }
.card-dark p { color: var(--on-dark); font-size: 17px; }
.card-dark .more { font-size: 16px; font-weight: 600; color: var(--accent); }
.card-dark .more:hover { color: #C68946; }
.arw { display: inline-block; transition: transform 260ms cubic-bezier(.22,.68,.3,1); }

/* Двери «Кому что» */
.door { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); }
.door .shot { overflow: hidden; height: clamp(160px, 15vw, 190px); }
.door .shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 620ms cubic-bezier(.22,.68,.3,1);
}
.door .body {
  display: flex; flex-direction: column; gap: 11px;
  padding: clamp(18px, 1.9vw, 26px) clamp(18px, 1.9vw, 26px) clamp(20px, 2vw, 28px);
}
.door h3 { font-size: clamp(19px, 1.8vw, 22px); }
.door p { font-size: 16px; line-height: 1.58; color: var(--ink-soft); }
.door .more, .more { font-size: 16px; font-weight: 600; color: var(--accent); margin-top: 2px; }

/* ---------- Цифры с акцентной планкой (доверие, «Цифры») ---------- */

.fact-list {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.fact-list li {
  position: relative; padding-left: 18px;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: clamp(19px, 1.9vw, 26px); font-weight: 500; line-height: 1.3;
}
.fact-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px;
  background: var(--accent);
  transform-origin: top;
}
.fact-list small {
  display: block; margin-top: 6px;
  font-family: var(--sans); font-size: 14.5px; line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- Тёмный блок контактов (главная) ---------- */

.contacts {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 clamp(24px, 4vw, 64px);
  background: var(--ink); color: #fff;
  padding: clamp(38px, 4.6vw, 66px) var(--gutter);
}
.contacts h2 { font-size: clamp(23px, 2.6vw, 34px); color: #fff; }
.contacts .left { display: flex; flex-direction: column; gap: 16px; }
.contacts .left p { font-size: 16px; line-height: 1.6; color: var(--on-dark-dim); max-width: 46ch; }
.contacts .left p a { color: var(--on-dark); }
.contacts .left p a:hover { color: #fff; }
.contacts .big {
  font-family: var(--mono);
  font-size: clamp(24px, 2.6vw, 34px); font-weight: 500;
  color: var(--accent); margin-top: 6px;
}
.contacts .big:hover { color: #C68946; }
.contacts .req { font-size: 13px; color: var(--dim); margin-top: 10px; }
.contacts .req a { color: var(--on-dark-dim); }
.contacts .right { display: flex; flex-direction: column; }
.mail {
  display: flex; flex-direction: column; gap: 3px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mail:first-child { padding-top: 0; }
.mail b { font-size: 17px; font-weight: 600; color: #fff; }
.mail:hover b { color: #fff; }
.mail small { font-size: 14px; color: var(--dim); line-height: 1.45; }

/* ---------- Подвал ---------- */

.foot {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding: 20px var(--gutter);
  background: #08131B; color: var(--dim); font-size: 13px;
}
.foot a { color: var(--on-dark-dim); }
.foot a:hover { color: var(--on-dark); }

/* ---------- Внутренние страницы ---------- */

.container { max-width: 72rem; margin-inline: auto; padding-inline: var(--pad); width: 100%; }

.site-main { padding-block: clamp(34px, 5vw, 60px) clamp(48px, 6vw, 88px); }
/* Только вертикальные отступы: полная запись padding обнуляла боковые поля
   .container (правило ниже по файлу перебивало), и на внутренних страницах
   заголовки прилипали к левому краю — нашёл Илья на телефоне 06.09. */
.site-main--index { padding: 0; }   /* секции главной несут свои отступы сами */

.site-main h1 {
  font-size: clamp(26px, 3.4vw, 42px); line-height: 1.15;
  margin-bottom: 14px;
}
/* Балансировка строк у заголовка отключена на внутренних страницах: на телефоне
   она укорачивает все строки до ровного блока, и справа от заголовка остаётся
   пустая колонка (~90 px при экране 412) — левый край выглядит прижатым
   (замечание Ильи 06.09). У hero главной баланс остаётся: там справа фотография. */
.container > h1 { text-wrap: initial; }
.page-lead {
  font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6;
  color: var(--ink-soft); max-width: 46rem;
}
.page-lead strong { color: var(--ink); font-weight: 600; }

.section { margin-top: clamp(34px, 4.4vw, 60px); }
.section > h2 {
  display: flex; align-items: center; gap: 16px;
  font-size: clamp(22px, 2.6vw, 32px);
  margin-bottom: 16px;
}
.section > h2::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.section h3 { font-size: clamp(16.5px, 1.4vw, 18px); margin: 1.3rem 0 .45rem; }
.section p + p { margin-top: 0.75rem; }
.section ul, .section ol { margin-top: 0.6rem; }
.section li { margin-bottom: 0.3rem; }
.section li:last-child { margin-bottom: 0; }
.section p a { font-weight: 500; }
.section p + p a, .section li a { font-weight: 500; }

/* Нумерованные шаги. */
.steps { list-style: none; counter-reset: step; margin-top: 8px; }
.steps li { counter-increment: step; position: relative; padding-left: 2.9rem; margin-bottom: 1rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 1.9rem; height: 1.9rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  font-family: var(--mono); font-weight: 500; font-size: 0.95rem;
  color: var(--accent);
}
.steps li strong { display: block; }

/* Цитата закона и прочие выписки. */
blockquote {
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 0.9rem 1.25rem;
  margin: 1rem 0;
  border-radius: 0 2px 2px 0;
}
blockquote p + p { margin-top: 0.5rem; }

/* Блок «Вопросы и опасения»: вопрос-заголовок + текст. */
.faq-item { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.faq-item:first-of-type { border-top: 0; padding-top: 0; margin-top: 1rem; }
.faq-item h3 { margin-bottom: 0.5rem; }

/* Кейсы: карточка на всю ширину, фото сбоку. */
.case-card {
  background: var(--panel);
  border-top: 3px solid var(--accent);
  padding: clamp(18px, 2vw, 28px) clamp(18px, 2.2vw, 30px);
  margin-top: 1.5rem;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.case-card h3 { font-size: clamp(17px, 1.6vw, 20px); margin: 0 0 0.25rem; }
.case-card .case-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0.75rem; }
.case-card .case-meta strong { color: var(--ink); font-weight: 600; }
.case-card dt { font-weight: 600; margin-top: 0.6rem; }
.case-card dd { margin: 0.15rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.case-card > div > p:last-child a, .section .case-card + p a { font-weight: 600; }

.case-photo img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line);
}
.case-photo figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* Документ (скан СЭС): пара страниц рядом, читаются крупно. */
.doc-scan { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.doc-scan figure { min-width: 0; }
.doc-scan a { display: block; cursor: zoom-in; }
.doc-scan img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); background: #fff;
  transition: border-color 200ms ease;
}
.doc-scan a:hover img, .doc-scan a:focus-visible img { border-color: var(--accent); }
.doc-scan-hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.5rem; }
.doc-scan figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.4rem; }
.doc-caption { font-size: 0.9rem; color: var(--ink-soft); }

/* Реквизиты. */
.requisites {
  font-size: 0.9rem; line-height: 1.7; color: var(--ink-soft);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 1rem 1.25rem; margin-top: 1rem;
  background: var(--panel); border-radius: 0 2px 2px 0;
}

/* Контакты на внутренних страницах: крупные кликабельные строки. */
.contact-list { list-style: none; margin-top: 6px; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.contact-list li:first-child { border-top: 0; padding-top: 6px; }
.contact-list a { font-size: 17px; font-weight: 600; }
.contact-phone {
  font-family: var(--mono);
  font-size: clamp(22px, 2.2vw, 30px); font-weight: 500;
}
.contact-note { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }

/* Фото в «О компании». */
.photo-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 1rem; }
.photo-row img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }

/* Финальный призыв в конце страницы. */
.page-close {
  margin-top: clamp(44px, 5vw, 72px);
  border-top: 1px solid var(--line);
  padding-top: clamp(22px, 2.6vw, 36px);
}

/* Совместимость: сетка карточек из каркаса этапа A (теперь три колонки
   как в утверждённом оформлении). */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.7vw, 24px); }

/* ---------- Оживление ----------
   Железное правило: шапка и первый экран видны сразу и ничего не ждут —
   ни скрипта, ни прокрутки, ни анимации. Всплывают только блоки ниже сгиба,
   и только если скрипт действительно отработал (класс js). Без скрипта
   страница просто статична, но целая. */
/* Появление у каждого вида блоков своё — это заметнее, чем один и тот же
   наплыв на всё подряд, и не стоит ничего: двигаются только прозрачность
   и смещение, то есть работа видеокарты, а не пересчёт вёрстки. */
/* Смещение задаётся переменными, а не отдельным правилом transform на каждый
   вид блока: иначе правило вида перебивает «показать» и блок так и остаётся
   сдвинутым — ровно эта ошибка убила первые анимации карточек. */
.js .reveal {
  opacity: 0;
  transform: translate(var(--dx, 0px), var(--dy, 22px)) scale(var(--sc, 1));
  transition: opacity 620ms cubic-bezier(.22,.68,.3,1),
              transform 620ms cubic-bezier(.22,.68,.3,1);
}
.js .sec-head.reveal { --dy: 14px; }
.js .card.reveal { --dy: 24px; --sc: .985; }
.js .door.reveal { --dy: 30px; }
.js .facts div.reveal { --dy: 16px; }
.js .fact-list.reveal { --dy: 0px; }
.js .mail.reveal { --dx: -16px; --dy: 0px; }
.js .section.reveal { --dy: 14px; }
.js .case-card.reveal { --dy: 24px; --sc: .985; }
.js .faq-item.reveal { --dy: 16px; }
.js .contacts .left .reveal { --dy: 16px; }
/* «Показать» стоит строго после видовых правил и гасит смещение переменными,
   а не transform: none: с transform: none (0,3,0) оно перебивало бы наведение
   .card:hover (0,2,0), а вид, стоящий ниже «показать», оставил бы блок
   сдвинутым навсегда. */
.js .reveal.in { opacity: 1; --dx: 0px; --dy: 0px; --sc: 1; }

/* Разделительная линия в заголовке прочерчивается слева направо. */
.js .sec-head .rule {
  transform: scaleX(0); transform-origin: left;
  transition: transform 760ms cubic-bezier(.22,.68,.3,1) 140ms;
}
.js .sec-head.in .rule { transform: scaleX(1); }
.js .section.reveal > h2::after {
  transform: scaleX(0); transform-origin: left;
  transition: transform 760ms cubic-bezier(.22,.68,.3,1) 140ms;
}
.js .section.reveal.in > h2::after { transform: scaleX(1); }

/* Акцентная планка у цифр вырастает сверху вниз. */
.js .fact-list.reveal li::before {
  transform: scaleY(0);
  transition: transform 620ms cubic-bezier(.22,.68,.3,1) 140ms;
}
.js .fact-list.reveal li:nth-child(2)::before { transition-delay: 200ms; }
.js .fact-list.reveal li:nth-child(3)::before { transition-delay: 260ms; }
.js .fact-list.reveal li:nth-child(4)::before { transition-delay: 320ms; }
.js .fact-list.reveal.in li::before { transform: scaleY(1); }

/* Наведение — только там, где есть настоящий курсор. На тач-экранах
   :hover залипает после касания, поэтому оно закрыто условием. */
.card, .door, .btn, .hdr-phone { transition: transform 260ms cubic-bezier(.22,.68,.3,1), box-shadow 260ms ease, background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-6px) scale(1.008); box-shadow: 0 20px 40px -20px rgba(15,27,38,.34); }
  .door:hover { transform: translateY(-8px); box-shadow: 0 26px 48px -24px rgba(15,27,38,.4); }
  .door:hover .shot img { transform: scale(1.06); }
  .card:hover .arw, .door:hover .arw { transform: translateX(6px); }
  .btn:hover, .hdr-phone:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(0,0,0,.45); }
  .nav a:hover::after { transform: scaleX(1); }
}
/* Отклик на палец вместо наведения */
@media (hover: none) {
  .card:active, .door:active, .btn:active, .hdr-phone:active { transform: scale(.982); }
  .nav a:active { background: var(--panel); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .sec-head .rule, .js .section.reveal > h2::after,
  .js .fact-list.reveal li::before {
    opacity: 1 !important; transform: none !important;
    animation: none !important; transition: none !important;
  }
  .hdr { position: static !important; transform: none !important; }
  .card, .door, .btn, .hdr-phone, .shot img, .arw, .nav a::after,
  .burger i, .doc-scan img { transition: none !important; }
}

/* ---------- Узкие экраны ---------- */

/* Меню прячем в бургер раньше, чем в образце (1340 против 1100): семь пунктов
   плюс кнопка телефона не помещаются в одну строку уже на ширине 1280 —
   номер начинал переноситься. Сетки на это не завязаны. */
@media (max-width: 1340px) {
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    align-items: stretch;  /* без этого пункты центрируются — наследие горизонтального меню */
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -22px rgba(15,27,38,.4);
    padding: 8px var(--pad) 14px;
  }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav a:last-child { border-bottom: 0; }
  /* Подчёркивание в раскрытом меню работает так же, как в горизонтальном:
     линия слева направо при наведении (замечание Ильи 05.09 — её не было). */
  .nav a::after { bottom: 12px; }
  .burger { display: flex; }
}

@media (max-width: 1180px) {
  .grid-3, .grid-4, .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .hdr { padding: 10px var(--pad); }
  /* Воздух между секциями на телефоне: заголовки не сливаются с текстом выше. */
  .section { margin-top: clamp(44px, 9vw, 58px); }
  .hdr-phone .num { display: none; }
  .hdr-phone { width: 44px; padding: 0; justify-content: center; }
  .grid-3, .grid-4, .card-grid { grid-template-columns: 1fr; }
  .fact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { border-bottom: 1px solid rgba(255,255,255,.12); }
  .facts div:nth-child(2n) { border-right: 0; }
  .facts div:nth-last-child(-n+2) { border-bottom: 0; }
  .hero .scrim {
    background: linear-gradient(180deg,
      rgba(9,19,28,.86) 0%, rgba(9,19,28,.8) 45%, rgba(9,19,28,.94) 100%);
  }
  .hero img { object-position: 62% 40%; }
  .hero-btns .btn { flex: 1 1 100%; }
  .sec-head .tag { display: none; }
  .sec-head { flex-wrap: wrap; gap: 10px 14px; }
  .contacts { grid-template-columns: 1fr; gap: 26px; }
  .case-card { grid-template-columns: 1fr; padding: 20px; }
  .section > h2 { flex-wrap: wrap; }
}
