/* LedZeid — референс. Тема одна (тёмная), осознанно: продукт светится в темноте.
   Layout: шапка с бегущей строкой → кинематографичный первый экран → закреплённые сцены → сетки с золотой линией. */
:root {
  --bg: #070708;
  --bg-2: #0e0e11;
  --bg-3: #15151a;
  --ink: #f2efe8;
  --muted: #9b978d;
  --line: rgba(214, 170, 84, .24);
  --line-strong: rgba(214, 170, 84, .55);
  --gold: #d6aa54;
  --gold-hi: #f3cf7a;
  --gold-deep: #8a6420;
  --alert: #e5484d;
  --ok: #3ccf91;
  --display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Golos Text", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --gutter: max(clamp(16px, 3vw, 40px), env(safe-area-inset-left, 0px));
  --gutter-r: max(clamp(16px, 3vw, 40px), env(safe-area-inset-right, 0px));
  --wrap: 1440px; /* рабочий фрейм страницы, включая поля */
  color-scheme: dark;
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .35s ease both; }
::view-transition-new(root) { animation: vt-in .45s ease both; }
@keyframes vt-out { to { opacity: 0; filter: blur(6px) brightness(.4); } }
@keyframes vt-in { from { opacity: 0; filter: blur(6px) brightness(1.6); } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--gold); color: #000; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .01em; line-height: .98; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 7.4vw, 104px); }
h2 { font-size: clamp(34px, 4.8vw, 64px); }
h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.1; }
.gold { color: var(--gold); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: #d8d4ca; max-width: 60ch; }
.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 820px; }

/* ---------- Buttons ---------- */
.btn { --b: var(--gold); display: inline-flex; align-items: center; gap: 10px; padding: 16px 24px; border: 1px solid var(--b); color: var(--ink);
  font: 500 14px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; background: transparent; cursor: pointer;
  position: relative; overflow: hidden; transition: color .25s; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--b); transform: translateY(101%); transition: transform .35s cubic-bezier(.2,.7,.2,1); z-index: -1; }
.btn:hover { color: #0a0a0a; }
.btn:hover::before { transform: none; }
.btn.solid { background: var(--gold); color: #0a0a0a; }
.btn.solid::before { background: var(--gold-hi); }
.btn.alert { --b: var(--alert); }
.btn .arr { transition: transform .3s; }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Header with LED ticker ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: #000; z-index: 60; }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(7,7,8,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
/* Бегущая строка — внизу экрана, как табло */
.ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; height: calc(48px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #000; border-top: 1px solid var(--line-strong); box-shadow: 0 -12px 40px rgba(0,0,0,.6); overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.js .ticker:not(.shown) { transform: translateY(110%); }
/* Кнопка «Наверх» из жёлтых пикселей: стрелка бежит вверх при наведении, нижние ряды заполняются по мере прокрутки */
.totop { position: fixed; right: var(--gutter-r); bottom: calc(48px + 20px + env(safe-area-inset-bottom, 0px)); z-index: 56; width: 68px; height: 68px; padding: 9px;
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; background: rgba(0,0,0,.78); border: 1px solid var(--line-strong); cursor: pointer;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; transition: opacity .35s, transform .35s cubic-bezier(.2,.7,.2,1), border-color .2s; }
.totop.shown { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover, .totop:focus-visible { border-color: var(--gold); }
.totop i { border-radius: 50%; background: #1f190d; transition: background .12s; }
.totop i.fill { background: #5a4519; }
.totop i.a { background: var(--gold-hi); box-shadow: 0 0 5px rgba(255,190,80,.85); }
.ticker canvas { display: block; width: 100%; height: 48px; }
body { padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px)); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.logo img { height: 34px; width: auto; }
.nav ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.nav ul a { white-space: nowrap; text-decoration: none; color: #cfcabe; padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--gold-hi); border-color: var(--gold); }
.nav .spacer { flex: 1; }
.nav .phone { font: 500 14px/1 var(--mono); text-decoration: none; color: var(--ink); white-space: nowrap; }
.nav .btn { padding: 11px 16px; white-space: nowrap; flex: none; }
.burger { display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink); width: 44px; height: 40px; font: 18px/1 var(--mono); }
@media (max-width: 1440px) { .nav { gap: 20px; } .nav ul { gap: 16px; } }
@media (max-width: 1420px) { .nav .phone { display: none; } }
@media (max-width: 1240px) { .nav ul { display: none; } .burger { display: block; } }
@media (max-width: 520px) { .nav .btn { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(92vh, 900px); display: grid; align-items: start; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; transform-origin: 65% 55%; }
.hero-led { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }
.hero-led { z-index: 1; } /* лупа поверх затемнения фото */
.hero-hint { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 24px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: rgba(243,207,122,.75); z-index: 1; }
@media (hover: none) { .hero-hint { display: none; } }
.hero-media::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,7,8,.92) 0%, rgba(7,7,8,.55) 38%, rgba(7,7,8,0) 70%), linear-gradient(0deg, var(--bg) 0%, rgba(7,7,8,0) 38%); }
.scan { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.28) 0 1px, transparent 1px 4px); mix-blend-mode: multiply; }
.hero-inner { padding-block: 40px 56px; display: grid; gap: 28px; }
@media (min-width: 1081px) { .hero h1 { font-size: 50px; } } /* оффер на ПК */
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .w { display: inline-block; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 18px; }
.fact { padding: 16px 18px; border-right: 1px solid var(--line); display: grid; gap: 4px; }
.fact:last-child { border-right: 0; }
.fact b { font: 600 clamp(24px, 3vw, 36px)/1 var(--display); color: var(--gold-hi); }
.fact > span { font: 400 12px/1.3 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
/* Факты 2 × 2 в левой тёмной зоне, чтобы не тонули в ярком фото */
.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; background: rgba(7,7,8,.62); backdrop-filter: blur(6px); }
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fact:nth-child(2) { border-right: 0; } .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- Fork: buy / repair ---------- */
.fork { display: flex; gap: 0; border: 1px solid var(--line); min-height: 380px; }
.fork-side { flex: 1; position: relative; overflow: hidden; padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  text-decoration: none; transition: flex-grow .6s cubic-bezier(.2,.7,.2,1); isolation: isolate; min-width: 0; }
.fork-side + .fork-side { border-left: 1px solid var(--line); }
.fork-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .45; transition: opacity .5s, transform 1.2s; }
.fork-side::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(7,7,8,.95) 15%, rgba(7,7,8,.35)); }
.fork-side:hover { flex-grow: 1.6; }
.fork-side:hover img { opacity: .8; transform: scale(1.04); }
.fork-side p { margin: 0; color: #d8d4ca; max-width: 46ch; }
.fork-side .tag { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.fork-side.repair .tag { color: var(--alert); }
.fork-side.buy .tag { color: var(--gold); }
@media (max-width: 760px) { .fork { flex-direction: column; } .fork-side + .fork-side { border-left: 0; border-top: 1px solid var(--line); } .fork-side { min-height: 300px; } }

/* ---------- Pinned story: diode → facade ---------- */
.story { position: relative; height: 420vh; }
.story-stage { position: sticky; top: 64px; height: calc(100vh - 64px - 48px); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); }
.story-visual { position: relative; overflow: hidden; background: #000; }
.story-layer { position: absolute; inset: 0; opacity: 0; }
.story-layer:first-child { opacity: 1; } /* без JS виден первый кадр */
.story-layer img { width: 100%; height: 100%; object-fit: cover; }
.story-layer.cabinet { display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, #1a140a, #000 70%); }
.cabinet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(70%, 620px); aspect-ratio: 1; padding: 14px; border: 2px solid #2a2a2e; background: #0b0b0d; box-shadow: 0 0 80px rgba(214,170,84,.18); }
.cabinet-grid i { display: block; background-image: radial-gradient(circle, var(--gold-hi) 0 1.3px, transparent 1.6px); background-size: 9px 9px; border: 1px solid #222; box-shadow: inset 0 0 30px rgba(243,207,122,.18); }
.story-copy { border-left: 1px solid var(--line); padding: 40px 32px; display: flex; flex-direction: column; justify-content: center; gap: 22px; background: var(--bg); }
.step { display: none; gap: 14px; }
.step.on { display: grid; }
.step .num { font: 600 64px/1 var(--display); color: var(--gold); }
.step .spec { font: 500 13px/1.6 var(--mono); color: var(--gold-hi); border-top: 1px solid var(--line); padding-top: 12px; }
.progress { display: flex; gap: 6px; }
.progress i { height: 3px; flex: 1; background: #242428; }
.progress i.on { background: var(--gold); }
@media (max-width: 900px) {
  .story { height: auto; }
  .story-stage { position: static; height: auto; grid-template-columns: 1fr; }
  .story-visual { height: 56vw; min-height: 260px; }
  .story-layer { position: absolute; }
  .story-copy { border-left: 0; border-top: 1px solid var(--line); padding: 24px var(--gutter-r) 24px var(--gutter); }
  .step { display: grid; padding-block: 12px; border-bottom: 1px solid var(--line); }
  .step .num { font-size: 40px; }
}

/* ---------- Pixel pitch tool ---------- */
.pitch { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); }
.pitch-view { position: relative; background: #000; min-height: 320px; }
.pitch-view canvas { width: 100%; height: 100%; display: block; aspect-ratio: 16/10; }
.pitch-view .hud { position: absolute; left: 14px; bottom: 12px; font: 500 12px var(--mono); color: var(--gold-hi); background: rgba(0,0,0,.6); padding: 6px 10px; border: 1px solid var(--line); }
.pitch-panel { border-left: 1px solid var(--line); padding: clamp(20px, 3vw, 36px); display: grid; gap: 22px; align-content: start; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 14px var(--mono); padding: 10px 14px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--gold); color: #0a0a0a; border-color: var(--gold); }
.range { display: grid; gap: 10px; }
.range label { display: flex; justify-content: space-between; font: 500 13px var(--mono); color: var(--muted); }
.range output { color: var(--gold-hi); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.verdict { font-size: 15px; color: #d8d4ca; border-top: 1px solid var(--line); padding-top: 16px; }
.verdict b { color: var(--gold-hi); font-weight: 500; }
@media (max-width: 900px) { .pitch { grid-template-columns: 1fr; } .pitch-panel { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Price table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.price { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 540px; }
table.price th, table.price td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.price th { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
table.price td.num { font: 600 22px var(--display); color: var(--gold-hi); white-space: nowrap; }
table.price tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) {
  table.price:not(:has(th:nth-child(4))) { min-width: 0; }
  table.price th, table.price td { padding: 12px 14px; }
  table.price td.num { font-size: 18px; }
}
table.price tbody tr { transition: background .2s; }
table.price tbody tr:hover { background: rgba(214,170,84,.06); }
.note { font: 400 13px/1.5 var(--mono); color: var(--muted); margin-top: 12px; }

/* ---------- Catalog grid ---------- */
.grid-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px; display: grid; gap: 14px; text-decoration: none; position: relative; min-width: 0; }
.card-img { aspect-ratio: 16/10; overflow: hidden; background: #000; position: relative; }
/* Карточка = выключенный экран: тёмная картинка под сеткой пикселей. Наведение — развёртка и «включение». */
.card-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.42) saturate(.2) contrast(1.1); transition: filter .7s ease .15s, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.card-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, transparent 0 1.5px, rgba(7,7,8,.9) 2.1px) 0 0 / 5px 5px; transition: opacity .6s ease .2s; }
.card-img::before { content: ""; position: absolute; left: 0; right: 0; top: -14%; height: 14%; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(243,207,122,.65) 70%, rgba(255,240,200,.95)); }
.card:hover .card-img img, .card:focus-visible .card-img img, .card.on .card-img img { filter: none; transform: scale(1.04); }
.card:hover .card-img::after, .card:focus-visible .card-img::after, .card.on .card-img::after { opacity: 0; }
.card:hover .card-img::before, .card:focus-visible .card-img::before, .card.on .card-img::before { animation: sweep .65s cubic-bezier(.4,0,.2,1) both; }
@keyframes sweep { 0% { top: -14%; opacity: 1; } 100% { top: 104%; opacity: 0; } }
.card .state { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); position: absolute; left: 34px; bottom: auto; }
.card .row h3::before { content: "●"; color: #3a3324; margin-right: 8px; font-size: .6em; vertical-align: middle; transition: color .4s; }
.card:hover .row h3::before, .card.on .row h3::before { color: var(--ok); }
.card .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card .price { font: 500 14px var(--mono); color: var(--gold-hi); white-space: nowrap; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .badge { position: absolute; top: 34px; left: 34px; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; background: var(--gold); color: #0a0a0a; padding: 5px 8px; z-index: 2; }
@media (max-width: 980px) { .grid-line { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-line { grid-template-columns: 1fr; } }

/* ---------- Cases ---------- */
.cases { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.case { grid-column: span 6; display: grid; gap: 12px; min-width: 0; }
.case.wide { grid-column: span 12; }
.case figure { margin: 0; overflow: hidden; background: #000; position: relative; aspect-ratio: 16/9; }
.case.wide figure { aspect-ratio: 21/8; }
.case figure img { width: 100%; height: 100%; object-fit: cover; }
.case .facts-line { font: 500 13px/1.5 var(--mono); color: var(--gold-hi); letter-spacing: .02em; }
.case p { margin: 0; color: var(--muted); font-size: 14.5px; }
.case .pix { position: absolute; inset: 0; background: var(--bg); }
@media (max-width: 760px) { .case { grid-column: span 12; } .case.wide figure { aspect-ratio: 16/9; } }

/* ---------- Map ---------- */
.map { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.map canvas { width: 100%; aspect-ratio: 16/9; display: block; }
.cities { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.cities li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font: 500 14px var(--mono); }
.cities li span { color: var(--muted); }
.cities li b { color: var(--gold-hi); font-weight: 500; }
@media (max-width: 900px) { .map { grid-template-columns: 1fr; } }

/* ---------- Service ---------- */
.service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); }
.service figure { margin: 0; position: relative; min-height: 420px; overflow: hidden; }
.service figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.service figure figcaption { position: absolute; left: 12px; bottom: 10px; font: 400 11px var(--mono); color: rgba(255,255,255,.6); }
.svc-list { padding: clamp(24px, 4vw, 48px); display: grid; gap: 0; align-content: center; }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }
.svc h3 { font-size: 22px; }
.svc p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; grid-column: 1 / -1; }
.svc .p { font: 500 14px var(--mono); color: var(--gold-hi); white-space: nowrap; }
@media (max-width: 900px) { .service { grid-template-columns: 1fr; } .service figure { min-height: 280px; } }

/* ---------- Module grid with broken pixels ---------- */
.diag { display: grid; gap: 12px; }
.diag-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.diag-bar .note { margin: 0; }
.diag-bar .btn { padding: 10px 14px; }
.modules { position: relative; overflow: hidden; display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; padding: 10px; background: #0b0b0d; border: 1px solid var(--line); cursor: crosshair; }
.modules i { aspect-ratio: 2/1; background-size: 6px 6px; background-color: #111; transition: box-shadow .3s, background-color .3s; }
.modules i.lit { background-image: radial-gradient(circle, var(--gold-hi) 0 1.1px, transparent 1.5px); box-shadow: inset 0 0 14px rgba(243,207,122,.22); }
.modules i.dead { background-image: radial-gradient(circle, #2a2a2e 0 1px, transparent 1.4px); }
.modules i.bad { background-image: radial-gradient(circle, var(--alert) 0 1.1px, transparent 1.5px); box-shadow: inset 0 0 16px rgba(229,72,77,.45), 0 0 0 1px var(--alert); cursor: pointer; animation: blink .5s steps(2) infinite; }
.modules i.fixed { animation: pop .55s cubic-bezier(.2,.7,.2,1); }
.modules i:hover { box-shadow: inset 0 0 0 1px var(--gold-hi), inset 0 0 18px rgba(243,207,122,.4); }
@keyframes blink { 50% { opacity: .45; } }
@keyframes pop { 0% { transform: scale(1.5); box-shadow: 0 0 32px 6px rgba(243,207,122,.9); z-index: 2; position: relative; } 100% { transform: none; } }
.scanbar { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--gold-hi); box-shadow: 0 0 24px 8px rgba(243,207,122,.45); opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .modules { grid-template-columns: repeat(8, 1fr); } .modules i:nth-child(n+65) { display: none; } }

/* ---------- Form ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0; border: 1px solid var(--line); }
.calc-copy { padding: clamp(24px, 4vw, 48px); display: grid; gap: 18px; align-content: start; background: var(--bg-2); }
.calc form { padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { background: var(--bg); border: 1px solid var(--line-strong); color: var(--ink); padding: 14px; font: 16px var(--body); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold-hi); }
.form-ok { grid-column: 1 / -1; font: 500 14px var(--mono); color: var(--ok); }
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .calc form { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 18px; font: 500 clamp(18px, 1.8vw, 22px)/1.3 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--mono); color: var(--gold); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 24px; color: #cfcabe; max-width: 75ch; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 56px 40px; background: #050506; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid h4 { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 0 0 14px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; color: #cfcabe; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { color: var(--gold-hi); }
.legal { margin-top: 40px; font: 400 12px/1.6 var(--mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Inner page ---------- */
.crumbs { font: 400 12px var(--mono); letter-spacing: .06em; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold-hi); }
.page-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: 36px 72px; }
.page-hero .media { position: relative; overflow: hidden; aspect-ratio: 4/3; background: #000; border: 1px solid var(--line); }
.page-hero .media img { width: 100%; height: 100%; object-fit: cover; transform-origin: 62% 40%; }
.answer { font-size: 18px; color: #e3dfd5; border-left: 2px solid var(--gold); padding-left: 18px; max-width: 60ch; }
.answer b { color: var(--gold-hi); font-weight: 600; }
.updated { font: 400 12px var(--mono); color: var(--muted); }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { font: 500 13px var(--mono); color: var(--muted); width: 42%; font-weight: 400; }
.spec-table td { font: 500 15px var(--mono); color: var(--ink); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.uses div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px; display: grid; gap: 8px; min-width: 0; }
.uses b { font: 600 20px/1.1 var(--display); text-transform: uppercase; }
.uses span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .page-hero, .two { grid-template-columns: minmax(0, 1fr); } .uses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .uses { grid-template-columns: 1fr; } }

/* Demo label for generated imagery */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .story { height: auto; }
  .story-stage { position: static; height: auto; grid-template-columns: 1fr; }
  .story-layer { position: relative; opacity: 1 !important; height: 50vw; }
  .step { display: grid; }
}

/* ---------- Рабочий сайт: формы заявок ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field textarea { resize: vertical; min-height: 84px; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--muted); }
.form-msg { grid-column: 1 / -1; margin: 0; font: 500 14px/1.5 var(--mono); color: var(--ok); }
.form-msg.err { color: var(--alert); }
.form-msg a { color: inherit; }
.lead-form button[disabled] { opacity: .6; cursor: progress; }

/* ---------- Мобильное меню ---------- */
@media (max-width: 1240px) {
  .nav.open ul { display: flex; flex-direction: column; gap: 0; position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    background: rgba(7,7,8,.97); border-bottom: 1px solid var(--line); padding: 8px var(--gutter-r) 20px var(--gutter); z-index: 60; }
  .nav.open ul a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav.open ul::after { content: "+7 702 822-24-48"; display: block; padding-top: 18px; font: 500 16px var(--mono); color: var(--gold-hi); }
}

/* ---------- Внутренние страницы ---------- */
.prose { max-width: 72ch; display: grid; gap: 16px; color: #d8d4ca; }
.prose p { margin: 0; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.prose b { color: var(--ink); }
.steps-list { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.steps-list li { counter-increment: s; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px; display: grid; gap: 8px; align-content: start; }
.steps-list li::before { content: "0" counter(s); font: 600 28px/1 var(--display); color: var(--gold); }
.steps-list b { font: 600 18px/1.15 var(--display); text-transform: uppercase; }
.steps-list span { color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .steps-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-list { grid-template-columns: 1fr; } }
.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.contact-cards a, .contact-cards div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px; display: grid; gap: 10px; text-decoration: none; min-width: 0; transition: background .2s; }
.contact-cards a:hover { background: var(--bg-2); }
.contact-cards small { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-cards b { font: 600 22px/1.15 var(--display); color: var(--gold-hi); overflow-wrap: anywhere; }
.contact-cards span { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .contact-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .contact-cards { grid-template-columns: 1fr; } }
.links-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.links-grid a { border: 1px solid var(--line); padding: 22px; display: grid; gap: 8px; text-decoration: none; transition: border-color .2s; }
.links-grid a:hover { border-color: var(--gold); }
.links-grid b { font: 600 20px/1.1 var(--display); text-transform: uppercase; }
.links-grid span { color: var(--muted); font-size: 14.5px; }
.links-grid .p { font: 500 13px var(--mono); color: var(--gold-hi); }
@media (max-width: 900px) { .links-grid { grid-template-columns: 1fr; } }

/* Кейс без фото: факты в рамке */
.case.text { border: 1px solid var(--line); padding: 24px; align-content: start; }
.case.text h3 { margin: 0; font: 600 24px/1.1 var(--display); text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Галерея: мини-лента на главной и страница /galereya/ */
.mini-gal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 28px; }
.mini-gal a, .gal a { position: relative; display: block; overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 1; }
.mini-gal img, .gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s, opacity .3s; }
.mini-gal a:hover img, .gal a:hover img { transform: scale(1.06); }
.mini-gal a:hover, .gal a:hover { border-color: var(--gold); }
.gal-play { position: absolute; left: 8px; bottom: 8px; font: 500 11px var(--mono); letter-spacing: .06em; color: #fff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.2); padding: 3px 7px; }
.mini-gal-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
@media (max-width: 900px) { .mini-gal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gal a { aspect-ratio: 4/3; }
.gal a[hidden] { display: none; }
.gal figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; font: 500 12px/1.35 var(--mono); color: #eee; background: linear-gradient(transparent, rgba(0,0,0,.85)); opacity: 0; transition: opacity .25s; }
.gal a:hover figcaption, .gal a:focus-visible figcaption { opacity: 1; }
.gal .gal-play { left: auto; right: 8px; top: 8px; bottom: auto; }
@media (max-width: 1000px) { .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } .gal figcaption { opacity: 1; font-size: 11px; } }
.gal-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5,5,6,.96); color: var(--ink); }
.lb::backdrop { background: rgba(0,0,0,.8); }
.lb-stage { position: absolute; inset: 56px 64px 64px; display: grid; place-items: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; background: #000; }
.lb-cap { position: absolute; left: 64px; right: 64px; bottom: 18px; text-align: center; font: 500 13px var(--mono); color: var(--muted); }
.lb button { position: absolute; background: rgba(0,0,0,.5); border: 1px solid var(--line-strong); color: var(--ink); width: 48px; height: 48px; font: 22px/1 var(--mono); cursor: pointer; }
.lb button:hover { border-color: var(--gold); color: var(--gold-hi); }
.lb .lb-close { top: 4px; right: 8px; }
.lb .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb .lb-count { position: absolute; top: 18px; left: 16px; font: 500 12px var(--mono); color: var(--muted); }
@media (max-width: 600px) { .lb-stage { inset: 56px 8px 72px; } .lb .lb-prev, .lb .lb-next { top: auto; bottom: 8px; transform: none; } .lb-cap { left: 64px; right: 64px; bottom: 22px; font-size: 11px; } }
