:root {
  --concrete: #e6e9ec;
  --surface: #f7f8f9;
  --graphite: #1c232b;
  --muted: #56616d;
  --line: #c9cfd5;
  --feed: #26302e;
  --feed-2: #3b4744;
  --motion: #e39b22;
  --rec: #d13a2f;
  --display: "Bahnschrift SemiCondensed", "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --osd: Consolas, "SF Mono", "DejaVu Sans Mono", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--concrete);
  color: var(--graphite);
  font: 16px/1.55 var(--body);
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--motion);
  outline-offset: 2px;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 21px/1 var(--display); letter-spacing: .01em; }
.logo svg { width: 30px; height: 30px; }
.top nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--graphite); }
.top nav .portal { color: var(--graphite); border: 1px solid var(--graphite); border-radius: 4px; padding: 7px 14px; }
.top nav .portal:hover { background: var(--graphite); color: var(--surface); }

/* Первый экран */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; padding-top: 56px; padding-bottom: 64px; }
.eyebrow { margin: 0 0 14px; font: 500 14px/1.3 var(--osd); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; letter-spacing: -.005em; }
h1 { font-size: clamp(36px, 5vw, 58px); margin: 0 0 20px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 18px; }
h3 { font-size: 22px; margin: 0 0 8px; }
.lead { font-size: 18px; color: #2f3944; margin: 0 0 28px; max-width: 34em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--graphite); color: var(--surface); text-decoration: none; border: 0; border-radius: 4px; padding: 13px 22px; font: 600 16px/1 var(--body); cursor: pointer; }
.btn:hover { background: #000; }
.btn.ghost { background: transparent; color: var(--graphite); box-shadow: inset 0 0 0 1px var(--graphite); }
.btn.ghost:hover { background: var(--surface); }

/* Мультиэкран — главный элемент */
.monitor { margin: 0; background: #11161a; border-radius: 8px; padding: 6px; box-shadow: 0 18px 40px -22px rgba(17, 22, 26, .7); }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.cam { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 3px; background: var(--feed); }
.scene { position: absolute; inset: 0; }
.cam::after { /* строки развёртки и виньетка */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .13) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .45) 100%);
}
.osd { position: absolute; z-index: 1; font: 600 11px/1.2 var(--osd); color: #f2f4f2; letter-spacing: .04em; text-shadow: 0 0 2px #000, 1px 1px 0 #000; text-transform: uppercase; }
.osd.tl { top: 7px; left: 8px; }
.osd.tr { top: 7px; right: 8px; text-align: right; }
.osd.bl { bottom: 7px; left: 8px; }
.osd.br { bottom: 7px; right: 8px; }
.rec::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--rec); margin-right: 5px; vertical-align: 0; animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.osd .mv { color: var(--motion); }

/* Сцены: условные кадры без картинок */
.s-entry { background:
  linear-gradient(180deg, transparent 62%, #55605a 62%, #4a544f 100%),
  linear-gradient(90deg, transparent 38%, #6f7a72 38%, #6f7a72 40%, #2c3532 40%, #2c3532 60%, #6f7a72 60%, #6f7a72 62%, transparent 62%) 0 18% / 100% 50% no-repeat,
  linear-gradient(180deg, #7d8a84, #66726c); }
.s-hall { background:
  repeating-linear-gradient(90deg, transparent 0 9%, #8c7a5a 9% 10%, #c2ab7c 10% 26%, #8c7a5a 26% 27%, transparent 27% 34%) 0 28% / 100% 46% no-repeat,
  repeating-linear-gradient(180deg, #a49372 0 5px, #b9a785 5px 14px) 0 28% / 100% 46% no-repeat,
  linear-gradient(180deg, #d9d6cc 0 26%, #9aa19a 26% 74%, #7b847e 74%); }
.s-ir { filter: grayscale(1) contrast(1.15); background:
  repeating-linear-gradient(90deg, #2a302d 0 4%, #6a736f 4% 5.5%, #2a302d 5.5% 22%) 0 12% / 100% 70% no-repeat,
  repeating-linear-gradient(180deg, transparent 0 18%, #8a9490 18% 20.5%) 0 12% / 100% 70% no-repeat,
  radial-gradient(ellipse at 50% 55%, #a3aca8 0%, #4a524f 45%, #222826 85%); }
.s-yard { background:
  linear-gradient(180deg, transparent 58%, #5b5e4e 58%, #474a3d 100%),
  linear-gradient(90deg, transparent 18%, #2f3530 18% 20%, transparent 20% 80%, #2f3530 80% 82%, transparent 82%) 0 30% / 100% 40% no-repeat,
  repeating-linear-gradient(90deg, transparent 0 3%, #3b413b 3% 3.5%) 20% 38% / 60% 22% no-repeat,
  linear-gradient(180deg, #a9b6bd, #8d9a9f 58%); }

/* Суточная шкала архива */
.timeline { padding: 12px 6px 4px; color: #c9d0d2; }
.tl-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 500 12px/1.3 var(--osd); letter-spacing: .03em; margin-bottom: 8px; }
.tl-head strong { color: #fff; font-weight: 600; }
.track { position: relative; height: 22px; border-radius: 2px; background: repeating-linear-gradient(90deg, #2a3236 0 6px, #232a2e 6px 12px); }
.recorded { position: absolute; left: 0; top: 0; bottom: 0; width: 60%; background: #46525a; border-radius: 2px 0 0 2px; }
.ev { position: absolute; top: 3px; bottom: 3px; background: var(--motion); border-radius: 1px; }
.now { position: absolute; top: -4px; bottom: -4px; left: 60%; width: 2px; background: #fff; box-shadow: 0 0 0 1px #11161a; }
.now::before { content: ""; position: absolute; top: -5px; left: -4px; border: 5px solid transparent; border-top-color: #fff; }
.hours { display: flex; justify-content: space-between; font: 11px/1 var(--osd); color: #8e989c; margin-top: 6px; }
.hours span:nth-child(even) { visibility: visible; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font: 11px/1 var(--osd); color: #aab3b6; margin-top: 10px; }
.legend i { display: inline-block; width: 14px; height: 8px; margin-right: 6px; border-radius: 1px; vertical-align: 0; }
.legend .l-rec { background: #46525a; }
.legend .l-mv { background: var(--motion); }
.legend .l-free { background: repeating-linear-gradient(90deg, #2a3236 0 3px, #232a2e 3px 6px); }

/* Разделы */
section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-lead { max-width: 40em; color: #3a4550; margin: 0 0 32px; font-size: 17px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px 22px 24px; counter-increment: step; }
.steps li::before { content: "Шаг " counter(step); display: block; font: 600 12px/1 var(--osd); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.steps p, .who p, .sec p { margin: 0; color: #3a4550; }

.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.who div { border-top: 3px solid var(--graphite); padding-top: 14px; }
.who .days { display: block; font: 600 13px/1.2 var(--osd); color: var(--muted); margin-top: 10px; }

/* Трафик */
.traffic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.meter { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 22px; }
.meter dl { margin: 0; }
.meter div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.meter div:last-child { border-bottom: 0; }
.meter dt { color: var(--muted); }
.meter dd { margin: 0; font: 600 17px/1.3 var(--osd); text-align: right; }

/* Тарифы */
.plans { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.plans th, .plans td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
.plans thead th { font: 600 12px/1.2 var(--osd); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #eef0f2; }
.plans tbody tr:last-child td, .plans tbody tr:last-child th { border-bottom: 0; }
.plans tbody th { font: 600 22px/1.1 var(--display); white-space: nowrap; }
.plans .price { font: 600 20px/1.2 var(--display); white-space: nowrap; }
.plans .price small { display: block; margin-top: 4px; font: 400 13px/1.2 var(--body); color: var(--muted); white-space: normal; }
.note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.sec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* Контакты и подвал */
.contacts { display: flex; gap: 48px; flex-wrap: wrap; }
.contacts div { min-width: 220px; }
.contacts span { display: block; font: 600 12px/1.2 var(--osd); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contacts a { font: 600 22px/1.2 var(--display); }
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Узкие страницы: вход, ошибки */
.narrow { max-width: 440px; margin: 64px auto; padding: 0 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 30px 28px; }
.panel h1 { font-size: 32px; margin-bottom: 8px; }
.panel > p { color: #3a4550; margin: 0 0 22px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
input { width: 100%; padding: 11px 12px; font: 16px var(--body); border: 1px solid #aeb6be; border-radius: 4px; background: #fff; color: var(--graphite); }
.panel .btn { width: 100%; margin-top: 22px; }
.btn:disabled { opacity: .6; cursor: progress; }
.err { display: none; margin-top: 16px; padding: 12px 14px; border-left: 3px solid var(--rec); background: #fbeceb; font-size: 14px; }
.err.on { display: block; }
.help { font-size: 14px; color: var(--muted); margin: 18px 0 0; }
.code { font: 600 13px/1 var(--osd); letter-spacing: .1em; color: var(--muted); margin: 0 0 12px; }
.code::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); margin-right: 8px; }

@media (max-width: 900px) {
  .hero, .traffic { grid-template-columns: 1fr; gap: 36px; }
  .steps, .sec { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr 1fr; }
  .top nav a:not(.portal) { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .osd { font-size: 9px; }
  .osd.br, .osd.tr { display: none; }
  .hours span:nth-child(even) { visibility: hidden; }
  .who { grid-template-columns: 1fr; }
  .plans th, .plans td { padding: 12px 12px; }
  .plans thead th:nth-child(3), .plans tbody td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rec::before { animation: none; }
}
