/* =========================================================
   Промстрой · Сочи — лендинг аренды оборудования
   ========================================================= */

:root {
  --ink: #0C0E0F;
  --ink-2: #141719;
  --ink-3: #1C2023;
  --paper: #F4F3EF;
  --paper-2: #E8E6E0;
  --white: #FFFFFF;

  --text: var(--ink);
  --muted: #5F6468;
  --line: rgba(12, 14, 15, .12);
  --on-dark: #F4F3EF;
  --on-dark-muted: rgba(244, 243, 239, .62);
  --line-dark: rgba(244, 243, 239, .14);

  --accent: #FF5A1F;
  --accent-hover: #FF7240;

  --radius-xl: 28px;
  --radius: 20px;
  --radius-sm: 14px;
  --inset: 8px;

  --pad: clamp(16px, 4vw, 48px);
  --maxw: 1360px;
  --section-y: clamp(80px, 10vw, 144px);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --hero-interval: 3000ms;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -.005em;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
html.menu-open { overflow: hidden; }

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

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-weight: 600;
  transform: translateY(-200%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Типографика ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--dark { color: var(--on-dark-muted); }
.eyebrow__num {
  display: inline-grid; place-items: center;
  height: 24px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text);
}
.eyebrow--dark .eyebrow__num { border-color: var(--line-dark); color: var(--on-dark); }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 90, 31, .22);
}

.section-title {
  font-size: clamp(36px, 5vw, 76px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section-lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); max-width: 440px; text-wrap: pretty; }
.section--dark .section-lead { color: var(--on-dark-muted); }

/* ---------- Кнопки ---------- */
.btn {
  --h: 60px;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: var(--h);
  padding: 0 8px 0 26px;
  border-radius: 999px;
  font-size: 16px; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  transition: transform .4s var(--ease);
}
.btn:hover .btn__icon .i, .btn--sm:hover .i { transform: scale(1.12); }
.btn__icon .i { transition: transform .4s var(--ease); }

.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--accent .btn__icon { background: var(--ink); color: var(--accent); }

.btn--ghost {
  padding: 0 24px 0 8px;
  background: rgba(244, 243, 239, .07);
  border: 1px solid var(--line-dark);
  color: var(--on-dark);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.btn--ghost:hover { background: rgba(244, 243, 239, .14); border-color: rgba(244, 243, 239, .3); }
.btn--ghost .btn__icon { background: rgba(244, 243, 239, .1); }
.btn__stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn__stack small { font-size: 12px; font-weight: 500; color: var(--on-dark-muted); }

.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--accent); color: var(--ink); }

.btn--sm { --h: 46px; padding: 0 20px; font-size: 15px; gap: 8px; }
.btn--sm .i { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn--sm:has(.i) { padding-left: 16px; }
.btn--block { width: 100%; justify-content: space-between; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: calc(var(--inset) + 12px); left: 0; right: 0; z-index: 50;
  padding-inline: max(calc(var(--inset) + 8px), calc(var(--inset) + var(--pad) - 18px));
  pointer-events: none;
}
/* Жидкое стекло, как в iOS 26: фон под плашкой размыт и насыщен, по ободку блик, внутри объём.
   Стекло нарисовано псевдоэлементами, а не самой плашкой: элемент с backdrop-filter
   отрезает вложенным стёклам (линзе меню) вид на страницу */
@property --glass-tint { syntax: "<color>"; inherits: true; initial-value: rgba(16, 18, 20, .4); }
.header__bar {
  --glass-tint: rgba(16, 18, 20, .4);
  --glass-rim: rgba(255, 255, 255, .5);
  --glass-rim-soft: rgba(255, 255, 255, .08);
  --glass-light: rgba(255, 255, 255, .26);
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 24px;
  height: 64px; padding: 0 8px 0 18px;
  border-radius: 999px;
  color: var(--on-dark);
  pointer-events: auto;
  transition: color .45s var(--ease), --glass-tint .45s var(--ease);
}
.header__bar::before, .header__bar::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .45s var(--ease);
}
.header__bar::before {
  background: var(--glass-tint);
  -webkit-backdrop-filter: blur(12px) saturate(1.9) brightness(1.05);
  backdrop-filter: blur(12px) saturate(1.9) brightness(1.05);
  box-shadow:
    inset 0 1px 1px var(--glass-light),
    inset 0 -1px 1px rgba(255, 255, 255, .08),
    inset 0 0 22px rgba(255, 255, 255, .05),
    0 14px 34px -16px rgba(0, 0, 0, .5);
}
/* Ободок: блик ярче сверху слева и подсвечивается там, где курсор */
.header__bar::after {
  padding: 1px;
  background:
    radial-gradient(180px 60px at var(--gx, 16%) 0%, rgba(255, 255, 255, .85), transparent 70%),
    linear-gradient(120deg, var(--glass-rim), var(--glass-rim-soft) 26%, transparent 50%, var(--glass-rim-soft) 74%, var(--glass-rim));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.header.is-scrolled .header__bar::before, .header.is-scrolled .header__bar::after,
.menu-open .header__bar::before, .menu-open .header__bar::after { opacity: 1; }

/* Над светлыми блоками стекло светлеет, текст темнеет — как iOS подстраивается под фон */
html:not(.menu-open) .header.is-light .header__bar {
  --glass-tint: rgba(255, 255, 255, .34);
  --glass-rim: rgba(255, 255, 255, .95);
  --glass-rim-soft: rgba(255, 255, 255, .3);
  --glass-light: rgba(255, 255, 255, .9);
  color: var(--ink);
}
html:not(.menu-open) .header.is-light .header__bar::before {
  box-shadow:
    inset 0 1px 1px var(--glass-light),
    inset 0 -1px 1px rgba(255, 255, 255, .45),
    inset 0 0 22px rgba(255, 255, 255, .3),
    0 14px 34px -18px rgba(12, 14, 15, .3);
}
html:not(.menu-open) .header.is-light .logo__text small { color: rgba(12, 14, 15, .55); }
html:not(.menu-open) .header.is-light .nav a { color: rgba(12, 14, 15, .62); }
html:not(.menu-open) .header.is-light .nav a:hover,
html:not(.menu-open) .header.is-light .nav a.is-current { color: var(--ink); }
html:not(.menu-open) .header.is-light .burger { background: rgba(12, 14, 15, .07); }
.logo__text small, .burger { transition: color .45s var(--ease), background-color .45s var(--ease); }

/* Линза меню: стеклянная капля переезжает к пункту под курсором (или к текущему разделу) */
.nav { position: relative; }
.nav__lens {
  position: absolute; left: 0; top: 0; z-index: -1;
  height: 100%; width: 0;
  border-radius: 999px; pointer-events: none;
  background: rgba(255, 255, 255, .1);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .35),
    inset 0 -1px 1px rgba(255, 255, 255, .1),
    0 6px 16px -8px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(2px) saturate(1.7) brightness(1.18);
  backdrop-filter: blur(2px) saturate(1.7) brightness(1.18);
  opacity: 0;
  transition:
    transform .6s cubic-bezier(.3, 1.35, .45, 1), width .6s cubic-bezier(.3, 1.35, .45, 1),
    opacity .3s var(--ease), background-color .45s var(--ease);
}
.nav__lens.is-on { opacity: 1; }
html:not(.menu-open) .header.is-light .nav__lens {
  background: rgba(255, 255, 255, .55);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .95),
    inset 0 -1px 1px rgba(255, 255, 255, .5),
    0 6px 16px -8px rgba(12, 14, 15, .25);
}

/* Chromium: к стеклу добавляется преломление по краям (карту смещений рисует main.js) */
.glass-refract .header__bar::before {
  -webkit-backdrop-filter: url(#glass-refract) blur(9px) saturate(1.9) brightness(1.05);
  backdrop-filter: url(#glass-refract) blur(9px) saturate(1.9) brightness(1.05);
}

/* Кто попросил меньше прозрачности в настройках системы — плотная плашка без стекла */
@media (prefers-reduced-transparency: reduce) {
  .header__bar::before, .glass-refract .header__bar::before { background: rgba(16, 18, 20, .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
  html:not(.menu-open) .header.is-light .header__bar::before { background: rgba(255, 255, 255, .96); }
}

.logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo__mark { height: 34px; width: auto; }
.logo__text { display: flex; flex-direction: column; font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.logo__text small { margin-top: 6px; font: 600 10.5px/1 var(--font); letter-spacing: .3em; text-transform: uppercase; color: var(--on-dark-muted); }

.nav { display: flex; gap: 4px; margin-inline: auto; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 500; color: var(--on-dark-muted);
  transition: color .3s, background-color .3s;
}
.nav a:hover, .nav a.is-current { color: var(--on-dark); }
.nav .i { width: 17px; height: 17px; opacity: .75; transition: color .3s, opacity .3s; }
.nav a:hover .i, .nav a.is-current .i { color: var(--accent); opacity: 1; }

.header__actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.nav + .header__actions { margin-left: 0; }
.header__phone { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.header__phone:hover { color: var(--accent); }
.burger {
  display: none; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(244, 243, 239, .08);
}
.burger { position: relative; }
.burger span {
  position: absolute; left: 14px; right: 14px; height: 1.75px; border-radius: 2px;
  background: currentColor;
  transition: transform .4s var(--ease), top .4s var(--ease);
}
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 26px; }
.menu-open .burger span:first-child { top: 22.5px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 22.5px; transform: rotate(-45deg); }

/* Мобильное меню */
.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px var(--pad) calc(28px + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--on-dark);
  opacity: 0; visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.menu-open .menu { opacity: 1; visibility: visible; }
.menu__nav { display: flex; flex-direction: column; }
.menu__nav a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line-dark);
  font-size: clamp(30px, 8vw, 44px); font-weight: 600; letter-spacing: -.04em; line-height: 1.1;
}
.menu__nav span { font: 500 12px/1 var(--mono); color: var(--accent); }
.menu__foot { display: grid; gap: 16px; }
.menu__phone { font-size: 22px; font-weight: 600; }

/* ---------- Блок 1. Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  margin: var(--inset);
  min-height: max(660px, calc(100svh - 2 * var(--inset)));
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #0E1112;
  color: var(--on-dark);
  display: flex;
}

/* Фон: тёмная сетка-чертёж, фото справа растворяется в ней влево и вниз */
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(45% 55% at 60% 45%, rgba(255, 90, 31, .12), transparent 65%),
    #0E1112;
}
.hero__slide {
  --fade-x: linear-gradient(90deg,
    transparent 0%, rgba(0, 0, 0, .03) 6%, rgba(0, 0, 0, .09) 12%, rgba(0, 0, 0, .19) 18%,
    rgba(0, 0, 0, .32) 24%, rgba(0, 0, 0, .47) 30%, rgba(0, 0, 0, .62) 36%, rgba(0, 0, 0, .76) 42%,
    rgba(0, 0, 0, .88) 48%, rgba(0, 0, 0, .96) 54%, #000 60%);
  position: absolute; top: 0; bottom: 0; right: 0; left: 32%; z-index: 0;
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1); /* плавная смена, если кадров несколько */
  -webkit-mask-image: var(--fade-x);
  mask-image: var(--fade-x);
}
.hero__slide.is-leaving { z-index: 1; opacity: 1; transition: none; }
.hero__slide.is-active { z-index: 2; opacity: 1; }
.hero__slide::after { content: ""; position: absolute; inset: 0; z-index: 2; background: rgba(14, 17, 18, .22); pointer-events: none; }

.hero__img, .hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
/* Живая сетка: случайные квадраты мягко подсвечиваются (квадраты создаёт js) */
.hero__cells { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.hero__cell { position: absolute; width: 63px; height: 63px; background: rgba(244, 243, 239, .07); opacity: 0; }
.js .hero__img { opacity: 0; transition: opacity .8s ease; }
.js .hero__img.is-loaded { opacity: 1; }
.hero__video { z-index: 1; opacity: 0; transition: opacity .6s; }
.hero__slide.has-video .hero__video { opacity: 1; }

.hero__shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14, 17, 18, .55) 0%, rgba(14, 17, 18, 0) 20%),
    /* сетка поверх всего: светлые линии видны на тёмном, тёмные — на светлом фото */
    linear-gradient(rgba(244, 243, 239, .045) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(244, 243, 239, .045) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(14, 17, 18, .2) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(14, 17, 18, .2) 1px, transparent 1px) 0 0 / 64px 64px;
}

.hero__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; /* на узких экранах — прижато вниз */
  gap: clamp(36px, 6vh, 72px);
  max-width: none;
  padding-top: 140px;
  padding-bottom: clamp(32px, 9vh, 88px);
}
.hero__content { max-width: none; } /* строки заголовка задаются переносами */
.hero__title {
  font-size: clamp(38px, 4.8vw, 86px);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.035em;
  text-shadow: 0 2px 30px rgba(10, 12, 13, .35); /* концы строк заходят на фото */
}
.hero__lead .dot { flex: none; } /* точка не сжимается, когда текст переносится */
.hero__accent { color: var(--accent); }
.hero__lead {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 26px;
  max-width: 46em;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -.015em;
  color: var(--on-dark-muted);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }


/* Переключатель видео — как сторис */
.hero__tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 24px); }
.hero__tab {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px 12px;
  padding-block: 4px 6px;
  text-align: left;
  color: var(--on-dark-muted);
  transition: color .3s;
}
.hero__tab:hover, .hero__tab.is-active { color: var(--on-dark); }
.hero__bar {
  grid-column: 1 / -1;
  position: relative; height: 2px; border-radius: 2px; overflow: hidden;
  background: rgba(244, 243, 239, .2);
}
.hero__bar i {
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left; transform: scaleX(0);
}
.hero__tab.is-done .hero__bar i { transform: scaleX(1); background: rgba(244, 243, 239, .55); }
.hero__tab.is-active .hero__bar i { animation: fill var(--hero-interval) linear forwards; }
.hero.is-paused .hero__tab.is-active .hero__bar i { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.hero__tab-num { font: 500 12px/1 var(--mono); color: var(--accent); }
/* Значок «листайте вниз»: колёсико мыши бежит вниз */
.hero__scroll {
  position: absolute; z-index: 3;
  left: 0; right: 0; bottom: clamp(20px, 3.5vh, 36px);
  width: fit-content; margin-inline: auto;
  padding: 8px;
  color: var(--on-dark-muted);
  transition: color .3s;
}
.hero__scroll:hover { color: var(--on-dark); }
.hero__mouse {
  position: relative; display: block;
  width: 26px; height: 42px; border-radius: 14px;
  border: 1.5px solid currentColor;
}
.hero__mouse i {
  position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: var(--accent);
  animation: scrollWheel 1.8s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes scrollWheel {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(14px); opacity: 0; }
}
.js .hero__scroll { opacity: 0; animation: fadeUp 1s var(--ease) 1.2s forwards; }
.hero--single .hero__tabs { display: none; } /* одна картинка — переключать нечего */
.hero__tab-label { font-size: 15px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Появление заголовка по словам */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em 0 .1em; margin: -.12em 0 -.1em; }
.w > span { display: inline-block; }
.js .w > span {
  transform: translateY(110%);
  animation: wordUp 1.1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms + 150ms);
}
@keyframes wordUp { to { transform: none; } }
.js .hero__lead, .js .hero__actions, .js .hero__tabs {
  opacity: 0; transform: translateY(16px);
  animation: fadeUp 1s var(--ease) forwards;
}
.js .hero__lead { animation-delay: .05s; }
.js .hero__actions { animation-delay: .75s; }
.js .hero__tabs { animation-delay: 1.1s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }



/* ---------- Секции ---------- */
.section { padding-block: var(--section-y); }
.section--panel,
.section--dark {
  margin-inline: var(--inset);
  border-radius: var(--radius-xl);
}
.section--panel { background: var(--paper-2); }
.section--dark {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--on-dark);
}
.section--dark::before {
  content: ""; position: absolute; z-index: -1;
  width: 70vw; height: 70vw; right: -25vw; top: -35vw;
  background: radial-gradient(closest-side, rgba(255, 90, 31, .2), transparent);
  pointer-events: none;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px 48px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head .section-lead { justify-self: end; }

/* Появление при скролле. Подъём при наведении — через translate: он не спорит с transform появления */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition:
    opacity 1s var(--ease) var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms),
    translate .6s var(--ease), box-shadow .6s var(--ease), border-color .4s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Наведение: подсветка за курсором, подъём карточек ---------- */
[data-glow]::before {
  content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 90, 31, .09), transparent 65%);
  opacity: 0; transition: opacity .5s var(--ease);
}
[data-glow] > * { position: relative; z-index: 1; }
.why-card--feature[data-glow]::before { background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 90, 31, .26), transparent 65%); }
.why-card, .term { position: relative; transition: translate .6s var(--ease), box-shadow .6s var(--ease), border-color .4s var(--ease); }
.why-card__icon { transition: background-color .4s var(--ease), color .4s var(--ease), transform .5s var(--ease); }
.term h3::before { transition: rotate .5s var(--ease); }
.product__index { transition: background-color .4s var(--ease), color .4s var(--ease); }
/* Блик по фото при наведении (само фото не увеличивается) */
.product__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .22) 48%, transparent 66%);
  transform: translateX(-130%);
}

@media (hover: hover) and (pointer: fine) {
  [data-glow]:hover::before { opacity: 1; }
  .product:hover { translate: 0 -6px; box-shadow: 0 40px 70px -40px rgba(12, 14, 15, .35); border-color: rgba(12, 14, 15, .18); }
  .product:hover .product__media::after { transform: translateX(130%); transition: transform 1.2s var(--ease); }
  .product:hover .product__index { background: var(--accent); color: var(--ink); }
  .product:hover .btn--dark { background: var(--accent); color: var(--ink); }
  .product:hover .btn--sm .i { transform: scale(1.12); }

  .why-card:hover, .term:hover { translate: 0 -4px; box-shadow: 0 30px 60px -38px rgba(12, 14, 15, .32); }
  .why-card:not(.why-card--feature):hover { border-color: rgba(12, 14, 15, .2); }
  .why-card:not(.why-card--feature):hover .why-card__icon { background: var(--accent); transform: rotate(-10deg) scale(1.06); }
  .why-card--feature:hover .why-card__icon .i { animation: drive 1s var(--ease); }
  .term:hover h3::before { rotate: 45deg; }
}
/* Грузовик уезжает вправо и возвращается слева */
@keyframes drive {
  45% { translate: 14px 0; opacity: 0; }
  46% { translate: -14px 0; opacity: 0; }
}

/* ---------- Анимации, привязанные к прокрутке (Chrome, Edge, Safari 26+) ----------
   Там, где их нет, работает обычное появление выше. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Карточки поднимаются и проявляются по мере прокрутки — и обратно при прокрутке вверх.
       Длина в пикселях, а не в % высоты: высокая карточка на телефоне не висит полупрозрачной */
    .js .product[data-reveal], .js .why-card[data-reveal], .js .term[data-reveal] {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 280px;
    }
    /* Фото раскрывается из скруглённой рамки */
    .product__media {
      animation: unveil linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 360px;
    }
    /* «В день заказа» заливается белым слева направо */
    .why-card__big {
      background: linear-gradient(90deg, var(--on-dark) 45%, rgba(244, 243, 239, .2) 55%) 100% 0 / 220% 100%;
      -webkit-background-clip: text; background-clip: text; color: transparent;
      animation: textFill linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 55%;
    }
    /* Первый экран: текст уходит вверх и гаснет, фото отстаёт (параллакс) */
    .hero { view-timeline: --hero block; }
    .hero__inner { animation: heroDrift linear both; animation-timeline: --hero; animation-range: exit 0% exit 90%; }
    .hero__slide { animation: heroParallax linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    /* Шаги заявки загораются по очереди */
    .steps li { animation: stepOn linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    /* Большое «Промстрой» в подвале выезжает снизу */
    .footer__word { animation: wordRise linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(64px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { clip-path: inset(8% 7% round 20px); } to { clip-path: inset(0 round 0); } }
@keyframes textFill { to { background-position: 0 0; } }
@keyframes heroDrift { to { transform: translateY(-10vh); opacity: 0; } }
@keyframes heroParallax { to { translate: 0 22%; } }
@keyframes stepOn { from { opacity: .25; } to { opacity: 1; } }
@keyframes wordRise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Блок 2. Почему мы ---------- */
.why__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
}
.why-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 280px;
  padding: clamp(24px, 2.6vw, 36px);
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.why-card--feature {
  grid-row: span 2;
  background: var(--ink); color: var(--on-dark); border-color: transparent;
  position: relative; overflow: hidden;
}
.why-card--feature::after {
  content: ""; position: absolute; inset: auto -20% -40% auto;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 90, 31, .28), transparent);
  pointer-events: none;
}
.why-card__top { display: flex; justify-content: space-between; align-items: center; }
.why-card__num { font: 500 13px/1 var(--mono); color: var(--muted); }
.why-card--feature .why-card__num { color: var(--on-dark-muted); }
.why-card__icon {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
}
.why-card--feature .why-card__icon { background: var(--accent); }
.why-card__icon .i { width: 22px; height: 22px; }
.why-card__big {
  font-size: clamp(56px, 8vw, 128px);
  font-weight: 600; line-height: .88; letter-spacing: -.045em;
}
.why-card__text h3 { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.why-card__text p { margin-top: 10px; color: var(--muted); max-width: 380px; }
.why-card--feature .why-card__text p { color: var(--on-dark-muted); }

/* ---------- Блок 3. Каталог ---------- */
.catalog { padding-top: 0; }
.catalog__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product {
  container-type: inline-size;
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}
/* Обычные карточки — 5 общих рядов: фото / заголовок / описание / характеристики / цена.
   container-type здесь выключен: он включает layout containment, и subgrid перестаёт работать */
.product:not(.product--wide) { container-type: normal; display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
.product:not(.product--wide) .product__body { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
.product:not(.product--wide) .specs { align-self: start; margin-top: 22px; }
.product:not(.product--wide) .product__foot { flex-direction: column; align-items: stretch; margin-top: 22px; align-self: end; }
.product__media { position: relative; aspect-ratio: 5 / 4; background: var(--paper-2); overflow: hidden; }
.product__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.product__index {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  font: 500 11px/1 var(--mono); letter-spacing: .06em; color: var(--paper);
  padding: 7px 10px; border-radius: 999px;
  background: rgba(12, 14, 15, .5);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.product__body { display: flex; flex-direction: column; gap: 20px; flex: 1; padding: clamp(20px, 2vw, 28px); }
.product__title { font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
.product__desc { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 460px; }

/* Флагман: широкая карточка на всю строку */
.product--wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.product--wide .product__media { aspect-ratio: auto; min-height: 460px; }
.product--wide .product__body { padding: clamp(24px, 3vw, 44px); justify-content: space-between; }
.product--wide .product__title { font-size: clamp(28px, 3vw, 44px); }
.specs > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 12px; border-top: 1px solid var(--line); }
.specs dt { font: 500 12px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.specs dd { font-weight: 600; text-align: right; }
.product__foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line);
}
.price { font-size: clamp(28px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.price span { display: block; margin-bottom: 6px; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price small { font-size: .5em; font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
@container (max-width: 440px) {
  .product__foot { flex-direction: column; align-items: stretch; }
}

/* ---------- Блок 4. Условия ---------- */
.terms__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
/* Каждая плитка занимает 3 общих ряда: значение / заголовок / текст */
.term {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: clamp(22px, 2.2vw, 30px);
  border-radius: var(--radius);
  background: var(--paper);
}
.term__key, .term .tags { align-self: start; margin-bottom: clamp(48px, 6vw, 96px); }
.term h3 { align-self: end; }
.term__key { font-size: clamp(44px, 4.4vw, 68px); font-weight: 600; line-height: .9; letter-spacing: -.04em; }
.term__key small { font-size: .42em; letter-spacing: -.02em; color: var(--muted); }
.term h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.term h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.term p:not(.term__key) { margin-top: 8px; color: var(--muted); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  font: 500 12px/1.2 var(--mono); letter-spacing: .02em;
  background: var(--white);
}

/* ---------- Блок 5. Заявка ---------- */
.request { margin-top: var(--section-y); }
.request__grid { display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.request__intro .eyebrow { margin-bottom: 28px; }
.request__intro .section-lead { margin-top: 24px; }
.steps { margin-top: clamp(32px, 5vw, 56px); max-width: 480px; }
.steps li {
  display: flex; align-items: baseline; gap: 18px;
  padding-block: 16px;
  border-top: 1px solid var(--line-dark);
  font-size: 18px; font-weight: 500; letter-spacing: -.01em;
}
.steps li:last-child { border-bottom: 1px solid var(--line-dark); }
.steps span { font: 500 12px/1 var(--mono); color: var(--accent); }

.form {
  position: relative;
  display: grid; gap: 20px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 24px;
  background: rgba(244, 243, 239, .04);
  border: 1px solid var(--line-dark);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.field { display: grid; gap: 10px; min-width: 0; border: 0; padding: 0; }
.field > label, .field > legend {
  padding: 0;
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-dark-muted);
}
.field > legend { margin-bottom: 10px; }
.req { color: var(--accent); }
.opt { margin-left: 6px; text-transform: none; letter-spacing: 0; opacity: .7; }
.field input, .field textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-dark);
  background: rgba(244, 243, 239, .04);
  color: var(--on-dark);
  font: inherit; font-size: 17px;
  transition: border-color .3s, background-color .3s;
  -webkit-appearance: none; appearance: none;
}
.field input { height: 58px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(244, 243, 239, .32); }
.field input:hover, .field textarea:hover { border-color: rgba(244, 243, 239, .3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(244, 243, 239, .07); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--on-dark); box-shadow: 0 0 0 100px #1A1D1F inset; caret-color: var(--on-dark); }
.field__error { display: none; font-size: 14px; color: #FF8A5E; }
.field.is-invalid input { border-color: #FF8A5E; }
.field.is-invalid .field__error { display: block; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center;
  height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--on-dark-muted); font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: background-color .25s, border-color .25s, color .25s;
}
.chip:hover span { border-color: rgba(244, 243, 239, .35); color: var(--on-dark); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips.is-flash .chip input:checked + span { animation: flash .9s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .7); } 100% { box-shadow: 0 0 0 14px rgba(255, 90, 31, 0); } }

.form .btn--block { margin-top: 4px; }
.form.is-sending .btn--block { cursor: progress; opacity: .8; }
.form.is-sending .btn__icon .i { display: none; }
.form.is-sending .btn__icon::after {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form__status {
  padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 138, 94, .35);
  background: rgba(255, 138, 94, .08);
  font-size: 15px; line-height: 1.45; color: #FFC2A8;
}
.form__status[hidden] { display: none; }
.form__status a { color: var(--on-dark); font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { font-size: 13px; line-height: 1.5; color: rgba(244, 243, 239, .45); }
.form__note a { color: var(--on-dark-muted); text-decoration: underline; text-underline-offset: 3px; }

/* Заявка отправлена: поля исчезают, но держат высоту формы, сообщение встаёт по центру */
.form > :not(.form__success) { transition: opacity .35s var(--ease), visibility .35s; }
.form.is-sent > :not(.form__success) { opacity: 0; visibility: hidden; }
.form__success {
  position: absolute; inset: 0;
  display: grid; align-content: center; justify-items: center; gap: 12px;
  padding: clamp(22px, 3vw, 36px);
  text-align: center;
  animation: successIn .7s var(--ease) .2s both;
}
.form__success[hidden] { display: none; }
.form__success-icon {
  display: grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%;
  background: var(--accent); color: var(--ink);
  box-shadow: 0 0 0 10px rgba(255, 90, 31, .14), 0 0 0 22px rgba(255, 90, 31, .06);
  animation: successPop .7s cubic-bezier(.3, 1.5, .5, 1) .35s both;
}
.form__success-icon .i { width: 28px; height: 28px; stroke-width: 2.25; }
.form__success h3 { font-size: 32px; font-weight: 600; letter-spacing: -.04em; }
.form__success p { max-width: 320px; color: var(--on-dark-muted); text-wrap: pretty; }
@keyframes successIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes successPop { from { opacity: 0; transform: scale(.4); } }

/* ---------- Блок 6. Контакты ---------- */
.contacts__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: stretch; }
.contacts__info { display: flex; flex-direction: column; container-type: inline-size; }
.contacts__phone {
  /* номер шириной ~8.4em — размер от ширины колонки, всегда в одну строку */
  font-size: min(68px, 11.5cqi); font-weight: 600; letter-spacing: -.04em; line-height: 1;
  white-space: nowrap;
  transition: color .3s;
}
.contacts__phone:hover { color: var(--accent); }
.contacts__mail {
  align-self: flex-start;
  margin-top: 16px;
  font-size: clamp(18px, 1.6vw, 22px); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 6px;
  transition: text-decoration-color .3s;
}
.contacts__mail:hover { text-decoration-color: var(--accent); }
.contacts__list { margin-top: clamp(32px, 5vw, 56px); }
.contacts__list > div {
  display: grid; grid-template-columns: 180px 1fr; gap: 16px;
  padding-block: 18px; border-top: 1px solid var(--line);
}
.contacts__list dt { font: 500 12px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.contacts__list dd { font-size: 18px; font-weight: 500; }
.contacts__list dd span { display: block; margin-top: 4px; font-size: 15px; font-weight: 400; color: var(--muted); }
.contacts__route {
  display: table; margin-top: 6px;
  font-size: 15px; font-weight: 500; color: var(--accent);
  text-decoration: underline; text-decoration-color: rgba(255, 90, 31, .35); text-underline-offset: 4px;
}
.contacts__route:hover { text-decoration-color: var(--accent); }
.contacts__legal {
  margin-top: auto; padding-top: 32px;
  font: 400 12px/1.6 var(--mono); color: var(--muted);
}

.contacts__map { position: relative; isolation: isolate; min-height: 420px; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
/* isolation: слои Leaflet (z-index 400+) не вылезают поверх шапки */
.contacts__map-canvas { position: absolute; inset: 0; z-index: 0; font-family: var(--font); background: var(--paper-2); }
.contacts__map-canvas .leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, .75); }
.contacts__map-canvas .leaflet-bar { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 20px -8px rgba(12, 14, 15, .35); }
.contacts__map-canvas .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; color: var(--ink); }
.map-pin span {
  display: block; width: 40px; height: 40px; border-radius: 50% 50% 50% 0;
  background: var(--accent); transform: rotate(-45deg);
  box-shadow: 0 8px 20px -6px rgba(255, 90, 31, .7);
}
.contacts__map-canvas .map-label {
  padding: 6px 10px; border: 0; border-radius: 8px;
  background: var(--ink); color: var(--paper);
  font: 600 13px/1.2 var(--font);
  box-shadow: 0 8px 20px -8px rgba(12, 14, 15, .5);
}
.contacts__map-canvas .map-label::before { border-top-color: var(--ink); }
.map-pin span::after { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--ink); }
.contacts__map iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  filter: grayscale(.35) contrast(1.02);
}

/* ---------- Блок 7. Подвал ---------- */
.footer {
  margin: 0 var(--inset) var(--inset);
  padding-block: clamp(32px, 4vw, 56px) 24px;
  border-radius: var(--radius-xl);
  background: var(--ink); color: var(--on-dark);
  overflow: hidden;
}
.footer .container { container-type: inline-size; }
.footer__top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-inline: auto; }
.footer__nav a { font-size: 15px; color: var(--on-dark-muted); transition: color .3s; }
.footer__nav a:hover { color: var(--on-dark); }
.footer__up {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-dark);
  transition: background-color .3s, color .3s, border-color .3s;
}
.footer__up:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.footer__word {
  margin-block: clamp(40px, 7vw, 104px) 0;
  padding-bottom: .1em;
  font-size: 19.4cqi; font-weight: 600; line-height: .8; letter-spacing: -.05em;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(244, 243, 239, .95) 10%, rgba(244, 243, 239, .06) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}
.footer__bottom {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--line-dark);
  font-size: 14px; color: var(--on-dark-muted);
}
.footer__bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom a:hover { color: var(--on-dark); }

/* ---------- Страница-документ (политика конфиденциальности) ---------- */
.doc-hero {
  margin: var(--inset);
  padding: 156px 0 clamp(48px, 7vw, 96px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(rgba(244, 243, 239, .045) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(244, 243, 239, .045) 1px, transparent 1px) 0 0 / 64px 64px,
    radial-gradient(40% 90% at 88% 0%, rgba(255, 90, 31, .16), transparent 70%),
    #0E1112;
  color: var(--on-dark);
}
.doc-hero .section-title { margin-top: 24px; }
.doc-hero__meta { margin-top: 24px; max-width: 560px; font-size: clamp(16px, 1.3vw, 19px); color: var(--on-dark-muted); text-wrap: pretty; }

.doc { padding-block: clamp(48px, 7vw, 104px) var(--section-y); }
.doc__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 7vw, 120px); align-items: start; }
.doc__toc { position: sticky; top: 112px; }
.doc__toc ol { margin-top: 16px; border-top: 1px solid var(--line); }
.doc__toc a {
  display: grid; grid-template-columns: 30px 1fr; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; line-height: 1.35; color: var(--muted);
  transition: color .3s;
}
.doc__toc a span { font: 500 12px/1 var(--mono); color: var(--accent); }
.doc__toc a:hover { color: var(--text); }

.doc__body { max-width: 760px; }
.doc__body section { scroll-margin-top: 104px; }
.doc__body section + section { margin-top: clamp(36px, 4vw, 52px); padding-top: clamp(36px, 4vw, 52px); border-top: 1px solid var(--line); }
.doc__body h2 {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 18px;
  font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.15; letter-spacing: -.025em;
}
.doc__body h2 span { flex: none; font: 500 13px/1 var(--mono); color: var(--accent); }
.doc__body p, .doc__body li { color: #2E3235; text-wrap: pretty; }
.doc__body p + p, .doc__body p + ul, .doc__body ul + p { margin-top: 14px; }
.doc__body ul { display: grid; gap: 10px; }
.doc__body li { position: relative; padding-left: 24px; }
.doc__body li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 10px; height: 2px; border-radius: 2px; background: var(--accent); }
.doc__body a { text-decoration: underline; text-decoration-color: rgba(255, 90, 31, .6); text-underline-offset: 3px; transition: color .3s; }
.doc__body a:hover { color: var(--accent); }
.doc__card { display: grid; gap: 0; padding: 8px 28px; border-radius: var(--radius); background: var(--white); }
.doc__card > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 0; }
.doc__card > div + div { border-top: 1px solid var(--line); }
.doc__card dt { color: var(--muted); }
.doc__card dd { font-weight: 500; }

/* ---------- Мобильная панель ---------- */
.dock {
  position: fixed; z-index: 30;
  left: var(--inset); right: var(--inset); bottom: calc(10px + env(safe-area-inset-bottom));
  display: none;
  transform: translateY(calc(100% + 24px));
  transition: transform .5s var(--ease);
}
.dock.is-visible { transform: none; }
.dock .btn { --h: 56px; width: 100%; font-size: 16px; box-shadow: 0 14px 30px -12px rgba(255, 90, 31, .6), 0 4px 14px rgba(12, 14, 15, .25); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1180px) {
  .nav a { padding: 8px 10px 8px 9px; gap: 6px; }
  .header__phone { display: none; }
  .terms__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .nav, .header__cta { display: none; }
  .burger { display: grid; flex: none; }
  .header__bar { gap: 12px; }
  .header__actions { gap: 12px; margin-left: auto; min-width: 0; }
  .header__phone { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .nav + .header__actions { margin-left: auto; }
  .header__phone { display: inline; font-size: 14px; }

  .section-head { grid-template-columns: 1fr; }
  .section-head .section-lead { justify-self: start; }

  .why__grid { grid-template-columns: 1fr 1fr; }
  .why-card--feature { grid-row: auto; grid-column: 1 / -1; min-height: 340px; }

  .catalog__grid { grid-template-columns: 1fr 1fr; }
  .catalog__grid .product:nth-child(3) { grid-column: 1 / -1; }
  .catalog__grid .product:nth-child(3) .product__media { aspect-ratio: 16 / 9; }
  .product--wide { grid-template-columns: 1fr 1fr; }
  .product--wide .product__media { min-height: 380px; }

  .request__grid { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
  .doc__grid { grid-template-columns: 1fr; }
  .doc__toc { display: none; } /* на узком экране документ читается подряд */
  .contacts__map { min-height: 340px; }

  /* Узкий экран: фото сверху и растворяется вниз в сетку */
  .hero__slide {
    left: 0; bottom: 42%; aspect-ratio: auto; max-height: none;
    --fade-y: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .8) 35%, rgba(0, 0, 0, .35) 70%, transparent 100%);
    -webkit-mask-image: var(--fade-y);
    mask-image: var(--fade-y);
  }
  .hero__slide.is-active { opacity: .6; } /* текст здесь во всю ширину, фото приглушаем */
  .hero__img { object-position: var(--pos-sm, var(--pos)); }
  .hero__inner { justify-content: flex-end; }

}

@media (max-width: 820px) {
  .dock { display: grid; }
  body { padding-bottom: 76px; }
}

@media (max-width: 640px) {
  :root { --inset: 6px; --radius-xl: 22px; }
  body { font-size: 16px; }
  .header { top: calc(var(--inset) + 8px); padding-inline: calc(var(--inset) + 8px); }
  .header__bar { height: 58px; padding: 0 8px 0 14px; }
  .logo__mark { height: 30px; }
  .logo__text { font-size: 17px; }
  .burger { width: 42px; height: 42px; }
  .header__phone { font-size: 13px; letter-spacing: -.02em; }
  .burger span { left: 12px; right: 12px; }
  .burger span:first-child { top: 17px; }
  .burger span:last-child { top: 24px; }
  .menu-open .burger span:first-child, .menu-open .burger span:last-child { top: 20.5px; }

  .hero { min-height: calc(100svh - 2 * var(--inset)); }
  .hero__inner { padding-top: 96px; gap: 24px; }
  .hero__title { font-size: clamp(34px, 10.4vw, 48px); letter-spacing: -.03em; }
  .hero__lead { margin-bottom: 18px; align-items: flex-start; }
  .hero__lead .dot { margin-top: .45em; }
  .hero__actions { margin-top: 24px; }
  .hero__actions .btn { width: 100%; justify-content: space-between; }
  .hero__call { display: none; }
  .hero__scroll { display: none; }
  .br-lg { display: none; }
  .hero__tab-label { display: none; }
  .hero__tab { grid-template-columns: 1fr; }

  .why__grid { grid-template-columns: 1fr; }
  .why-card { min-height: 220px; }
  .why-card--feature { min-height: 320px; }

  .catalog__grid { grid-template-columns: 1fr; }
  .catalog__grid .product:nth-child(3) { grid-column: auto; }
  .catalog__grid .product:nth-child(3) .product__media,
  .product--wide .product__media { aspect-ratio: 5 / 4; min-height: 0; }
  .product--wide { display: flex; }

  .terms__grid { grid-template-columns: 1fr; }
  .term__key, .term .tags { margin-bottom: 32px; }

  .contacts__list > div { grid-template-columns: 1fr; gap: 6px; }
  .doc-hero { padding-top: 116px; }
  .doc-hero .section-title { font-size: clamp(26px, 8.4vw, 40px); } /* «конфиденциальности» целиком в строку */
  .doc__card { padding: 4px 20px; }
  .doc__card > div { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }

  .footer__top { flex-direction: column; align-items: flex-start; }
  .footer__nav { margin-inline: 0; }
  .footer__up { position: absolute; right: calc(var(--pad) + 4px); }
  .footer__top { position: relative; }
}

@media (max-width: 380px) {
  .logo { gap: 10px; }
  .logo__text { font-size: 16px; }
  .header__phone { font-size: 12.5px; }
  .header__actions { gap: 8px; }
}

@media (max-width: 340px) {
  .header .logo__text { display: none; } /* остаётся значок, номер и меню */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .w > span, .js .hero__lead, .js .hero__actions, .js .hero__tabs { animation: none; opacity: 1; transform: none; }
  .js [data-reveal] { transform: none; transition: opacity .4s; }
  .hero__mouse i { animation: none; }
  .js .hero__scroll { animation: none; opacity: 1; }
}
