@import url("fonts.css");
:root {
  --ink: #0f1113;
  --ink-2: #181b1e;
  --steel: #8b949b;
  --steel-2: #3a4046;
  --paper: #ebe8e1;
  --paper-ink: #17191b;
  --arc: #ff5a1f;
  --arc-hot: #fff3d6;
  --head: "Sofia Sans Extra Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Sofia Sans", "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { background: var(--ink); color: #f1efea; font: 400 17px/1.5 var(--body); -webkit-tap-highlight-color: transparent; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2 { font-family: var(--head); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; line-height: .94; }

.eyebrow { font: 500 12.5px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--steel); }
.lead { color: #c9cdd0; max-width: 34em; }
.accent { color: var(--arc); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  background: var(--arc); color: #120a06; font: 600 16px/1 var(--body); border: 1px solid var(--arc); border-radius: 2px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .1s ease; touch-action: manipulation; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--ghost { background: transparent; color: #f1efea; border-color: var(--steel-2); }
@media (hover: hover) {
  .btn:hover { background: var(--arc-hot); border-color: var(--arc-hot); color: #120a06; }
  .btn--ghost:hover { background: transparent; color: #f1efea; border-color: var(--arc); }
}
:focus-visible { outline: 2px solid var(--arc); outline-offset: 3px; }

/* Шапка */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px; pointer-events: none;
}
.top > * { pointer-events: auto; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 24px/1 var(--head); text-transform: uppercase; letter-spacing: .02em; }
.logo { transition: color .2s ease; }
.top--light .logo { color: var(--paper-ink); }
.top--light .top__cta { color: var(--paper-ink); border-color: var(--paper-ink); background: transparent; }
.logo svg { width: 28px; height: 28px; fill: none; stroke-width: 3; }
.logo circle { stroke: var(--steel); }
.logo path { stroke: var(--arc); stroke-linecap: round; }
.top__cta { min-height: 42px; padding: 0 18px; font-size: 15px; backdrop-filter: blur(8px); background: rgba(15, 17, 19, .55); }

/* Первый экран */
.hero-track { position: relative; height: 200vh; height: 200svh; }
.hero { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: radial-gradient(90% 80% at 76% 50%, #1b1f23 0%, var(--ink) 66%); }

.ring { position: absolute; top: 50%; right: -2vw; width: min(112vh, 60vw); aspect-ratio: 1; transform: translateY(-50%); }
.ring svg, .sparks { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sparks { pointer-events: none; overflow: visible; }

.ring__scale { fill: none; stroke: #2a2f34; stroke-width: 1.5; }
.ring__wall { fill: #24282c; stroke: #3d444a; stroke-width: 2; }
.ring__bore { stroke: #454c52; stroke-width: 2; }
.ring__axis { stroke: #2d3237; stroke-width: 1.5; stroke-dasharray: 26 8 4 8; fill: none; }
.ring__groove { fill: none; stroke: #101214; stroke-width: 24; }
.ring__seam { fill: none; stroke: #6d757c; stroke-width: 24; }
.ring__ripple { fill: none; stroke: #a7afb5; stroke-width: 24; stroke-dasharray: 3 7; opacity: .75; }
.ring__hot { fill: none; stroke-width: 24; }
.ring__hot--3 { stroke: #8f2410; }
.ring__hot--2 { stroke: var(--arc); }
.ring__hot--1 { stroke: var(--arc-hot); }
.tick { stroke: #3a4046; stroke-width: 1.5; }
.tick--major { stroke: #6a7279; stroke-width: 2; }

.hero__text { position: absolute; left: var(--gutter); bottom: clamp(84px, 13vh, 132px); width: min(46vw, 640px); z-index: 2; }
.hero__text .eyebrow { margin-bottom: 18px; }
h1 { font-size: clamp(50px, min(7.6vw, 13.5vh), 124px); margin-bottom: 20px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.readout {
  position: absolute; right: var(--gutter); bottom: clamp(28px, 4vh, 44px); left: var(--gutter); z-index: 2;
  display: flex; gap: clamp(24px, 4vw, 56px); justify-content: flex-end; font-family: var(--mono);
}
.readout dt { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.readout dd { margin: 2px 0 0; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Диаметры */
.scale {
  position: relative; background: var(--paper); color: var(--paper-ink); padding: clamp(64px, 11vh, 120px) var(--gutter) clamp(56px, 9vh, 96px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px clamp(32px, 6vw, 96px); align-items: center;
}
.scale .eyebrow { color: #59616a; margin-bottom: 14px; }
.scale__head { grid-column: 1; align-self: end; }
.scale h2 { font-size: clamp(42px, 5.6vw, 88px); }
.scale__stage { grid-column: 2; grid-row: 1 / span 2; position: relative; }
.scale__stage svg { display: block; width: 100%; height: auto; }
.scale__control { grid-column: 1; align-self: start; }
.scale__control label { display: block; font-weight: 600; margin-bottom: 8px; }

.stage__ground { stroke: var(--paper-ink); stroke-width: 6; }
.stage__person { fill: #5d656c; }
.stage__label { font: 500 56px var(--mono); fill: #59616a; text-anchor: middle; }
.stage__pipe { fill: var(--paper-ink); }
.stage__pipe-in { fill: #2b3035; }

.scale__value { position: absolute; top: 0; right: 0; font: 800 clamp(64px, 9vw, 128px)/.9 var(--head); font-variant-numeric: tabular-nums; color: var(--arc); pointer-events: none; }
.scale__value small { font: 500 16px var(--mono); margin-left: 6px; color: #59616a; }

.scale__control input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; touch-action: pan-y; cursor: pointer; }
.scale__control input::-webkit-slider-runnable-track { height: 4px; background: var(--paper-ink); }
.scale__control input::-moz-range-track { height: 4px; background: var(--paper-ink); }
.scale__control input::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; margin-top: -15px; border-radius: 50%; background: var(--arc); border: 8px solid var(--paper-ink); }
.scale__control input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--arc); border: 8px solid var(--paper-ink); }
.scale__ticks { display: flex; justify-content: space-between; font: 400 11.5px var(--mono); color: #59616a; font-variant-numeric: tabular-nums; }
.scale__note { margin-top: 16px; font-size: 19px; font-weight: 500; min-height: 1.5em; }

/* Общие блоки */
.top__nav { display: flex; gap: clamp(16px, 2.4vw, 32px); font: 500 15px var(--body); margin-left: clamp(24px, 4vw, 56px); }
.top__nav a { transition: color .2s ease; }
@media (hover: hover) { .top__nav a:hover { color: var(--arc); } }
.top--light .top__nav { color: var(--paper-ink); }

.services, .objects, .naks, .process, .geo, .faq, .kp { padding: clamp(64px, 12vh, 120px) var(--gutter); }
.is-light { background: var(--paper); color: var(--paper-ink); }
.is-light .eyebrow { color: #59616a; }
.is-light .lead { color: #41474d; }
.section-head { max-width: 860px; margin-bottom: clamp(32px, 6vh, 64px); }
.section-head h2 { font-size: clamp(42px, 5.6vw, 88px); margin: 14px 0 18px; }
h3 { font: 600 22px/1.2 var(--body); }

.anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1); }
.anim .reveal.in { opacity: 1; transform: none; }

.top__phone { margin-left: auto; margin-right: 20px; font: 500 15px var(--mono); white-space: nowrap; }
.top--light .top__phone { color: var(--paper-ink); }
.link { color: var(--arc); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Огонь */
.fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 40; pointer-events: none; }
.hero > .sparks { z-index: 1; }
.arc-flash { position: absolute; top: 0; left: 0; width: 80vmin; height: 80vmin; z-index: 1; opacity: 0; pointer-events: none; border-radius: 50%; mix-blend-mode: screen; background: radial-gradient(circle, rgba(255, 236, 200, .85) 0%, rgba(255, 150, 70, .4) 22%, rgba(255, 90, 31, .12) 48%, transparent 70%); will-change: opacity, transform; }
.kp { position: relative; }
.kp-seam, .kp-tip { position: absolute; top: 0; left: 0; pointer-events: none; }
.kp-seam { width: 100%; height: 3px; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #5e656c, #8b949b 70%, var(--arc) 96%, var(--arc-hot)); box-shadow: 0 0 10px rgba(255, 90, 31, .55); }
.kp-tip { width: 14px; height: 14px; margin: -6px 0 0 -7px; border-radius: 50%; background: var(--arc-hot); box-shadow: 0 0 14px 5px var(--arc), 0 0 40px 16px rgba(255, 90, 31, .45); opacity: 0; }

.seambar { position: fixed; inset: 0 0 auto; height: 3px; z-index: 41; pointer-events: none; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #5e656c 0%, #8b949b 70%, var(--arc) 96%, var(--arc-hot) 100%); box-shadow: 0 0 10px rgba(255, 90, 31, .55); }
.seamtip { position: fixed; top: -5px; left: -6px; width: 12px; height: 12px; z-index: 41; pointer-events: none; border-radius: 50%; background: var(--arc-hot); box-shadow: 0 0 12px 4px var(--arc), 0 0 28px 10px rgba(255, 90, 31, .45); transform: translateX(-20px); }

.ring::after { content: ""; position: absolute; inset: 6.5%; border-radius: 50%; pointer-events: none; opacity: 0; box-shadow: 0 0 70px 12px rgba(255, 90, 31, .5), inset 0 0 70px 10px rgba(255, 90, 31, .3); transition: opacity .7s ease; }
.ring.done::after { opacity: 1; }

.anim .accent { animation: heat 3.4s ease-in-out infinite; }
@keyframes heat {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 90, 31, 0); }
  50% { text-shadow: 0 0 26px rgba(255, 90, 31, .65), 0 0 60px rgba(255, 90, 31, .28); }
}

.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: -40% auto -40% -60px; width: 44px; background: linear-gradient(90deg, transparent, rgba(255, 243, 214, .75), transparent); transform: skewX(-20deg); pointer-events: none; }
@media (hover: hover) { .btn:hover::after { transition: left .7s ease; left: 110%; } }
.anim .hero__actions .btn:first-child, .anim .dock .btn:last-child { animation: ember-pulse 2.8s ease-in-out infinite; }
@keyframes ember-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); }
  50% { box-shadow: 0 0 22px 3px rgba(255, 90, 31, .5); }
}

/* Заголовок блока: шов вырастает под ним */
.anim .section-head h2 { position: relative; padding-bottom: 14px; }
.anim .section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(180px, 46%); height: 3px; background: linear-gradient(90deg, #6d757c, var(--arc) 82%, var(--arc-hot)); box-shadow: 0 0 10px rgba(255, 90, 31, .6); transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.3, .7, .2, 1) .25s; }
.anim .section-head.in h2::after { transform: scaleX(1); }

.service { position: relative; overflow: hidden; }
.service::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--arc), var(--arc-hot)); transform: scaleX(0); transform-origin: left; transition: transform 1s ease .2s; }
.anim .service.in::before { transform: scaleX(1); }

.anim .process__list li { transition: opacity .6s ease, transform .6s ease, border-color 1s ease .35s; }
.anim .process__list li.in { border-top-color: var(--arc); }

.objects__rail img { transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .7s ease; }
.anim .objects__rail figure { overflow: hidden; }
.anim .objects__rail figure:not(.in) img { transform: scale(1.14); filter: saturate(.4) brightness(.7); }
@media (hover: hover) { .objects__rail figure:hover img { transform: scale(1.05); } }

.facts dt { font-variant-numeric: tabular-nums; }

/* Цифры */
.facts { padding: clamp(40px, 7vh, 72px) var(--gutter); border-top: 1px solid #262a2e; border-bottom: 1px solid #262a2e; }
.facts__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); }
.facts dt { font: 800 clamp(42px, 5vw, 72px)/1 var(--head); color: var(--arc); text-transform: uppercase; }
.facts dd { margin: 6px 0 0; color: #c9cdd0; font-size: 16px; line-height: 1.35; }

/* Услуги */
.services__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: #262a2e; border: 1px solid #262a2e; }
.service { background: var(--ink); padding: clamp(22px, 2.6vw, 34px); }
.service__n { font: 500 13px var(--mono); color: var(--arc); }
.service h3 { margin: 26px 0 10px; }
.service p { color: #c9cdd0; }

/* Объекты */
.objects { padding-right: 0; }
.objects__rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 0 var(--gutter) 14px 0; -webkit-overflow-scrolling: touch; scrollbar-color: var(--steel-2) transparent; }
.objects__rail figure { flex: 0 0 clamp(250px, 26vw, 380px); margin: 0; scroll-snap-align: start; }
.objects__rail img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--ink-2); }
.objects__rail figcaption { margin-top: 10px; font-size: 15px; color: #c9cdd0; }

/* НАКС */
.naks__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.naks__grid article { border-top: 3px solid var(--paper-ink); padding-top: 16px; }
.naks__grid strong { display: block; font: 800 clamp(64px, 8vw, 112px)/1 var(--head); color: var(--arc); }
.naks__grid h3 { margin: 10px 0 6px; }

/* Этапы */
.process__list { list-style: none; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(24px, 4vw, 56px); }
.process__list li { counter-increment: step; border-top: 1px solid var(--steel-2); padding-top: 14px; }
.process__list li::before { content: counter(step, decimal-leading-zero); font: 500 13px var(--mono); color: var(--arc); }
.process__list h3 { margin: 12px 0 6px; }
.process__list p { color: #c9cdd0; }

.geo .section-head { margin-bottom: clamp(28px, 5vh, 48px); }
.seo { max-width: 860px; }
.seo h3 { margin-bottom: 10px; }
.seo p + p { margin-top: 12px; }
.seo .link { color: #b23f12; white-space: normal; }
.seo__links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.service h3 a { text-decoration: underline; text-decoration-color: var(--steel-2); text-underline-offset: 4px; }
@media (hover: hover) { .service h3 a:hover { color: var(--arc); } }

/* Страницы услуг */
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gutter); border-bottom: 1px solid #262a2e; }
.page-top a:last-child { font: 500 15px var(--mono); white-space: nowrap; }
.page-body { padding-bottom: 96px; }
.page { max-width: 820px; margin: 0 auto; padding: clamp(36px, 7vh, 72px) var(--gutter) 48px; color: #d6d9db; }
.page h1 { font-size: clamp(42px, 6.4vw, 76px); color: #f1efea; margin: 12px 0 18px; }
.page h2 { font-size: clamp(30px, 4vw, 42px); color: #f1efea; margin: 38px 0 12px; }
.page ul { padding-left: 20px; }
.page li + li { margin-top: 6px; }
.page p + p { margin-top: 12px; }
.page__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* Вопросы */
.faq__list { max-width: 860px; border-top: 1px solid var(--steel-2); }
.faq details { border-bottom: 1px solid var(--steel-2); }
.faq summary { min-height: 60px; padding: 16px 0; font-size: 19px; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--mono); color: var(--arc); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: #c9cdd0; max-width: 40em; }

/* Заявка */
.kp { background: var(--ink-2); padding-bottom: clamp(64px, 12vh, 120px); }
.form { max-width: 860px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
.form__wide { grid-column: 1 / -1; }
.form input:not([type="checkbox"]), .form textarea { width: 100%; min-height: 50px; padding: 12px 14px; background: var(--ink); color: #f1efea; border: 1px solid var(--steel-2); border-radius: 2px; font: 400 16px var(--body); }
.form input[type="file"] { padding: 12px; }
.form textarea { resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--arc); outline-offset: 0; border-color: transparent; }
.form__check { display: flex !important; align-items: center; gap: 10px; font-weight: 400 !important; }
.form__check input { width: 22px; height: 22px; accent-color: var(--arc); flex: none; }
.form__status { color: #c9cdd0; min-height: 1.5em; }

/* Подвал */
.foot { padding: 40px var(--gutter) 40px; border-top: 1px solid #262a2e; color: var(--steel); font-size: 15px; }
.foot__name { font: 800 26px/1 var(--head); text-transform: uppercase; color: #f1efea; margin-bottom: 10px; }

.max-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: -6px 0; color: var(--arc); vertical-align: middle; white-space: nowrap; transition: transform .15s ease; }
.max-link span { text-decoration: underline; text-underline-offset: 3px; }
.max-link img { display: block; width: 32px; height: 32px; flex: none; }
.max-link:active { transform: scale(.97); }
.foot .max-link { margin-left: 14px; }
@media (hover: hover) { .max-link:hover img { transform: scale(1.08); } .max-link img { transition: transform .15s ease; } }
.foot p + p { margin-top: 6px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot__links .link { white-space: normal; }
.form__check .link { white-space: normal; }
.form__note { font-size: 15px; color: #c9cdd0; }

/* Юридические страницы */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(32px, 7vh, 72px) var(--gutter) 72px; color: #d6d9db; }
.legal__back { display: inline-block; margin-bottom: 28px; color: var(--arc); font-weight: 500; }
.legal h1 { font-size: clamp(38px, 6vw, 64px); color: #f1efea; margin-bottom: 12px; }
.legal h2 { font: 600 21px/1.25 var(--body); text-transform: none; color: #f1efea; margin: 32px 0 8px; }
.legal p, .legal ul { margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.legal__date { color: var(--steel); font-size: 15px; }
.legal mark { background: rgba(255, 90, 31, .22); color: #ffd9c9; padding: 0 4px; border-radius: 2px; }

/* Панель для телефона */
.dock { display: none; }

@media (max-width: 1099px) { .top__nav { display: none; } }

@media (max-width: 899px) {
  .top__cta, .top__phone { display: none; }
  .hero-track { height: 135vh; height: 135svh; }
  .facts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .services__list, .naks__grid, .process__list, .form { grid-template-columns: minmax(0, 1fr); }
  .objects__rail figure { flex-basis: 74vw; }
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .hero { background: radial-gradient(120% 56% at 74% 26%, #1b1f23 0%, var(--ink) 70%); }
  .ring { top: 62px; right: -5vw; width: min(86vw, 46svh); transform: none; }
  .hero__text { left: var(--gutter); right: var(--gutter); width: auto; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .hero__text .eyebrow { margin-bottom: 12px; font-size: 11.5px; }
  h1 { font-size: clamp(46px, min(14.6vw, 9.4svh), 92px); margin-bottom: 12px; }
  .lead { font-size: 16px; line-height: 1.42; }
  .hero__actions { display: none; }
  .readout { top: 74px; bottom: auto; left: var(--gutter); right: auto; flex-direction: column; gap: 10px; }
  .readout dd { font-size: 14px; }
  .readout div:nth-child(n+2) { display: none; }

  .scale { grid-template-columns: minmax(0, 1fr); }
  .scale__head, .scale__stage, .scale__control { grid-column: 1; grid-row: auto; }
  .scale__value { font-size: 54px; }
  .scale__ticks span:nth-child(even) { visibility: hidden; }

  .dock {
    position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(15, 17, 19, .92); backdrop-filter: blur(10px); border-top: 1px solid #262a2e;
  }
  .dock .btn { min-height: 50px; padding: 0 12px; }
}

@media (max-height: 640px) and (max-width: 899px) {
  .lead { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { height: auto; }
  .hero { position: relative; }
  .js-head, .sparks { display: none; }
  .btn { transition: none; }
}
