/* Estimatix × Внуково — адресный лендинг. Тёмная «живая» тема, официальный тон. */
:root {
  --bg: #0b0f14;
  --bg-2: #10161e;
  --panel: #131b24;
  --panel-2: #1a2531;      /* более светлая «документная» панель */
  --line: #1f2a36;
  --text: #e6edf3;
  --muted: #8b98a5;
  --green: #3fe08f;
  --cyan: #4cc9f0;
  --amber: #ffc857;
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--display); font-weight: 800; font-size: 17px;
  color: var(--text); letter-spacing: 0.04em;
}
.logo:hover { text-decoration: none; }
.logo .dot { color: var(--green); }
.nav { display: flex; gap: 26px; align-items: center; }
.sysline {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em;
  color: var(--muted); white-space: nowrap;
}
@media (max-width: 1100px) { .sysline { display: none; } }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 11px;
  background: transparent; border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.22s, opacity 0.22s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.btn {
  display: inline-block;
  background: var(--green); color: #06130c;
  font-weight: 700; font-size: 15px;
  padding: 12px 24px; border: none; border-radius: 6px;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(63, 224, 143, 0.25); text-decoration: none; }
.btn.small { padding: 8px 18px; font-size: 14px; }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn.ghost:hover { box-shadow: none; border-color: var(--green); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; background: var(--bg);
}
.cam {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 30% 40%, #17222e 0%, #0d141c 70%);
}
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.18) 3px 4px);
  pointer-events: none;
}
.cam-label {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--mono); font-size: 11px; color: rgba(230,237,243,0.55);
  letter-spacing: 0.1em; z-index: 3;
}
.rec { color: var(--amber); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-overlay {
  position: relative; z-index: 5; text-align: center;
  padding: 120px 24px 80px;
  background: radial-gradient(ellipse at center, rgba(11,15,20,0.94) 0%, rgba(11,15,20,0.74) 55%, rgba(11,15,20,0.28) 85%, transparent 100%);
}
.hero-tag {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--green);
  border: 1px solid rgba(63,224,143,0.35); padding: 7px 14px; margin-bottom: 26px;
}
.hero h1, .hero .sub { text-shadow: 0 2px 24px rgba(11,15,20,0.9); }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 52px); font-weight: 800; line-height: 1.18;
  letter-spacing: 0; max-width: 980px; margin: 0 auto 22px;
}
.hero h1 .accent { color: var(--green); }
.hero .sub { font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); max-width: 760px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
section.alt { background: var(--bg-2); }
section.tight { padding: 64px 0; }

.sec-label {
  display: inline-block; position: relative;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green);
  padding: 6px 12px; margin-bottom: 20px;
  border: 1px solid rgba(63, 224, 143, 0.35);
}
.sec-label::before, .sec-label::after { content: ""; position: absolute; width: 7px; height: 7px; }
.sec-label::before { top: -1px; left: -1px; border-top: 2px solid var(--green); border-left: 2px solid var(--green); }
.sec-label::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--green); border-right: 2px solid var(--green); }

h2 {
  font-family: var(--display);
  font-size: clamp(21px, 2.7vw, 33px); font-weight: 700; letter-spacing: 0;
  line-height: 1.28; max-width: 880px; margin-bottom: 16px;
}
h3 { font-weight: 700; }
.lead { color: var(--muted); font-size: 18px; max-width: 780px; margin-bottom: 40px; }
.note { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }
.card .k {
  font-family: var(--mono); font-size: 11px; color: var(--cyan);
  letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 14px;
}
.card ul { list-style: none; margin-top: 12px; }
.card li { color: var(--muted); font-size: 15px; padding: 4px 0 4px 16px; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; background: var(--line); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; margin-top: 40px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px; }
.stat .cap {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 16px;
}
.stat .num { font-family: var(--display); font-size: clamp(24px, 3vw, 34px); font-weight: 800; color: var(--green); line-height: 1.05; margin-bottom: 12px; }
.stat .num.cyan { color: var(--cyan); }
.stat .lbl { color: var(--muted); font-size: 15px; line-height: 1.5; }

/* scenes (video frames) */
.scenes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.scene {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px;
  background: radial-gradient(ellipse at 35% 45%, #1a2634 0%, #0e151d 75%);
}
.scene video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,15,20,0.05) 45%, rgba(11,15,20,0.82) 100%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.15) 3px 4px);
  pointer-events: none;
}
.scene .phrase {
  position: absolute; left: 18px; bottom: 16px; right: 92px; z-index: 3;
  font-size: clamp(14px, 1.4vw, 16.5px); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
}
.scene .tc { position: absolute; right: 14px; bottom: 16px; z-index: 3; font-family: var(--mono); font-size: 11px; color: rgba(139,152,165,0.7); }

/* cycle / steps */
.cycle { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; counter-reset: step; }
.cycle .step { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px; position: relative; }
.cycle .step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; color: var(--cyan); display: block; margin-bottom: 12px;
}
.cycle .step h3 { font-size: 17px; margin-bottom: 8px; }
.cycle .step p { color: var(--muted); font-size: 15px; }
.cycle .step .when { display: block; margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--green); letter-spacing: 0.06em; }

.plate {
  background: var(--panel); border: 1px dashed var(--line); border-radius: 10px;
  padding: 22px 26px; color: var(--muted); font-size: 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.plate .mk { color: var(--green); font-family: var(--mono); }
.plate b { color: var(--text); }

/* status badge */
.status {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 20px;
}
.status.live { background: rgba(63,224,143,0.14); color: var(--green); border: 1px solid rgba(63,224,143,0.4); }
.status.proto { background: rgba(76,201,240,0.1); color: var(--cyan); border: 1px solid rgba(76,201,240,0.32); }
.status.dev { background: rgba(255,200,87,0.1); color: var(--amber); border: 1px solid rgba(255,200,87,0.3); }

/* ---------- NEW: направления (навигатор) ---------- */
.dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.dir {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px; transition: border-color 0.18s, transform 0.18s;
}
.dir:hover { border-color: rgba(63,224,143,0.45); transform: translateY(-2px); text-decoration: none; }
.dir .n { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; display: block; margin-bottom: 16px; }
.dir h3 { font-size: 19px; line-height: 1.3; margin: 14px 0 10px; color: var(--text); }
.dir p { color: var(--muted); font-size: 15.5px; flex: 1; }
.dir .go { margin-top: 18px; font-family: var(--mono); font-size: 12.5px; color: var(--green); letter-spacing: 0.06em; }

/* ---------- NEW: схемы (инлайновый SVG) ---------- */
.scheme {
  margin-top: 40px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 26px 24px 20px; overflow-x: auto;
}
.scheme svg { display: block; width: 100%; min-width: 680px; height: auto; }
.scheme-cap {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.05em; margin-top: 16px; line-height: 1.6; min-width: 680px;
}

/* ---------- NEW: цитата-источник ---------- */
.quote {
  margin-top: 40px; background: var(--panel-2);
  border: 1px solid var(--line); border-left: 3px solid var(--cyan);
  border-radius: 0 10px 10px 0; padding: 26px 30px;
}
.quote p { font-size: 17px; line-height: 1.55; }
.quote p + p { margin-top: 12px; }
.quote .src {
  display: block; margin-top: 16px; font-family: var(--mono); font-size: 12px;
  color: var(--muted); letter-spacing: 0.05em; line-height: 1.6;
}

/* ---------- NEW: границы (не делает / защита) ---------- */
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.limit-col { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 30px; }
.limit-col.yes { border-color: rgba(63,224,143,0.35); }
.limit-col .cap { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 18px; }
.limit-col ul { list-style: none; }
.limit-col li { color: var(--muted); font-size: 15.5px; padding: 8px 0 8px 30px; position: relative; line-height: 1.5; }
.limit-col li::before {
  position: absolute; left: 0; top: 8px; font-weight: 700; font-family: var(--mono); font-size: 15px;
}
.limit-col.no li::before { content: "✕"; color: #5b6672; }
.limit-col.yes li::before { content: "✓"; color: var(--green); }
.limit-col li b { color: var(--text); font-weight: 600; }

/* ---------- NEW: раскрывающаяся спецификация ---------- */
details.spec {
  margin-top: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
}
details.spec summary {
  padding: 20px 26px; cursor: pointer; font-weight: 700; font-size: 16px;
  list-style: none; display: flex; align-items: center; gap: 12px;
}
details.spec summary::-webkit-details-marker { display: none; }
details.spec summary::before {
  content: "+"; font-family: var(--mono); color: var(--green); font-size: 18px; line-height: 1;
}
details.spec[open] summary::before { content: "−"; }
details.spec summary:hover { color: var(--green); }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-top: 1px solid var(--line); }
.spec-table td { padding: 12px 26px; font-size: 15px; color: var(--muted); vertical-align: top; line-height: 1.5; }
.spec-table td:first-child { color: var(--text); font-weight: 600; width: 30%; }
.spec-cap {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--cyan); padding: 18px 26px 2px; display: block;
}

/* checks row */
.checks { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 28px; list-style: none; }
.checks li { color: var(--muted); font-size: 15px; padding-left: 26px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }

/* CTA final */
.cta-box { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.cta-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 34px; }
.cta-card h3 { font-family: var(--display); font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.cta-card p { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }
.cta-card .btn { width: 100%; text-align: center; }
.offer { list-style: none; }
.offer li { position: relative; padding: 0 0 22px 40px; }
.offer li:last-child { padding-bottom: 0; }
.offer .n { position: absolute; left: 0; top: 0; font-family: var(--mono); font-size: 13px; color: var(--green); border: 1px solid rgba(63,224,143,0.4); border-radius: 6px; padding: 4px 8px; }
.offer h4 { font-size: 16.5px; margin-bottom: 5px; }
.offer p { color: var(--muted); font-size: 15px; }

/* контакты — два человека */
.persons { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 20px; }
.person .who { font-size: 15.5px; font-weight: 700; }
.person .role { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.person .lines { font-family: var(--mono); font-size: 14px; line-height: 1.7; }
.person .lines a { color: var(--text); }
.person .lines a:hover { color: var(--green); text-decoration: none; }

.trust-row {
  display: flex; gap: 32px; flex-wrap: wrap; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; justify-content: center;
}

/* footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* visitor detection box (hero, desktop only) */
#visitor-box { position: fixed; top: 0; left: 0; z-index: 90; width: 90px; height: 90px; border: 1.5px solid var(--green); pointer-events: none; opacity: 0; transition: opacity 0.35s; }
#visitor-box .vtag {
  position: absolute; top: -20px; left: -1.5px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1;
  padding: 4px 6px; white-space: nowrap; background: var(--green); color: #06130c; font-weight: 700;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.on { opacity: 1; transform: none; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .dirs { grid-template-columns: 1fr; }
  .limits { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .cam:nth-child(n+3) { display: none; }
  .scenes, .cta-box { grid-template-columns: 1fr; }

  .wrap { padding: 0 18px; }
  section, section.tight { padding: 56px 0; }
  .hero-overlay { padding: 104px 20px 64px; }
  .lead { font-size: 16px; margin-bottom: 28px; }
  h2 { margin-bottom: 14px; }
  .sec-label { margin-bottom: 16px; }

  /* burger nav */
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11, 15, 20, 0.98); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line); padding: 6px 0 12px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { display: block; color: var(--text); font-size: 16px; padding: 14px 24px; }
  .nav .btn.small { margin: 10px 24px 0; text-align: center; padding: 14px; font-size: 15px; }

  .scenes { gap: 14px; }
  .scenes .scene:nth-child(n+3) { display: none; }

  .scheme { padding: 18px 16px 16px; }
  .quote { padding: 22px 20px; }
  .quote p { font-size: 16px; }
  .spec-table td { padding: 10px 18px; font-size: 14.5px; }
  .spec-table td:first-child { width: 38%; }
  details.spec summary { padding: 18px 20px; font-size: 15px; }

  .checks { gap: 12px 26px; }
  #visitor-box { display: none; }
}
