/* Газтепломонтаж — тёмная тема (вариант А) */
@font-face {
  font-family: "Manrope";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2-variations"), url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2-variations"), url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #0b0d10;
  --bg-2: #101317;
  --bg-3: #161a1f;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #eef1f4;
  --ink-2: #a9b1ba;
  --ink-3: #6f7882;
  --accent: #ff4b2b;
  --accent-2: #ff7a5c;
  --accent-glow: rgba(255, 75, 43, .35);
  --ok: #4fd18b;
  --wip: #f5b041;
  --radius: 16px;
  --wrap: 1160px;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  font: 16px/1.65 var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-2); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 6.4vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 16, .72);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.logo svg { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 0 10px var(--accent-glow)); }
.logo span { line-height: 1.15; }
.logo small { display: block; font-weight: 400; font-size: .72rem; color: var(--ink-3); }
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .94rem; padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: var(--glass-2); }
.top .phone {
  margin-left: auto; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; font-size: .94rem;
  padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; transition: border-color .2s;
}
.top .phone:hover { border-color: var(--accent); }
@media (min-width: 980px) { .nav { display: flex; } .top .phone { margin-left: 12px; } }
@media (max-width: 440px) { .logo small { display: none; } .top .phone { padding: 6px 10px; font-size: .88rem; } }

/* ---------- кнопки ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; font-size: 1rem; color: var(--ink);
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--accent); color: #fff; box-shadow: 0 8px 30px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-main:hover { background: #ff5d40; box-shadow: 0 10px 40px -6px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-ghost { border-color: var(--line-2); background: var(--glass); }
.btn-ghost:hover { border-color: rgba(255,255,255,.32); background: var(--glass-2); }

/* ---------- первый экран ---------- */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; z-index: -1; width: 720px; height: 720px; right: -220px; top: -200px;
  background: radial-gradient(circle, rgba(255,75,43,.30), rgba(255,75,43,.08) 40%, transparent 68%);
  filter: blur(10px);
}
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 940px) {
  .hero { padding: 96px 0 112px; }
  .hero .wrap { grid-template-columns: 1.08fr .92fr; gap: 56px; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  color: var(--accent-2); margin-bottom: 18px;
  padding: 5px 12px; border: 1px solid rgba(255,122,92,.3); border-radius: 999px; background: rgba(255,75,43,.07);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(92deg, #ff7a5c, #ff3b1f 60%, #ff9466);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; margin-bottom: 28px; }
.hero .meta { margin-top: 26px; font-size: .9rem; color: var(--ink-3); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 30px; max-width: 520px; }
.hero-stats div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.hero-stats b { display: block; font-family: var(--display); font-size: 1.3rem; color: var(--ink); line-height: 1.2; }
.hero-stats span { font-size: .78rem; color: var(--ink-3); line-height: 1.3; display: block; }
.hero-stats b { white-space: nowrap; }
@media (max-width: 480px) {
  .hero-stats { gap: 8px; }
  .hero-stats div { padding: 10px; }
  .hero-stats b { font-size: 1.05rem; }
  .hero-stats span { font-size: .72rem; }
}

.scheme-box {
  position: relative; border: 1px solid var(--line); border-radius: 22px; padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
}
.scheme-box .bar { display: flex; gap: 6px; margin-bottom: 10px; }
.scheme-box .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.scheme-box .bar span { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.scheme-box .bar span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: blink 2s infinite; }
.scheme { color: #c9cfd6; }
.scheme text { font-family: var(--mono); font-size: 11px; fill: currentColor; }
.scheme .wire { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.3; }
.scheme .flow { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 6 60; animation: flow 2.6s linear infinite; filter: drop-shadow(0 0 3px var(--accent)); }
.scheme .flow.d1 { animation-delay: -.4s; } .scheme .flow.d2 { animation-delay: -1.1s; } .scheme .flow.d3 { animation-delay: -1.8s; }
.scheme .node rect { fill: #14181d; stroke: rgba(255,255,255,.16); }
.scheme .core { fill: #1d1012; stroke: var(--accent); stroke-width: 1.5; filter: drop-shadow(0 0 14px rgba(255,75,43,.45)); }
@keyframes flow { to { stroke-dashoffset: -66; } }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- секции ---------- */
section { padding: 64px 0; position: relative; }
@media (min-width: 900px) { section { padding: 104px 0; } }
.sec-head { max-width: 48em; margin-bottom: 40px; }
.sec-head .k { font-family: var(--mono); font-size: .8rem; color: var(--accent-2); display: block; margin-bottom: 12px; }
.sec-head p { color: var(--ink-2); font-size: 1.08rem; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.grid { display: grid; gap: 16px; }
@media (min-width: 680px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 20px 50px -25px rgba(0,0,0,.9); }
.card p:last-child { margin-bottom: 0; }

/* задача → решение */
.case .num { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); margin-bottom: 14px; display: block; }
.case h3 { margin-bottom: 14px; }
.case .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--ink-3); display: block; margin-bottom: 4px; }
.case .task { color: var(--ink-2); margin-bottom: 16px; }
.case .sol { border-top: 1px dashed var(--line-2); padding-top: 16px; }
.case .sol .k { color: var(--accent-2); }
.case .sol p { color: var(--ink); }
.case::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity .3s;
}
.case:hover::before { opacity: 1; }

/* компетенции */
.skills { display: grid; border-top: 1px solid var(--line); }
.skill { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.skill h3 { margin: 0; display: flex; gap: 12px; align-items: baseline; }
.skill h3 span { font-family: var(--mono); font-size: .8rem; color: var(--accent-2); font-weight: 400; }
.skill p { margin: 0; color: var(--ink-2); }
@media (min-width: 780px) { .skill { grid-template-columns: 320px 1fr; gap: 28px; } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tag { font-family: var(--mono); font-size: .8rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink-2); }

/* устройства */
.dev { display: flex; flex-direction: column; }
.dev.feature { border-color: rgba(255,75,43,.35); background: linear-gradient(180deg, rgba(255,75,43,.10), rgba(255,255,255,.02) 60%); }
.dev .badge { align-self: flex-start; margin-bottom: 14px; }
.dev .more { margin-top: auto; padding-top: 16px; font-weight: 600; text-decoration: none; }
.dev .more:hover { text-decoration: underline; }
.dev ul { padding-left: 1.1em; margin: 0 0 .6em; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: rgba(79,209,139,.12); color: var(--ok); }
.badge-wip { background: rgba(245,176,65,.12); color: var(--wip); }

.sec-cta { margin-top: 28px; }

/* текстовые страницы */
.doc { max-width: 760px; }
.doc h2 { font-size: 1.3rem; margin-top: 2em; }
.doc p, .doc li { color: var(--ink-2); }
.doc ul { padding-left: 1.2em; }

/* шаги */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li { counter-increment: s; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--glass); position: relative; }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--mono); color: var(--accent-2); font-size: .85rem; margin-bottom: 10px; }
.steps b { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.steps span { color: var(--ink-2); font-size: .94rem; }

/* видео */
.vfeat {
  margin: 0 0 16px; display: grid; gap: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
}
@media (min-width: 900px) { .vfeat { grid-template-columns: 1.35fr 1fr; } }
.vfeat figcaption { padding: 26px; display: flex; flex-direction: column; align-items: flex-start; }
.vfeat figcaption .badge { margin-bottom: 14px; }
.vfeat figcaption p { color: var(--ink-2); }
.vfeat .more { margin-top: auto; font-weight: 600; text-decoration: none; }
.yt, .yt-frame { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; margin: 0; background: #000; cursor: pointer; overflow: hidden; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s, transform .4s; }
.yt:hover img { opacity: 1; transform: scale(1.02); }
.yt .play {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 10px rgba(255,75,43,.18), 0 10px 40px -6px var(--accent-glow); transition: transform .2s;
}
.yt:hover .play { transform: scale(1.08); }
.yt .play svg { width: 30px; height: 30px; margin-left: 4px; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vlink { display: flex; gap: 18px; align-items: center; text-decoration: none; color: var(--ink); }
.vlink svg { width: 48px; height: 48px; flex: none; }
.vlink b { display: block; font-size: 1.1rem; }
.vlink span { color: var(--ink-2); font-size: .94rem; }
.vlink .go { margin-left: auto; color: var(--ink-3); font-size: 1.3rem; transition: transform .2s, color .2s; }
.vlink:hover .go { transform: translateX(4px); color: var(--accent-2); }

/* монтаж, о себе */
.split { display: grid; gap: 32px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.split p { color: var(--ink-2); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--ink); }
.checks li::before {
  content: ""; position: absolute; left: 3px; top: .5em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

/* контакты */
.contacts { overflow: hidden; isolation: isolate; }
.contacts::after {
  content: ""; position: absolute; z-index: -1; width: 800px; height: 800px; left: 50%; bottom: -560px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,75,43,.28), transparent 65%);
}
.clist { display: grid; gap: 12px; }
@media (min-width: 680px) { .clist { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .clist { grid-template-columns: repeat(3, 1fr); } }
.citem {
  display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600;
  transition: border-color .2s, background .2s;
}
.citem:hover { border-color: rgba(255,75,43,.5); background: rgba(255,75,43,.06); }
.citem svg { width: 26px; height: 26px; flex: none; color: var(--accent-2); }
.citem small { display: block; color: var(--ink-3); font-size: .8rem; font-weight: 400; }
.contacts .note { margin-top: 28px; color: var(--ink-3); font-size: .92rem; }

footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: .88rem; padding: 26px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--ink-2); }

/* страница устройства */
.page-hero { position: relative; padding: 48px 0 56px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--line); }
.page-hero::after {
  content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; right: -200px; top: -260px;
  background: radial-gradient(circle, rgba(255,75,43,.25), transparent 65%);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page-hero .lead { color: var(--ink-2); font-size: 1.1rem; max-width: 40em; margin-bottom: 26px; }
.page-hero .badge { margin-bottom: 14px; }
.crumbs { font-size: .88rem; margin-bottom: 20px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.diagram { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--bg-3); }
.diagram svg text { font-family: var(--mono); font-size: 12px; fill: var(--ink); }
.diagram svg .box { fill: #1b2026; stroke: rgba(255,255,255,.2); stroke-width: 1.2; }
.diagram svg .muted { fill: var(--ink-3); font-size: 10px; }
.spec { width: 100%; border-collapse: collapse; font-size: .95rem; }
.spec th, .spec td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--ink-3); font-weight: 500; width: 38%; }
.callout { border: 1px solid rgba(255,75,43,.35); background: rgba(255,75,43,.07); padding: 14px 18px; border-radius: 12px; margin: 20px 0 0; }
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent-2); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--ink-2); }

/* появление при прокрутке (только если работает JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scheme .flow, .scheme-box .bar span::before { animation: none; }
  .scheme .flow { stroke-dasharray: none; opacity: .5; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}
