/* DeepView — deepview.solutions · вариант F1 «Цветные главы»
   Дизайн-система DeepView: Deep Space #0B0F19, Neon Green #00FF66, Cyber Cyan #00E5FF.
   Шрифты: Syncopate (логотип, латиница), Unbounded (заголовки, кириллица), Inter (текст), Source Code Pro (метки). */

:root {
  --space: #0B0F19;
  --panel: #111827;
  --line: #1F2937;
  --green: #00FF66;
  --green-deep: #00381A;
  --cyan: #00E5FF;
  --amber: #FFC21A;
  --violet: #7A4BE0;
  --violet-soft: #B79CFF;
  --paper: #F3F5F2;
  --ink: #0B0F19;
  --text: #E5E7EB;
  --muted: #8A95A5;
  --soft: #C9CFD8;
  --danger: #FF4D4D;
  --f-logo: 'Syncopate', 'Unbounded', system-ui, sans-serif;
  --f-display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --f-text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Source Code Pro', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --pad: 48px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--space);
  color: #FFFFFF;
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; }
.on-light :focus-visible { outline-color: var(--ink); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 16px; background: #FFFFFF; color: var(--ink); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Шапка ---------- */
.top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding: 24px 28px;
}
.logo { font-family: var(--f-logo); font-weight: 700; font-size: 18px; letter-spacing: 1px; text-decoration: none; color: #FFFFFF; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.logo::before { content: ''; width: 4px; height: 26px; background: var(--green); }
.logo b { color: var(--green); font-weight: 700; }
.rail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rail a, .lang button, .menu-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 600; text-decoration: none; border-radius: 4px;
}
.rail a:hover { background: rgba(255,255,255,.08); }
.rail .demo { background: #FFFFFF; color: var(--ink); margin-left: 6px; }
.rail .demo:hover { background: var(--green); }
.lang { display: flex; gap: 2px; margin-left: 8px; }
.lang button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 8px; }
.lang button[aria-pressed="true"] { color: var(--green); }
.menu-btn { display: none; border: 1px solid rgba(255,255,255,.3); background: rgba(11,15,25,.6); color: #FFFFFF; cursor: pointer; }

/* ---------- Первый экран: заголовок через шов ---------- */
.hero {
  position: relative; height: 860px; min-height: 100svh; max-height: 980px; overflow: hidden;
  background: linear-gradient(180deg, var(--space) 0 50%, var(--green) 50% 100%);
}
.hero__h {
  position: absolute; left: 0; right: 0; top: 50%; height: 1.72em;
  transform: translateY(-66.7%);
  font-size: clamp(64px, 9.5vw, 150px);
}
.hl {
  position: absolute; left: 0; right: 0; top: 0; margin: 0;
  text-align: center; font-family: var(--f-display); font-weight: 900; font-size: 1em;
  line-height: .86; letter-spacing: -.03em; text-transform: uppercase; text-wrap: balance;
}
.hl--top { color: #FFFFFF; clip-path: inset(0 0 33.3% 0); }
.hl--low { color: var(--green-deep); clip-path: inset(66.7% 0 0 0); }
.hero__sub {
  position: absolute; left: 0; right: 0; bottom: 56px; margin: 0 auto; padding-inline: 20px;
  max-width: 38ch; text-align: center; font-size: 20px; font-weight: 500; color: var(--ink);
}

/* ---------- Главы ---------- */
.ch {
  position: relative; min-height: 880px; padding: 96px var(--pad);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-content: start;
  scroll-margin-top: 0;
}
.ch h2 {
  grid-column: 1 / -1; margin: 0;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(56px, 11vw, 180px);
  line-height: .86; letter-spacing: -.03em; text-transform: uppercase; overflow-wrap: anywhere;
}
.ch .txt { grid-column: 1 / span 4; align-self: end; }
.ch .t5 { grid-column: 1 / span 5; }
.ch .t6 { grid-column: 1 / span 6; }
.ch .u6 { grid-column: 7 / span 6; }
.ch .pic { grid-column: 6 / span 7; margin: 0; }
.ch .pic img { width: 100%; }
.tag { margin: 0 0 12px; font-family: var(--f-mono); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.lead { margin: 0 0 12px; font-size: 22px; font-weight: 600; line-height: 1.35; }
.ch p { margin-top: 0; }

.c-green { background: var(--green); color: var(--ink); }
.c-cyan { background: var(--cyan); color: var(--ink); }
.c-amber { background: var(--amber); color: #0A0E17; }
.c-panel { background: var(--panel); color: #FFFFFF; }
.c-paper { background: var(--paper); color: var(--ink); min-height: 760px; }
.c-violet { background: var(--violet); color: #FFFFFF; min-height: 760px; }
.c-space { background: var(--space); color: #FFFFFF; min-height: 700px; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; font-size: 20px; }
.list li { padding: 18px 0; border-top: 1px solid #374151; }
.list li:last-child { border-bottom: 1px solid #374151; }
.list b { font-family: var(--f-display); font-weight: 500; }

.ind { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.ind > div { padding: 28px 24px 32px 0; margin-right: 24px; border-right: 1px solid rgba(11,15,25,.18); }
.ind > div:last-child { border-right: 0; margin-right: 0; }
.ind .q { margin: 0 0 8px; font-weight: 600; }

.cs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.cs > div { border-top: 2px solid #FFFFFF; padding-top: 20px; }
.num { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: clamp(56px, 7vw, 112px); line-height: .9; font-variant-numeric: tabular-nums; }
.cs h3 { margin: 14px 0 4px; font-size: 18px; font-weight: 600; }

.steps { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.steps .bar { height: 10px; }
.steps .tag { margin: 18px 0 6px; }

/* ---------- Заявка ---------- */
.contact { min-height: 0; padding-bottom: 120px; }
.contact h2 { color: var(--green); }
.form {
  grid-column: 7 / span 6; align-self: end;
  display: grid; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
.field { display: grid; gap: 6px; }
.field label, .field legend { font-family: var(--f-mono); font-size: 13px; color: var(--soft); padding: 0; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line);
  background: #000000; color: #FFFFFF; font: inherit; font-size: 16px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 10px rgba(0,255,102,.2); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.err { min-height: 0; margin: 0; font-size: 14px; color: var(--danger); }
fieldset.field { border: 0; margin: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  min-height: 44px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--line);
  background: transparent; color: var(--soft); font: inherit; font-size: 15px; cursor: pointer;
}
.chips button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--ink); font-weight: 600; }
.send {
  min-height: 56px; border: 0; border-radius: 4px; background: var(--green); color: var(--ink);
  font-family: var(--f-display); font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: box-shadow .3s ease, transform .2s ease;
}
.send:hover { box-shadow: 0 0 30px rgba(0,255,102,.45); }
.send:active { transform: translateY(1px); }
.send[disabled] { opacity: .6; cursor: progress; }
.status { margin: 0; font-family: var(--f-mono); font-size: 14px; }
.status.ok { color: var(--green); }
.status.bad { color: var(--danger); }
.direct { margin: 24px 0 0; font-family: var(--f-mono); font-size: 15px; color: var(--soft); display: grid; gap: 4px; }
.direct a { text-decoration: none; }
.direct a:hover { color: var(--green); }

.foot {
  padding: 24px var(--pad); border-top: 1px solid var(--line); background: var(--space);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: var(--muted);
}

/* ---------- Появление при прокрутке (видно и без анимации) ---------- */
.rv { transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.js .rv.pre { transform: translateY(24px); }

/* ---------- Планшет и телефон ---------- */
@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .rail { display: none; position: absolute; left: 12px; right: 12px; top: 84px; flex-direction: column; align-items: stretch; padding: 12px; background: rgba(11,15,25,.97); border: 1px solid var(--line); border-radius: 8px; }
  .rail.open { display: flex; }
  .rail a { font-size: 15px; }
  .rail .demo { margin: 6px 0 0; justify-content: center; }
  .lang { margin: 6px 0 0; justify-content: center; }
}
@media (max-width: 860px) {
  :root { --pad: 20px; }
  body { font-size: 17px; }
  .top { padding: 16px; }
  .hero { height: 600px; min-height: 0; }
  .hero__h { font-size: 15vw; }
  .hero__sub { font-size: 17px; bottom: 40px; }
  .ch { min-height: 0; padding-block: 64px; }
  .ch .txt, .ch .pic, .ch .t5, .ch .t6, .ch .u6, .form { grid-column: 1 / -1; }
  .ind, .cs, .steps { grid-template-columns: 1fr; }
  .ind > div { border-right: 0; margin-right: 0; border-bottom: 1px solid rgba(11,15,25,.18); }
  .lead { font-size: 19px; }
  .list { font-size: 17px; }
  .form { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .send { transition: none; }
  .js .rv.pre { transform: none; }
}

/* ---------- v2: DV VMS как основа ---------- */
.hero__badge {
  position: absolute; left: 50%; top: calc(50% - 1.72 * clamp(64px, 9.5vw, 150px) * .667 - 64px); transform: translateX(-50%);
  margin: 0; padding: 6px 14px; border: 1px solid rgba(0,255,102,.6); border-radius: 999px;
  font-family: var(--f-logo); font-weight: 700; font-size: 14px; letter-spacing: .2em; color: var(--green);
}
.mods { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); margin-top: 24px; }
.mods > div { padding: 24px 24px 8px 0; margin-right: 24px; border-right: 1px solid rgba(11,15,25,.2); }
.mods > div:last-child { border-right: 0; margin-right: 0; }
.mods h3 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 800; font-size: 22px; line-height: 1.15; }
.mods p:last-child { margin: 0; }
.stack { grid-column: 1 / -1; margin: 8px 0 0; font-family: var(--f-mono); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.plugs { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.plugs li { position: relative; padding: 22px 20px 24px; min-height: 190px; background: rgba(11,15,25,.08); border-top: 2px solid var(--ink); }
.plugs h3 { margin: 10px 0 6px; font-family: var(--f-display); font-weight: 800; font-size: 19px; line-height: 1.2; }
.plugs p { margin: 0; font-size: 16px; }
.plugs .pt { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.plugs .pdark { background: var(--ink); color: #FFFFFF; border-top-color: var(--ink); }
.plugs .pdark .pt { color: var(--green); opacity: 1; font-size: 20px; }
.plugs .pimg { padding: 0; background: var(--ink); overflow: hidden; }
.plugs .pimg img { width: 100%; height: 100%; object-fit: cover; }
.ind5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.other { min-height: 0; padding-block: 96px; }
.h-mid { font-size: clamp(44px, 6vw, 96px) !important; margin-bottom: 20px !important; }
@media (max-width: 1100px) { .plugs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ind5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .plugs, .ind5, .mods { grid-template-columns: 1fr; }
  .mods > div { border-right: 0; margin-right: 0; border-bottom: 1px solid rgba(11,15,25,.2); }
  .plugs .pimg { min-height: 220px; }
  .hero__badge { top: 96px; }
}
.shots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; align-items: start; }
.shots figure { margin: 0; }
.shots img { width: 100%; border: 1px solid rgba(11,15,25,.35); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.shots figcaption { margin-top: 10px; font-size: 15px; font-weight: 600; }
.shots__note { grid-column: 1 / -1; margin: 0; font-family: var(--f-mono); font-size: 12px; opacity: .7; }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr; } }

/* ---------- Экраны-блоки и стрелки ---------- */
html { scroll-snap-type: y proximity; }
.hero, .ch { scroll-snap-align: start; }
@media (min-width: 861px) {
  .ch { min-height: 100svh; }
  .ch.contact, .ch.other { min-height: 100svh; align-content: center; }
}
.pager {
  position: fixed; z-index: 30; display: flex; flex-direction: column; gap: 8px;
  right: max(20px, calc(env(safe-area-inset-right, 0px) + 12px));
  bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px));
}
.pager__btn {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: rgba(11,15,25,.78); color: #FFFFFF;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: background .25s ease, transform .2s ease, opacity .25s ease;
}
.pager__btn:hover { background: var(--green); color: var(--ink); border-color: var(--green); }
.pager__btn:active { transform: scale(.94); }
.pager__btn[disabled] { opacity: .3; cursor: default; pointer-events: none; }
@media (max-width: 860px) { .pager__btn { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-snap-type: none; } }

/* ---------- Экран = высота окна (компьютер) ---------- */
@media (min-width: 861px) {
  .ch { padding-block: clamp(40px, 6vh, 88px); row-gap: clamp(12px, 2vh, 24px); align-content: center; }
  .ch h2 { font-size: clamp(56px, min(10vw, 16vh), 170px); }
  .ch .pic img { max-height: 52vh; width: auto; max-width: 100%; margin-left: auto; }
  .mods { margin-top: clamp(8px, 1.5vh, 24px); }
  .mods > div { padding-top: clamp(12px, 2vh, 24px); }
  .plugs li { min-height: 0; padding: clamp(12px, 1.8vh, 22px) 18px; }
  .plugs h3 { margin: 6px 0 4px; font-size: clamp(16px, 2vh, 19px); }
  .plugs p { font-size: clamp(14px, 1.7vh, 16px); line-height: 1.4; }
  .plugs .pimg { min-height: 0; }
  .screens .shots img { max-height: 46vh; width: 100%; object-fit: cover; object-position: top left; }
  .lead { font-size: clamp(18px, 2.3vh, 22px); }
}
.screens .tag.t6 { grid-column: 1 / -1; margin: 0; }
.screens .shots { margin-top: 8px; }
.screens .shots img { border-color: rgba(255,255,255,.12); }
.screens .shots figcaption { color: #C9CFD8; }
.screens .shots__note { color: var(--muted); opacity: 1; }
/* Заявка: заголовок и текст слева, форма справа на одном уровне */
.contact { align-items: center; }
.contact .cleft { grid-column: 1 / span 6; }
.contact .cleft h2 { font-size: clamp(48px, min(7vw, 13vh), 120px); margin-bottom: 24px; }
.contact .form { grid-column: 8 / span 5; align-self: center; }
.contact .direct { margin-top: 16px; }
@media (max-width: 860px) { .contact .cleft, .contact .form { grid-column: 1 / -1; } }
@media (min-width: 861px) {
  .hero { height: 100svh; min-height: 560px; max-height: none; }
  #ch-plugins h2 { font-size: clamp(48px, min(8vw, 12vh), 140px); }
  #ch-plugins .lead { margin-bottom: 0; }
  #ch-plugins .t6 { grid-column: 1 / -1; }
  #ch-plugins .plugs { gap: 6px; }
  .ch .pic img { max-height: 46vh; }
}
.plugs .pimg { position: relative; min-height: 160px; }
.plugs .pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
@media (min-width: 861px) {
  .screens .shots { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px 24px; }
  .screens .shots figure:first-child { grid-row: 1 / span 2; }
  .screens .shots figure:first-child img { max-height: 60vh; }
  .screens .shots figure:not(:first-child) img { max-height: 25vh; }
}
#ch-vms .pic img { border: 1px solid rgba(11,15,25,.5); box-shadow: 0 18px 50px rgba(11,15,25,.35); }
.screens .shots figure:nth-child(3) img { max-height: none; object-fit: contain; }

/* ---------- Выравнивание: одинаковый ритм во всех главах ---------- */
/* Текст и картинка начинаются на одной линии сразу под заголовком (как в «Кейсах») */
.ch .txt, .ch .pic, .ch .t5, .ch .t6 { align-self: start; }
.ch .pic img { margin-left: auto; }
/* Убираем «висящий» отступ у последнего абзаца, чтобы блоки не съезжали */
.ch .txt > :last-child, .ch .t5 > :last-child, .ch .t6 > :last-child,
.cs p:last-child, .ind p:last-child, .mods p:last-child, .steps p:last-child, .plugs p:last-child { margin-bottom: 0; }
/* Одинаковый зазор «заголовок → метка» во всех главах */
.ch h2 { margin-bottom: clamp(4px, 1vh, 12px); }
.contact .cleft { align-self: center; }
.cs .num { font-size: clamp(48px, 5.2vw, 96px); white-space: nowrap; }

/* ---------- Мобильная доводка ---------- */
@media (max-width: 860px) {
  .hero { height: 540px; }
  .hero__sub { bottom: 44px; }
  .plugs li { min-height: 0; padding: 18px 16px 20px; }
  .plugs .pimg { min-height: 140px; }
  .rail { background: #0B0F19; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
  /* Стрелки на телефоне не перекрывают текст: листаем пальцем */
  .pager { display: none; }
  .direct a, .list a { display: inline-block; padding-block: 10px; }
  .screens .shots figure img { max-height: none; }
}

/* Длинные слова в заголовках (EN/UZ) на телефоне: меньше кегль и перенос с дефисом, а не обрыв */
@media (max-width: 860px) {
  .ch h2 { font-size: clamp(34px, 11.5vw, 72px); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: normal; word-break: normal; }
}
/* Стрелки на телефоне: маленькие, полупрозрачные, при прокрутке почти исчезают */
@media (max-width: 860px) {
  .pager { display: flex; gap: 6px; right: max(10px, calc(env(safe-area-inset-right, 0px) + 8px)); bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) + 10px)); opacity: .85; transition: opacity .3s ease; }
  .pager__btn { width: 40px; height: 40px; background: rgba(11,15,25,.55); }
  .pager.is-scrolling { opacity: .2; }
}
/* Самые длинные слова-заголовки на телефоне: кегль под ширину экрана, чтобы слово не вылезало за край */
@media (max-width: 860px) {
  html[lang="en"] #ch-site h2 { font-size: min(8.4vw, 72px); }
  html[lang="uz"] #ch-screens h2 { font-size: clamp(28px, 10.4vw, 72px); }
}
/* Подвал: текст не заходит под стрелки «предыдущий / следующий экран» */
@media (min-width: 861px) { .foot { padding-right: calc(var(--pad) + 60px); } }
@media (max-width: 860px) { .foot { padding-bottom: 68px; } }
/* Узкий телефон (320px): «HAFTADA» в заголовке заявки помещается в строку */
@media (max-width: 360px) { .contact .cleft h2 { font-size: 40px; } }
/* Узкий десктоп: «On-prem» в кейсах не вылезает из колонки */
.cs .num { font-size: clamp(40px, 4.6vw, 96px); }
/* EN «CONSTRUCTION» на десктопе: одно слово в одну строку */
@media (min-width: 861px) { html[lang="en"] #ch-site h2 { font-size: clamp(56px, min(7.6vw, 16vh), 170px); } }
