/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:   #0f1420;
  --bg-base:   #1a1f2e;
  --bg-card:   #252b3b;
  --bg-raised: #2e3547;
  --border:    #353d52;
  --accent:    #3b82f6;
  --accent-h:  #2563eb;
  --green:     #22c55e;
  --yellow:    #eab308;
  --red:       #ef4444;
  --text:      #e2e8f0;
  --muted:     #94a3b8;
  --dim:       #64748b;
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.2; }
a { color: var(--accent); text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 100px 0; }
.section-sm { padding: 64px 0; }

/* ── Animations ── */
@keyframes blink       { 0%,100%{opacity:1}50%{opacity:.3} }
@keyframes cursor-move {
  0%   { top:38px; left:50px; }
  25%  { top:18px; left:25px; }
  50%  { top:58px; left:62px; }
  75%  { top:25px; left:8px;  }
  100% { top:38px; left:50px; }
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15,20,32,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem; color: var(--text);
}
.logo-box {
  width: 34px; height: 34px; background: var(--accent);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--muted); font-size: .9rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-btn {
  background: var(--accent); color: #fff !important;
  padding: 8px 20px; border-radius: var(--r-sm); font-weight: 600;
  transition: background .2s !important;
}
.nav-btn:hover { background: var(--accent-h) !important; }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ── HERO ── */
.hero {
  min-height: 100vh; padding-top: 62px;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse 80% 55% at 50% -5%, rgba(59,130,246,.18) 0%, transparent 65%),
    var(--bg-deep);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 52px 52px; opacity: .14; pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center; position: relative;
}
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.3);
  color: var(--accent); font-size: .75rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px; margin-bottom: 22px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: blink 1.8s ease-in-out infinite;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800; letter-spacing: -.025em; margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 460px; margin-bottom: 38px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: .95rem; padding: 13px 28px;
  border-radius: var(--r-sm); transition: background .2s, transform .1s;
}
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 600; font-size: .95rem;
  padding: 13px 28px; border-radius: var(--r-sm);
  border: 1px solid var(--border); transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(59,130,246,.06); }

/* ── Mockup ── */
.mockup {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 36px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(59,130,246,.07);
}
.mockup-bar {
  background: var(--bg-base); border-bottom: 1px solid var(--border);
  padding: 11px 16px; display: flex; align-items: center; gap: 7px;
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ef4444; }
.dot-y { background: #eab308; }
.dot-g { background: #22c55e; }
.mockup-label { margin-left: auto; font-size: .72rem; color: var(--dim); }
.mockup-body { display: grid; grid-template-columns: 130px 1fr 115px; min-height: 300px; }

.m-sidebar {
  background: var(--bg-base); border-right: 1px solid var(--border);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.m-logo { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: .7rem; margin-bottom: 4px; }
.m-logo-box {
  width: 20px; height: 20px; background: var(--accent); border-radius: 3px;
  display: flex; align-items: center; justify-content: center; font-size: 10px;
}
.m-cam {
  background: #090d17; border: 1px solid var(--border);
  border-radius: 5px; aspect-ratio: 16/9;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.m-cam span { font-size: .58rem; color: var(--dim); }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 5px var(--green);
  animation: blink 1.3s ease-in-out infinite;
}
.m-steps { margin-top: auto; display: flex; flex-direction: column; gap: 5px; }
.m-step { display: flex; align-items: center; gap: 5px; font-size: .6rem; color: var(--dim); }
.m-circle {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .52rem; font-weight: 700; flex-shrink: 0;
}
.m-circle.done   { border-color: var(--accent); color: var(--accent); }
.m-circle.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.m-pause {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 4px;
  padding: 5px; text-align: center; font-size: .58rem; color: var(--muted);
}

.m-canvas {
  background: #0c1019; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.m-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.m-art    { position: relative; width: 88px; height: 88px; }
.m-stroke { position: absolute; border-radius: 999px; opacity: .9; }
.m-cursor {
  position: absolute; width: 9px; height: 9px;
  border: 2px solid var(--accent); border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: cursor-move 4s ease-in-out infinite;
}

.m-panel {
  background: var(--bg-raised); border-left: 1px solid var(--border);
  padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: .72rem;
}
.m-ptitle { font-size: .62rem; font-weight: 700; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.m-status { display: flex; align-items: center; gap: 5px; }
.m-bar    { height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 2px; }
.m-fill   { height: 100%; background: var(--accent); border-radius: 999px; }
.m-colors { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.m-clr    { width: 13px; height: 13px; border-radius: 3px; }
.m-progress-label {
  font-size: .58rem; color: var(--dim); margin-bottom: 3px;
  display: flex; justify-content: space-between;
}
.m-panel-bottom { margin-top: auto; }

/* ── Stats band ── */
.band {
  background: var(--bg-card);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 40px 0;
}
.band-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; text-align: center; }
.band-val  { font-size: 2.4rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.band-lbl  { font-size: .84rem; color: var(--muted); margin-top: 3px; }

/* ── Section header ── */
.sh { margin-bottom: 56px; }
.sh.center { text-align: center; }
.sh.center .sh-desc { margin: 0 auto; }
.sh-label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.sh-title { font-size: clamp(1.9rem, 3.5vw, 2.7rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.sh-desc  { font-size: 1rem; color: var(--muted); max-width: 540px; }

/* ── Steps ── */
.steps {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 3px; background: var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.step { background: var(--bg-card); padding: 40px 32px; }
.step:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.step:last-child  { border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.step-n  { font-size: 3.5rem; font-weight: 900; color: rgba(59,130,246,.1); line-height: 1; margin-bottom: 14px; }
.step-ic {
  width: 46px; height: 46px; background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.2);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; margin-bottom: 16px;
}
.step h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.step p  { font-size: .88rem; color: var(--muted); line-height: 1.75; }

/* ── Features ── */
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.feat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feat-card:hover { border-color: rgba(59,130,246,.4); transform: translateY(-2px); }
.feat-ic { width: 48px; height: 48px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 16px; }
.feat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feat-card p  { font-size: .86rem; color: var(--muted); line-height: 1.75; }
.ic-blue   { background:rgba(59,130,246,.12); border:1px solid rgba(59,130,246,.2); }
.ic-green  { background:rgba(34,197,94,.12);  border:1px solid rgba(34,197,94,.2);  }
.ic-red    { background:rgba(239,68,68,.12);  border:1px solid rgba(239,68,68,.2);  }
.ic-purple { background:rgba(168,85,247,.12); border:1px solid rgba(168,85,247,.2); }
.ic-yellow { background:rgba(234,179,8,.12);  border:1px solid rgba(234,179,8,.2);  }
.ic-teal   { background:rgba(20,184,166,.12); border:1px solid rgba(20,184,166,.2); }

/* ── Fleet ── */
.fleet-wrap { background: var(--bg-base); }
.fleet-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.fleet-head {
  background: var(--bg-base); border-bottom: 1px solid var(--border);
  padding: 16px 24px; display: flex; justify-content: space-between; align-items: center;
}
.fleet-head-title { font-weight: 700; }
.fleet-head-time  { font-size: .78rem; color: var(--dim); }
.fleet-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); }
.fleet-cell { background: var(--bg-card); padding: 22px; }
.fc-top    { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.s-green  { background: var(--green); box-shadow: 0 0 6px var(--green); animation: blink 1.6s ease-in-out infinite; }
.s-yellow { background: var(--yellow); }
.s-grey   { background: var(--dim); }
.s-red    { background: var(--red); box-shadow: 0 0 6px var(--red); }
.fc-name   { font-weight: 700; font-size: .88rem; }
.fc-status { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.fc-status--error  { color: var(--red); }
.fc-status--offline { color: var(--dim); }
.prog      { height: 4px; background: var(--border); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent); border-radius: 999px; }
.prog-fill--error { background: var(--red); }
.fc-sub    { font-size: .7rem; color: var(--dim); margin-top: 6px; }

/* ── SVG Animator ── */
.anim-wrap { background: var(--bg-deep); }
.anim-container {
  width: 100%;
  aspect-ratio: 3 / 2; /* перезаписывается JS после вычисления bbox */
  background: rgba(255,255,255,.02); border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden; position: relative;
  transition: border-color .3s;
}
.anim-container.has-svg { border-color: rgba(59,130,246,.2); }
.anim-container svg { width: 100%; height: 100%; display: block; }

/* ── Footer ── */
footer { background: var(--bg-base); border-top: 1px solid var(--border); padding: 40px 0; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot-copy  { font-size: .82rem; color: var(--dim); margin-top: 6px; }
.foot-links { display: flex; gap: 24px; }
.foot-links a { font-size: .82rem; color: var(--dim); transition: color .2s; }
.foot-links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mockup { display: none; }
  .steps { grid-template-columns: 1fr; }
  .step:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .step:last-child  { border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .fleet-row { grid-template-columns: 1fr 1fr; }
  .band-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 62px; left: 0; right: 0;
    background: rgba(15,20,32,.97); padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border); gap: 16px;
  }
}
@media (max-width: 560px) {
  .feat-grid { grid-template-columns: 1fr; }
  .fleet-row { grid-template-columns: 1fr 1fr; }
  .hero-btns { flex-direction: column; align-items: flex-start; }
}
