/* DevSec — платформа наблюдаемости и безопасности инфраструктуры */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0b0e14;
  --bg-2: #0e121b;
  --surface: #11151f;
  --surface-2: #151a26;
  --border: #1e2533;
  --border-2: #283044;
  --text: #e6e9ef;
  --muted: #8b94a7;
  --muted-2: #5c6373;
  --accent: #3ddc97;
  --accent-dim: rgba(61, 220, 151, .12);
  --blue: #5b8def;
  --warn: #f5a623;
  --danger: #ff5c5c;
  --radius: 10px;
  --radius-sm: 7px;
  --maxw: 1180px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent-dim); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }
.section-sm { padding: 56px 0; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.mono { font-family: var(--mono); }
.center { text-align: center; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 720; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.18rem; }
p { color: var(--muted); }

.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 620px; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans);
  font-size: .92rem; font-weight: 600; padding: 11px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #04130c; }
.btn-primary:hover { background: #54e6a8; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--muted-2); background: var(--surface); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* Navigation */
.nav-wrap { position: sticky; top: 0; z-index: 100; background: rgba(11,14,20,.72); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s, background .25s; }
.nav-wrap.scrolled { border-bottom-color: var(--border); background: rgba(11,14,20,.9); }
nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: .92rem; color: var(--muted); font-weight: 500; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 24px; height: 24px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 84px 0 70px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(680px 360px at 78% -10%, rgba(91,141,239,.16), transparent 70%),
    radial-gradient(560px 320px at 10% 0%, rgba(61,220,151,.12), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero p.lead { margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; color: var(--muted-2); font-size: .82rem; }
.hero-trust .logos { display: flex; gap: 20px; align-items: center; opacity: .65; font-weight: 600; letter-spacing: .02em; }

/* Live demo dashboard panel */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.panel-title { margin-left: 10px; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.panel-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--muted); font-family: var(--mono); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(61,220,151,.6); animation: pulse 2s infinite; }
.pulse.off { background: var(--muted-2); animation: none; box-shadow: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,151,.5);} 70% { box-shadow: 0 0 0 7px rgba(61,220,151,0);} 100% { box-shadow: 0 0 0 0 rgba(61,220,151,0);} }
.panel-body { padding: 18px; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.metric { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.metric .label { font-size: .72rem; color: var(--muted); margin-bottom: 6px; }
.metric .val { font-family: var(--mono); font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.metric .val small { font-size: .72rem; color: var(--muted); font-weight: 400; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 56px; padding: 8px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.spark span { flex: 1; background: linear-gradient(180deg, var(--accent), rgba(61,220,151,.25)); border-radius: 2px 2px 0 0; transition: height .4s ease; min-height: 2px; }

/* Generic grids */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .18s, transform .18s; }
.card:hover { border-color: var(--border-2); }
.card .icon { width: 40px; height: 40px; border-radius: 9px; background: var(--accent-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--accent); }
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .94rem; }

/* Stats band */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat .num { font-family: var(--mono); font-size: 2.3rem; font-weight: 650; letter-spacing: -.02em; }
.stat .desc { font-size: .86rem; color: var(--muted); margin-top: 4px; }

/* Logos / integrations */
.logo-row { display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; opacity: .8; }
.logo-row span { font-weight: 600; color: var(--muted); font-size: 1rem; letter-spacing: .01em; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px -25px rgba(61,220,151,.4); position: relative; }
.plan.featured .badge { position: absolute; top: -11px; left: 30px; background: var(--accent); color: #04130c; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: .04em; }
.plan h3 { font-size: 1.05rem; margin-bottom: 6px; }
.plan .price { font-family: var(--mono); font-size: 2.1rem; font-weight: 650; margin: 12px 0 4px; }
.plan .price small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.plan .plan-desc { font-size: .88rem; min-height: 42px; }
.plan ul { list-style: none; margin: 22px 0; display: flex; flex-direction: column; gap: 11px; }
.plan li { font-size: .9rem; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; }
.plan li::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; margin-top: 3px; background: var(--accent-dim); border-radius: 4px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ddc97' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: 11px; background-repeat: no-repeat; background-position: center; }

/* Status page */
.status-banner { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-radius: var(--radius); background: var(--accent-dim); border: 1px solid rgba(61,220,151,.3); margin-bottom: 32px; }
.status-banner .big-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.status-banner h2 { font-size: 1.25rem; }
.svc-list { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.svc { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.svc:last-child { border-bottom: none; }
.svc .name { font-weight: 500; }
.svc .name small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.svc-state { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; font-family: var(--mono); }
.svc-state .s-dot { width: 9px; height: 9px; border-radius: 50%; }
.s-ok { color: var(--accent); } .s-ok .s-dot { background: var(--accent); }
.s-warn { color: var(--warn); } .s-warn .s-dot { background: var(--warn); }
.s-down { color: var(--danger); } .s-down .s-dot { background: var(--danger); }
.uptime-bars { display: flex; gap: 2px; margin-top: 10px; }
.uptime-bars i { flex: 1; height: 26px; border-radius: 2px; background: var(--accent); opacity: .85; }
.uptime-bars i.w { background: var(--warn); } .uptime-bars i.d { background: var(--danger); }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.docs-side { position: sticky; top: 88px; border-right: 1px solid var(--border); padding-right: 24px; }
.docs-side h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin: 18px 0 10px; }
.docs-side a { display: block; font-size: .9rem; color: var(--muted); padding: 5px 0; }
.docs-side a:hover, .docs-side a.active { color: var(--accent); }
.prose { max-width: 760px; }
.prose h1 { margin-bottom: 16px; }
.prose h2 { margin: 36px 0 14px; font-size: 1.5rem; }
.prose h3 { margin: 26px 0 10px; }
.prose p { margin-bottom: 16px; color: #c3c9d6; }
.prose ul, .prose ol { margin: 0 0 16px 22px; color: #c3c9d6; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(61,220,151,.3); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; color: #e6e9ef; }
.prose pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; overflow-x: auto; margin-bottom: 18px; }
.prose pre code { background: none; border: none; padding: 0; font-size: .85rem; line-height: 1.6; display: block; }
.tok-c { color: var(--muted-2); } .tok-k { color: #5b8def; } .tok-s { color: var(--accent); } .tok-n { color: var(--warn); }

/* Blog */
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .18s, transform .18s; display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.post-cover { aspect-ratio: 16/9; position: relative; }
.post-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.post-tag { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.post-body h3 { margin-bottom: 8px; }
.post-body p { font-size: .9rem; flex: 1; }
.post-meta { margin-top: 16px; font-size: .8rem; color: var(--muted-2); display: flex; gap: 10px; }

/* Article */
.article-head { max-width: 760px; margin: 0 auto 36px; }
.article-head .post-meta { margin-top: 18px; }

/* Forms */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; background: var(--bg-2); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); color: var(--text); font-family: inherit; font-size: .94rem; outline: none; transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .82rem; color: var(--muted-2); margin-top: 14px; }
.form-success { display: none; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-dim); border: 1px solid rgba(61,220,151,.3); color: var(--accent); font-size: .9rem; margin-bottom: 18px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: 14px; padding: 52px; text-align: center; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { margin: 0 auto 26px; max-width: 520px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 56px 0 32px; margin-top: 20px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-col h5 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: 14px; }
.footer-col a { display: block; font-size: .9rem; color: var(--muted); padding: 4px 0; transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-about p { font-size: .9rem; margin: 14px 0; max-width: 280px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted-2); flex-wrap: wrap; gap: 12px; }

/* Page hero (inner pages) */
.page-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--border); }
.breadcrumbs { font-size: .82rem; color: var(--muted-2); margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--muted); }

/* 404 */
.err-wrap { min-height: 66vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 24px; }
.err-code { font-family: var(--mono); font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; color: var(--border-2); letter-spacing: -.04em; line-height: 1; }

/* Support chat widget */
.chat-launch { position: fixed; right: 22px; bottom: 22px; z-index: 200; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #04130c; border: none; cursor: pointer; box-shadow: 0 12px 30px -8px rgba(61,220,151,.5); display: flex; align-items: center; justify-content: center; transition: transform .2s; }
.chat-launch:hover { transform: scale(1.06); }
.chat-launch svg { width: 26px; height: 26px; }
.chat-box { position: fixed; right: 22px; bottom: 88px; z-index: 200; width: 340px; max-width: calc(100vw - 44px); background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); display: none; flex-direction: column; }
.chat-box.open { display: flex; }
.chat-head { padding: 16px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.chat-head .t { font-weight: 600; font-size: .95rem; }
.chat-head .s { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.chat-msgs { padding: 16px; height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { font-size: .88rem; padding: 9px 12px; border-radius: 12px; max-width: 85%; }
.msg.bot { background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 3px; }
.msg.me { background: var(--accent-dim); color: var(--text); align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input input { flex: 1; padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--border-2); border-radius: 8px; color: var(--text); font-family: inherit; font-size: .9rem; outline: none; }
.chat-input button { background: var(--accent); border: none; color: #04130c; border-radius: 8px; padding: 0 14px; cursor: pointer; font-weight: 600; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-3, .grid-4, .pricing-grid, .stats { grid-template-columns: 1fr; }
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 24px 16px; }
  .nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .section { padding: 60px 0; }
  .cta-band { padding: 36px 24px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr 1fr; }
}
