/* ALTOS - промышленный альпинизм, Бишкек */

:root {
  --night: #071428;
  --deep: #0D2347;
  --altos: #1E6BFF;
  --altos-hover: #3D80FF;
  --glass: #8FC2FF;
  --white: #F4F8FF;
  --steel: #8A9BB8;

  --line: rgba(143, 194, 255, .16);
  --line-mid: rgba(143, 194, 255, .28);
  --line-strong: rgba(143, 194, 255, .5);

  --f-head: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-22: 22px;
  --fs-30: 30px;
  --fs-44: 44px;
  --fs-68: 68px;

  /* поля: слева место под верёвку и альпиниста */
  --gl: 48px;
  --gr: 20px;
  --maxw: 1200px;
  --head: 56px;
  --r: 3px;
  /* шаг импостов: уточняется в app.js по реальной ширине колонки */
  --cols: 3;
  --grid-x: var(--gl);
  --cw: calc((min(100vw, var(--maxw) + var(--gl) + var(--gr)) - var(--gl) - var(--gr)) / var(--cols));

  color-scheme: dark;
}

@media (min-width: 768px) {
  :root { --gl: 88px; --gr: 40px; --head: 64px; --cols: 6; }
}
@media (min-width: 1100px) {
  :root { --gl: 96px; --gr: 64px; --cols: 8; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--white);
  font-family: var(--f-text);
  font-size: var(--fs-16);
  line-height: 1.55;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.vh, .m-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .m-vh { position: static !important; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; }
}

:focus-visible {
  outline: 2px solid var(--glass);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: fixed;
  left: 12px; top: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--white);
  color: var(--night);
  font-weight: 600;
  border-radius: var(--r);
  transform: translateY(-300%);
  opacity: 0;
}
.skip:focus { transform: none; opacity: 1; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gl) + var(--gr));
  margin: 0 auto;
  padding-left: var(--gl);
  padding-right: var(--gr);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--r);
  font: 600 var(--fs-16)/1.2 var(--f-text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s, border-color .18s, color .18s;
}
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn--sm { min-height: 44px; padding: 10px 14px; font-size: var(--fs-14); gap: 8px; }
.btn--sm .ico { width: 18px; height: 18px; }
.btn--lg { min-height: 56px; padding: 14px 24px; font-size: var(--fs-16); }
.btn--primary { background: var(--altos); color: #fff; }
.btn--primary:hover { background: var(--altos-hover); }
.btn--primary:active { background: #1A5EE0; }
.btn--ghost { color: var(--white); border-color: var(--line-strong); background: rgba(7, 20, 40, .35); }
.btn--ghost:hover { border-color: var(--glass); background: rgba(143, 194, 255, .1); }

/* ---------- Шапка ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--head);
  background: rgba(7, 20, 40, .72);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.header__in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  min-height: 44px;
  align-self: center;
  padding-top: 11px;
  font: 800 22px/1 var(--f-head);
  letter-spacing: -.01em;
  color: var(--white);
  text-decoration: none;
}
.logo__a {
  height: .75em;
  height: 1cap;
  width: auto;
  aspect-ratio: 104 / 100;
  margin-right: .05em;
  color: var(--white);
}
.logo sup {
  font: 500 10px/1 var(--f-text);
  margin-left: 3px;
  transform: translateY(-.9em);
  color: var(--steel);
}
.nav { display: none; }
@media (min-width: 1100px) {
  .nav { display: flex; gap: 4px; margin-left: auto; }
  .nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    color: var(--steel);
    text-decoration: none;
    font-size: var(--fs-14);
    font-weight: 500;
    transition: color .15s;
  }
  .nav a:hover { color: var(--white); }
}
@media (min-width: 768px) {
  .logo { font-size: 26px; }
  .btn--sm { padding: 10px 18px; }
}

/* ---------- Хиро ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--deep);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* фолбэк без WebGL и при reduced-motion: стеклянный навесной фасад на CSS */
  background:
    linear-gradient(118deg, transparent 0 46%, rgba(244, 248, 255, .07) 46% 47.2%, transparent 47.2% 49%, rgba(244, 248, 255, .07) 49% 50.2%, transparent 50.2% 52%, rgba(244, 248, 255, .07) 52% 53.2%, transparent 53.2%),
    repeating-linear-gradient(90deg, rgba(190, 215, 245, .5) 0 2px, transparent 2px var(--cw)),
    repeating-linear-gradient(0deg, rgba(190, 215, 245, .42) 0 2px, transparent 2px calc(var(--cw) * .5), rgba(190, 215, 245, .3) calc(var(--cw) * .5) calc(var(--cw) * .5 + 2px), rgba(10, 30, 66, .55) calc(var(--cw) * .5 + 2px) calc(var(--cw) * .82), transparent calc(var(--cw) * .82) calc(var(--cw) * 1.82)),
    radial-gradient(120% 70% at 70% 20%, rgba(143, 194, 255, .55), transparent 60%),
    linear-gradient(180deg, #2C73E8 0%, #164AA8 38%, #0D2347 72%, #071428 100%);
  background-position: var(--grid-x) 0, var(--grid-x) 0, 0 100%, 0 0, 0 0;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity .9s ease;
}
.hero__canvas.is-ready { opacity: 1; }
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 20, 40, .55) 0%, rgba(7, 20, 40, 0) 22%),
    linear-gradient(0deg, rgba(7, 20, 40, .96) 0%, rgba(7, 20, 40, .82) 34%, rgba(7, 20, 40, .2) 66%, rgba(7, 20, 40, 0) 80%);
}
@media (min-width: 1100px) {
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(7, 20, 40, .5) 0%, rgba(7, 20, 40, 0) 20%),
      linear-gradient(0deg, rgba(7, 20, 40, .94) 0%, rgba(7, 20, 40, .78) 26%, rgba(7, 20, 40, .2) 52%, rgba(7, 20, 40, 0) 66%);
  }
}

.hero__content {
  position: relative;
  padding-top: calc(var(--head) + 40px);
  padding-bottom: 32px;
}

/* Логотип с альпинистами: целиком в первом экране, верёвки уходят вверх за край */
.hero__logo {
  position: relative;
  width: min(100%, var(--logo-max, 100%));
  margin-bottom: 36px;
  pointer-events: none;
  user-select: none;
}
.mark3d {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.m-hang {
  transform-box: view-box;
  animation: m-sway 6.4s ease-in-out infinite alternate;
}
@keyframes m-sway {
  from { transform: rotate(-.13deg); }
  to { transform: rotate(.13deg); }
}
.hero.is-off .m-hang { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .m-hang { animation: none; }
}
.m-rope { fill: none; stroke: #E3EDFB; stroke-width: 1.6px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-rope-h { fill: none; stroke: #071428; stroke-width: 4px; stroke-linejoin: round; opacity: .75; vector-effect: non-scaling-stroke; }
.m-reg circle, .m-reg path { fill: none; stroke: #C3D7F3; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* детали фигурок: простые селекторы, чтобы стили доходили внутрь <use> */
.k-suit { fill: none; stroke: #F4F8FF; stroke-linecap: round; stroke-linejoin: round; }
.k-far { fill: none; stroke: #BFD0EA; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.k-boot, .k-glove, .k-bucket, .k-lamp, .k-roll { fill: #1E6BFF; }
.k-strap { fill: none; stroke: #1E6BFF; stroke-width: 2.8; stroke-linecap: round; }
.k-dev { fill: #8FC2FF; stroke: #071428; stroke-width: 1; }
.k-line { fill: none; stroke: #8A9BB8; stroke-width: 1.3; }
.k-handle { fill: none; stroke: #F4F8FF; stroke-width: 1.5; }
.k-rim { fill: none; stroke: #F4F8FF; stroke-width: 2.2; stroke-linecap: round; }
.k-face { fill: #CFE0F7; }
.k-helmet { fill: #F4F8FF; }
.k-brim { fill: none; stroke: #F4F8FF; stroke-width: 2.6; stroke-linecap: round; }
.k-steel { fill: none; stroke: #8A9BB8; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.k-shine { fill: none; stroke: rgba(244, 248, 255, .6); stroke-width: 1; stroke-linecap: round; }
.k-tube { fill: none; stroke: #8FC2FF; stroke-width: 5.6; stroke-linecap: round; }
.k-nozzle { fill: none; stroke: #1E6BFF; stroke-width: 2.4; stroke-linecap: round; }
.k-tail { fill: none; stroke: #DCE8F8; stroke-width: 1.5; stroke-linecap: round; opacity: .75; }

.hero__title {
  font: 800 clamp(26px, 7.6vw, 56px)/1.08 var(--f-head);
  letter-spacing: -.02em;
  max-width: 11.5em;
  text-wrap: balance;
}
.hero__lead {
  margin-top: 18px;
  max-width: 36ch;
  font-size: var(--fs-18);
  line-height: 1.5;
  color: #DCE7F7;
}
.hero__actions {
  margin-top: 26px;
  display: grid;
  gap: 10px;
}
.hero__free {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid var(--altos);
  font-size: var(--fs-16);
  line-height: 1.35;
  font-weight: 500;
  color: var(--white);
}
.hero__free strong { color: var(--glass); font-weight: 700; }
.hero__free + .hero__contact { margin-top: 10px; }
.hero__contact {
  margin-top: 4px;
  font-size: var(--fs-14);
  color: var(--steel);
}
.hero__contact a {
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
  font-variant-numeric: tabular-nums;
}
.hero__contact a:hover { color: var(--glass); }

@media (min-width: 600px) {
  .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
}
@media (min-width: 768px) {
  .hero__lead { font-size: var(--fs-22); }
  .hero__content { padding-top: calc(var(--head) + 56px); padding-bottom: 48px; }
  .hero__logo { margin-bottom: 48px; }
}
@media (min-width: 1100px) {
  .hero { min-height: max(680px, 100vh); }
  .hero__content { padding-bottom: 56px; }
  /* логотип не выше, чем позволяет высота окна: первый экран целиком */
  .hero__logo { --logo-max: max(620px, calc((100vh - 470px) * 4.9)); margin-bottom: 52px; }
  .hero__text {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: end;
  }
  .hero__title { grid-column: 1 / span 5; padding-right: 32px; }
  .hero__side { grid-column: 6 / -1; }
  .hero__lead { margin-top: 0; font-size: var(--fs-18); }
  .hero__actions { margin-top: 22px; }
}

/* ---------- Секции ---------- */
.section { padding: 88px 0; position: relative; }
@media (min-width: 768px) { .section { padding: 128px 0; } }

.h2 {
  font: 700 26px/1.16 var(--f-head);
  letter-spacing: -.015em;
  max-width: 16em;
  text-wrap: balance;
}
@media (max-width: 359px) { .h2 { font-size: 23px; } }
@media (min-width: 480px) { .h2 { font-size: var(--fs-30); } }
@media (min-width: 768px) { .h2 { font-size: var(--fs-44); } }

/* ---------- Услуги: этажи фасада ---------- */
.services {
  /* импосты продолжают сетку фасада из хиро */
  background-image: repeating-linear-gradient(90deg, rgba(143, 194, 255, .055) 0 1px, transparent 1px var(--cw));
  background-position: var(--grid-x) 0;
}
.floors { margin-top: 40px; border-bottom: 1px solid var(--line-mid); }
.floor {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 40px;
  column-gap: 16px;
  row-gap: 8px;
  padding: 22px 0 24px;
  border-top: 1px solid var(--line-mid);
  isolation: isolate;
  transition: border-color .25s;
}
.floor::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(var(--gr) * -1) 0 calc(var(--gl) * -1 + 34px);
  background:
    linear-gradient(112deg, transparent 0 38%, rgba(244, 248, 255, .07) 38% 41%, transparent 41% 44%, rgba(244, 248, 255, .05) 44% 46%, transparent 46%),
    linear-gradient(90deg, rgba(30, 107, 255, .2), rgba(143, 194, 255, .08) 70%, rgba(143, 194, 255, .02));
  background-size: 260% 100%, 100% 100%;
  background-position: 100% 0, 0 0;
  opacity: 0;
  transition: opacity .3s ease, background-position .9s cubic-bezier(.2, .7, .2, 1);
}
.floor:hover::before, .floor:active::before { opacity: 1; background-position: 0 0, 0 0; }
.floor:hover, .floor:active { border-top-color: var(--glass); }
.floor:hover + .floor, .floor:active + .floor { border-top-color: var(--line-strong); }
.floor__name {
  grid-column: 1;
  font: 600 var(--fs-22)/1.2 var(--f-head);
  letter-spacing: -.01em;
  text-wrap: balance;
}
.floor__text {
  grid-column: 1 / -1;
  color: var(--steel);
  max-width: 52ch;
  transition: color .25s;
}
.floor:hover .floor__text, .floor:active .floor__text { color: #C9D7EC; }
.floor__ico {
  grid-column: 2;
  grid-row: 1;
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--glass);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .7;
  transition: opacity .25s, stroke .25s;
}
.floor:hover .floor__ico, .floor:active .floor__ico { opacity: 1; stroke: var(--white); }

@media (min-width: 768px) {
  .floors { margin-top: 56px; }
  .floor {
    grid-template-columns: repeat(var(--cols), 1fr);
    column-gap: 0;
    align-items: start;
    padding: 30px 0 32px;
  }
  .floor::before { inset: 0 calc(var(--gr) * -1) 0 -40px; }
  .floor__name { grid-column: 1 / span 3; padding-right: 32px; font-size: var(--fs-30); }
  .floor__text { grid-column: 4 / span 2; grid-row: 1; font-size: var(--fs-18); padding-top: 4px; }
  .floor__ico { grid-column: -2 / -1; grid-row: 1; justify-self: end; width: 48px; height: 48px; }
}
@media (min-width: 1100px) {
  .floor { padding: 34px 0 36px; }
  .floor__name { grid-column: 1 / span 4; }
  .floor__text { grid-column: 5 / span 3; }
}

/* ---------- Наши работы: остекление с импостами ---------- */
.works__lead { margin-top: 16px; color: var(--steel); max-width: 44ch; font-size: var(--fs-16); }
.works__grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  /* зазоры сетки - импосты */
  background: var(--line-mid);
  border: 1px solid var(--line-mid);
}
.work { background: var(--night); }
.work__fig { height: 100%; display: flex; flex-direction: column; }
.work__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* блик общий на всё остекление: идёт через импосты, а не повторяется в каждом окне */
  background:
    linear-gradient(118deg, transparent 0 40%, rgba(244, 248, 255, .055) 40% 45%, transparent 45% 48%, rgba(244, 248, 255, .035) 48% 50%, transparent 50%) fixed,
    linear-gradient(165deg, rgba(30, 107, 255, .16), rgba(13, 35, 71, .55) 70%);
}
.work:nth-child(3n+2) .work__media { background-color: rgba(30, 107, 255, .03); }
.work__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work__ph {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--glass);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .42;
}
.work__fig:has(img) .work__ph, .work__fig:has(img) .work__soon { display: none; }
.work__cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 10px;
  padding: 12px 12px 14px;
  border-top: 1px solid var(--line);
}
.work__name { font-weight: 600; font-size: var(--fs-14); line-height: 1.3; }
.work__soon { color: var(--steel); font-size: var(--fs-14); line-height: 1.3; }
.works__more { margin-top: 28px; max-width: 100%; white-space: normal; text-align: left; line-height: 1.3; }
@media (max-width: 359px) {
  .works__grid { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  .works__lead { font-size: var(--fs-18); }
  .works__grid { margin-top: 48px; grid-template-columns: repeat(3, 1fr); }
  .work__ph { width: 64px; height: 64px; }
  .work__cap { padding: 18px 22px 20px; column-gap: 14px; }
  .work__name { font-size: var(--fs-18); }
  .work__soon { font-size: var(--fs-16); }
  .works__more { margin-top: 40px; }
}

/* ---------- Сравнение ---------- */
.why { background: var(--deep); }
.why::before {
  /* ригель сверху и снизу секции, как плита перекрытия */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(143, 194, 255, .06) 0 1px, transparent 1px var(--cw));
  background-position: var(--grid-x) 0;
}
.compare {
  position: relative;
  margin-top: 40px;
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.compare thead { display: none; }
.compare tbody, .compare tr, .compare th, .compare td { display: block; }
.compare tr { padding: 22px 0 6px; border-top: 1px solid var(--line-mid); }
.compare tr:last-child { border-bottom: 1px solid var(--line-mid); }
.compare tbody th {
  font: 600 var(--fs-18)/1.25 var(--f-head);
  margin-bottom: 12px;
}
.compare td {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 10px 0;
  color: var(--steel);
  border-top: 1px solid var(--line);
}
.compare td::before {
  content: attr(data-label);
  color: var(--steel);
  font-size: var(--fs-14);
  padding-top: 1px;
}
.compare td.is-us {
  margin: 4px 0 12px;
  padding: 14px 14px 14px 12px;
  color: var(--white);
  font-weight: 500;
  border: 0;
  border-left: 2px solid var(--altos);
  background: linear-gradient(100deg, rgba(30, 107, 255, .3), rgba(143, 194, 255, .1));
  border-radius: 0 var(--r) var(--r) 0;
  grid-template-columns: 82px 1fr; /* значения в одну линию с соседними строками */
}
.compare td.is-us::before { color: var(--glass); font-weight: 600; }

@media (min-width: 768px) {
  .compare { margin-top: 56px; table-layout: fixed; }
  .compare thead { display: table-header-group; }
  .compare tbody { display: table-row-group; }
  .compare tr { display: table-row; padding: 0; border: 0; }
  .compare tr:last-child { border: 0; }
  .compare th, .compare td { display: table-cell; vertical-align: top; }
  .compare thead th, .compare thead td { vertical-align: bottom; }
  .compare thead th, .compare thead td {
    padding: 0 24px 18px 0;
    font: 600 var(--fs-16)/1.3 var(--f-text);
    color: var(--steel);
    border-bottom: 1px solid var(--line-strong);
  }
  .compare thead th.is-us {
    color: var(--white);
    font: 700 var(--fs-18)/1.2 var(--f-head);
    padding: 22px 24px 18px;
    background: linear-gradient(180deg, rgba(30, 107, 255, .42), rgba(30, 107, 255, .22));
    border-top: 2px solid var(--altos);
  }
  .compare tbody th {
    margin: 0;
    padding: 28px 24px 28px 0;
    font-size: var(--fs-18);
    border-bottom: 1px solid var(--line-mid);
  }
  .compare td {
    padding: 28px 24px 28px 0;
    font-size: var(--fs-18);
    line-height: 1.45;
    border-top: 0;
    border-bottom: 1px solid var(--line-mid);
  }
  .compare td::before { display: none; }
  .compare td.is-us {
    margin: 0;
    padding: 28px 24px;
    border-left: 0;
    border-radius: 0;
    background: rgba(30, 107, 255, .22);
    border-bottom: 1px solid rgba(143, 194, 255, .3);
  }
  .compare tr:last-child td.is-us { background: linear-gradient(180deg, rgba(30, 107, 255, .22), rgba(30, 107, 255, .12)); }
}
@media (min-width: 1100px) {
  .compare col { width: 25%; }
}

/* ---------- Как проходит заказ ---------- */
.steps {
  counter-reset: step;
  margin-top: 40px;
}
.step {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  padding: 20px 0 22px;
  border-top: 1px solid var(--line-mid);
  font-size: var(--fs-18);
  line-height: 1.45;
}
.step:first-child { border-top: 0; padding-top: 4px; }
.step { border-top: 0; padding: 4px 0 34px; }
.step:not(:last-child)::after {
  /* шаги связаны отрезком верёвки: это последовательность */
  content: "";
  position: absolute;
  left: 9px;
  top: 46px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--altos), rgba(30, 107, 255, .25));
}
.step::before {
  content: counter(step);
  font: 700 var(--fs-30)/1 var(--f-head);
  color: var(--glass);
}
.step a {
  color: var(--glass);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  padding: 11px 0;
  margin: -11px 0;
}
.step a:hover { color: var(--white); }
.step strong { color: var(--glass); font-weight: 600; }

@media (min-width: 768px) {
  .steps {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
  }
  .step {
    display: block;
    padding: 24px 28px 0 0;
    border-top: 2px solid var(--line-strong);
    font-size: var(--fs-18);
  }
  /* ступени спускаются: каждый шаг ниже предыдущего, как спуск по фасаду */
  .step:nth-child(2) { margin-top: 48px; }
  .step:nth-child(3) { margin-top: 96px; }
  .step:nth-child(4) { margin-top: 144px; border-top-color: var(--altos); }
  .step:not(:last-child)::after { display: none; }
  .step:first-child { padding-top: 24px; border-top: 2px solid var(--line-strong); }
  .step::before {
    display: block;
    margin-bottom: 24px;
    font-size: var(--fs-44);
  }
  .step:nth-child(4)::before { color: var(--white); }
}
@media (min-width: 1100px) {
  .step::before { font-size: var(--fs-68); }
  .step { font-size: var(--fs-22); padding-right: 40px; }
}

/* ---------- Безопасность ---------- */
.safety { padding-top: 24px; }
.values {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line-mid);
}
.value {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 16px;
  row-gap: 6px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.value__ico {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--glass);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.value__name { font: 600 var(--fs-18)/1.3 var(--f-head); }
.value p { color: var(--steel); }

@media (min-width: 768px) {
  .values { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
  .value { align-content: start; }
  .value {
    grid-template-columns: 1fr;
    padding: 32px 32px 36px 0;
  }
  .value:nth-child(2n) { padding-left: 32px; border-left: 1px solid var(--line); }
  .value__ico { grid-row: auto; width: 48px; height: 48px; margin-bottom: 18px; }
  .value__name { font-size: var(--fs-22); margin-bottom: 6px; }
  .value p { font-size: var(--fs-18); max-width: 30ch; }
}
@media (min-width: 1100px) {
  .values { grid-template-columns: repeat(4, 1fr); }
  .value { padding: 36px 28px 40px; border-left: 1px solid var(--line); }
  .value:first-child { padding-left: 0; border-left: 0; }
  .value:nth-child(2n) { padding-left: 28px; }
}

/* ---------- FAQ ---------- */
.faq { padding-top: 40px; }
.faq__list { margin-top: 32px; border-top: 1px solid var(--line-mid); }
.qa { border-bottom: 1px solid var(--line-mid); }
.qa summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 16px 0;
  font: 500 var(--fs-18)/1.35 var(--f-text);
  cursor: pointer;
  list-style: none;
  transition: color .15s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--glass); }
.qa__sign {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}
.qa__sign::before, .qa__sign::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.qa__sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa[open] .qa__sign::after { transform: translate(-50%, -50%) rotate(0deg); }
.qa__body { overflow: hidden; }
.qa__body p {
  padding: 0 40px 24px 0;
  color: #C1CEE2;
  max-width: 62ch;
}
.qa__body a { color: var(--glass); text-underline-offset: 3px; white-space: nowrap; display: inline-block; padding: 11px 0; margin: -11px 0; }

@media (min-width: 1100px) {
  .faq__in {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: start;
  }
  .faq .h2 { grid-column: 1 / span 3; position: sticky; top: calc(var(--head) + 40px); padding-right: 32px; }
  .faq__list { grid-column: 4 / -1; margin-top: 0; }
  .qa summary { font-size: var(--fs-22); min-height: 80px; }
  .qa__body p { font-size: var(--fs-18); }
}

/* ---------- Контакты: земля, 0 м ---------- */
.contacts {
  position: relative;
  padding: 64px 0 0;
  background:
    linear-gradient(180deg, var(--night) 0%, var(--deep) 100%);
}
.contacts__in { padding-bottom: 56px; }
.contacts__title { max-width: 14em; }
.contacts__main { margin-top: 36px; }
.contacts__phone {
  display: inline-block;
  font: 700 clamp(24px, 7.1vw, 68px)/1.1 var(--f-head);
  letter-spacing: -.02em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 0;
  font-variant-numeric: tabular-nums;
  transition: color .15s;
}
.contacts__phone:hover { color: var(--glass); }
.contacts__who { margin-top: 6px; color: var(--steel); font-size: var(--fs-16); }
.contacts__actions {
  margin-top: 32px;
  display: grid;
  gap: 10px;
}
.contacts__actions .btn--ghost { font-weight: 500; }

.ground {
  position: relative;
  height: 40px;
  border-top: 2px solid var(--glass);
  /* штриховка грунта, как на строительном чертеже */
  background:
    repeating-linear-gradient(135deg, rgba(143, 194, 255, .38) 0 1.5px, transparent 1.5px 10px);
  -webkit-mask: linear-gradient(180deg, #000 0%, transparent 100%);
  mask: linear-gradient(180deg, #000 0%, transparent 100%);
}

@media (min-width: 600px) {
  .contacts__actions { display: flex; flex-wrap: wrap; gap: 12px; }
}
@media (min-width: 768px) {
  .contacts { padding-top: 112px; }
  .contacts__in { padding-bottom: 88px; }
  .contacts__main { margin-top: 56px; }
  .contacts__who { font-size: var(--fs-18); }
}
@media (min-width: 1100px) {
  .contacts__in {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: end;
  }
  .contacts__title { grid-column: 1 / -1; }
  .contacts__main { grid-column: 1 / span 5; }
  .contacts__actions { grid-column: 6 / -1; justify-content: flex-end; margin-top: 0; padding-bottom: 34px; }
}

/* ---------- Подвал ---------- */
.footer {
  background: var(--night);
  padding: 20px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: var(--fs-14);
  color: var(--steel);
}
.footer__in { display: grid; gap: 2px; }
.footer__brand { font: 700 var(--fs-14)/1.6 var(--f-head); color: var(--white); }
.footer__year { margin-top: 10px; }

/* ---------- Липкая кнопка (мобильный) ---------- */
.sticky-cta {
  position: fixed;
  z-index: 55;
  left: var(--gl);
  right: var(--gr);
  bottom: calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 10px 30px rgba(3, 9, 20, .55);
  transform: translateY(140%);
  visibility: hidden;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s;
}
.sticky-cta.is-on {
  transform: none;
  visibility: visible;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s;
}
@media (min-width: 768px) { .sticky-cta { display: none; } }

/* ---------- Спуск: верёвка, альпинист, высота ---------- */
.descent {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: hidden;
}
.descent[hidden] { display: none; }
.descent__rope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.descent__line {
  fill: none;
  stroke: var(--altos);
  stroke-width: 2;
  stroke-linecap: round;
}
.descent__line--tail { stroke: var(--glass); stroke-opacity: .45; stroke-width: 1.5; }
.descent__anchor { fill: none; stroke: var(--glass); stroke-width: 1.5; }
.descent__climber {
  position: absolute;
  left: 0; top: 0;
  width: 40px;
  height: 56px;
  will-change: transform;
}
.climber {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform-origin: 60% 55%;
  transition: opacity .3s ease;
}
.climber--stand { opacity: 0; }
.descent.is-landed .climber--hang { opacity: 0; }
.descent.is-landed .climber--stand { opacity: 1; }
.climber .c-body { fill: none; stroke: var(--white); stroke-linecap: round; stroke-linejoin: round; }
.climber .c-head { fill: var(--glass); }
.climber .c-helmet { fill: var(--white); }
.climber .c-blue { fill: var(--altos); }
.climber .c-harness { fill: none; stroke: var(--altos); stroke-width: 2; stroke-linecap: round; }
.climber .c-thin { fill: none; stroke: var(--steel); stroke-width: 1; }
.climber .c-rope { stroke: none; fill: none; }
.descent__alt {
  position: absolute;
  left: 0; top: 0;
  font: 600 13px/1 var(--f-text);
  font-variant-numeric: tabular-nums;
  color: var(--white);
  white-space: nowrap;
  padding: 4px 4px 3px;
  background: rgba(7, 20, 40, .86);
  border: 1px solid var(--line);
  border-radius: 2px;
  will-change: transform;
}
@media (min-width: 768px) {
  .descent__climber { width: 44px; height: 62px; }
  .descent__alt { font-size: 14px; }
}
