@font-face { font-family: "VT323"; src: url("/fonts/vt323.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/plex-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/plex-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --signal: #1b2fd0;      /* синий экран VIDEO LOSS */
  --signal-deep: #13219a;
  --osd: #f4f6ff;
  --timecode: #ffe45c;
  --paper: #e9ebf2;
  --ink: #0e1547;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--signal);
  color: var(--osd);
  font: 400 1.125rem/1.55 "IBM Plex Sans", system-ui, sans-serif;
}
h1, h2 { font-family: "VT323", ui-monospace, monospace; font-weight: 400; }
h1 { font-size: clamp(3.1rem, 6.4vw, 5.6rem); line-height: .98; margin: 0 0 .45em; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 4.4vw, 3.5rem); line-height: 1; margin: 0; }
h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 .25em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--timecode); outline-offset: 3px; }
.paper :focus-visible { outline-color: var(--signal); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--timecode); color: var(--ink); padding: 8px 12px; z-index: 2; }
.skip:focus { left: var(--gutter); }

.screen { min-height: 100svh; display: flex; flex-direction: column; }
.screen main { flex: 1; display: flex; align-items: center; }
.bar, .hero, .setup, .why, .support, .signup, .foot {
  width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
}
.bar { display: flex; justify-content: space-between; align-items: baseline; padding-block: 20px; }
.mark { font: 1.9rem/1 "VT323", ui-monospace, monospace; text-decoration: none; }
.bar-link { text-underline-offset: 4px; }

.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: 16px 56px;
}
.hero-copy p { max-width: 34em; margin-bottom: 28px; }

.button {
  display: inline-block; font: 1.6rem/1 "VT323", ui-monospace, monospace;
  background: var(--timecode); color: var(--ink); border: 0; padding: 12px 22px 13px;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--osd); }

/* Стена камер: стык в стык, как на мониторе регистратора */
.wall { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--osd); padding: 3px; }
.tile { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.tile canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.tile figcaption, .tile .clock {
  position: absolute; left: 10px; font: clamp(.95rem, 1.5vw, 1.25rem)/1 "VT323", ui-monospace, monospace;
  color: var(--osd); text-shadow: 1px 1px 0 #000;
}
.tile figcaption { top: 9px; }
.tile .clock { bottom: 8px; color: var(--timecode); }
.loss {
  position: absolute; inset: 0; display: grid; place-items: center; background: var(--signal);
  font: clamp(1.4rem, 3vw, 2.4rem)/1 "VT323", ui-monospace, monospace;
}
.loss[hidden] { display: none; }

.paper { background: var(--paper); color: var(--ink); padding-block: clamp(56px, 8vw, 104px); }
.setup ol { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.setup li { counter-increment: step; }
.setup li::before { content: counter(step); display: block; font: 3.2rem/1 "VT323", ui-monospace, monospace; color: var(--signal); margin-bottom: 8px; }
.why, .support { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); margin-top: clamp(56px, 8vw, 96px); }
.why-text { display: grid; gap: 1em; max-width: 38em; }
.support ul { margin: 0; padding: 0; list-style: none; }
.support li { padding-block: 10px; border-top: 2px solid var(--ink); }
.support li:last-child { border-bottom: 2px solid var(--ink); }

.signup { padding-block: clamp(56px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(24px, 5vw, 72px); align-items: start; }
.signup-lead { display: grid; gap: 16px; max-width: 26em; }
.signup form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; }
.field:first-child { grid-column: 1 / -1; }
.field label { font-weight: 600; }
.field input, .field select {
  font: inherit; color: var(--ink); background: var(--osd); border: 0; border-radius: 0;
  padding: 12px; width: 100%; min-height: 50px;
}
.signup form .button { align-self: end; min-height: 50px; }
.form-message { grid-column: 1 / -1; min-height: 1.6em; }
.form-message[data-state="error"] { color: var(--timecode); }
.form-message[data-state="done"] { font: 1.9rem/1.1 "VT323", ui-monospace, monospace; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding-block: 20px 28px; border-top: 3px solid var(--osd); font-size: 1rem; }

.nosignal { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: 16px; gap: 20px; }
.nosignal h1 { margin: 0; }

@media (max-width: 860px) {
  .hero, .why, .support { grid-template-columns: minmax(0, 1fr); }
  .signup { grid-template-columns: minmax(0, 1fr); }
  .setup ol { grid-template-columns: minmax(0, 1fr); }
  .screen main { align-items: flex-start; }
}
@media (max-width: 460px) {
  .signup form { grid-template-columns: minmax(0, 1fr); }
  .tile figcaption, .tile .clock { left: 6px; font-size: .8rem; }
  .tile figcaption { top: 5px; }
  .tile .clock { bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
