/* ===========================================================
   AI Security Intelligence & Report Agent — marketing site
   Design language: a security operations console at night.
   Deep ink background, hairline structure, amber signal accent
   for alerts/CTAs, a cooler trace-blue for links, IBM Plex for
   type (Sans for reading, Mono for anything that is genuinely
   data: commands, env vars, log lines, CWE ids).
   =========================================================== */

:root {
  --ink: #0a0f1c;
  --surface: #10192b;
  --surface-2: #16223a;
  --surface-3: #1c2b46;
  --border: #223252;
  --border-soft: #1a2540;
  --text: #e8ecf5;
  --text-muted: #93a0ba;
  --text-faint: #5f6c87;

  --accent: #e8a33d;       /* signal amber — CTAs, highlights */
  --accent-ink: #2a1c04;   /* text on amber */
  --trace: #6f97f2;        /* trace blue — links, secondary accents */
  --critical: #f2545b;
  --ok: #3ec37e;

  --radius-sm: 4px;
  --radius-md: 8px;
  --container: 1180px;

  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  background-image:
    linear-gradient(180deg, #0b1122 0%, #0a0f1c 420px);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--trace);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--trace);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: #fff;
}

h1 { font-size: clamp(2.1rem, 3.6vw, 3.15rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 2.4vw, 2.05rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }

.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 54ch; }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  background: #0c1425;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  overflow-x: auto;
  color: #cdd8ee;
  line-height: 1.6;
}
pre code { font-size: inherit; }

.pill-mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 11px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: #f0ae52; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--trace); background: rgba(111,151,242,0.08); }

.btn-block { width: 100%; justify-content: center; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 15, 28, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(145deg, var(--trace), #3f5fc9);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 16px; height: 16px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.current { color: #fff; }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 8px 10px; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.nav-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px 18px;
  }
  .nav-links.nav-open a { padding: 10px 0; width: 100%; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn-ghost { display: none; }
  .nav { position: relative; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 64px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(232, 163, 61, 0.1);
  border: 1px solid rgba(232, 163, 61, 0.28);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 20px;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,163,61,0.18);
}

.hero-actions { display: flex; gap: 14px; margin: 30px 0 26px; flex-wrap: wrap; }

.hero-meta {
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint);
}
.hero-meta strong { color: var(--text-muted); font-weight: 500; }

/* console demo card */
.console-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.6);
}
.console-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.console-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border);
}
.console-bar .label {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}
.console-body { padding: 16px 16px 18px; font-family: var(--font-mono); font-size: 0.78rem; }
.console-line { color: var(--text-faint); margin-bottom: 10px; word-break: break-all; }
.console-line .verb { color: var(--trace); }

.threat-card {
  border-left: 3px solid var(--critical);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.threat-card .row1 { display: flex; justify-content: space-between; gap: 8px; color: #fff; font-size: 0.78rem; margin-bottom: 4px; }
.threat-card .sev { color: var(--critical); font-weight: 600; }
.threat-card .cwe { color: var(--text-faint); }

.remediation {
  background: #0c1425;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  color: var(--ok);
  font-size: 0.75rem;
}
.remediation .hint { display:block; color: var(--text-faint); margin-bottom: 4px; }

/* ---------- Trust strip ---------- */

.trust-strip {
  padding: 26px 0;
  border-bottom: 1px solid var(--border-soft);
}
.trust-strip .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.trust-strip p { margin: 0; color: var(--text-faint); font-size: 0.88rem; }
.engine-list { display: flex; gap: 10px; flex-wrap: wrap; }
.engine-list span {
  font-family: var(--font-mono); font-size: 0.76rem;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 10px; color: var(--text-muted);
}

/* ---------- Sections ---------- */

section.block { padding: 76px 0; border-bottom: 1px solid var(--border-soft); }
.block:last-of-type { border-bottom: none; }

.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head .kicker {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--trace);
  margin-bottom: 10px; display: block;
}

/* pipeline steps */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (max-width: 860px) { .pipeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pipeline { grid-template-columns: 1fr; } }

.pipeline-step {
  background: var(--surface);
  padding: 26px 22px;
  position: relative;
}
.pipeline-step .num {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 0.8rem;
  margin-bottom: 14px;
  display: block;
}
.pipeline-step h3 { font-size: 1.02rem; margin-bottom: 8px; color: #fff; }
.pipeline-step p { font-size: 0.9rem; margin: 0; }

/* feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 22px;
}
.feature-card h3 { font-size: 1rem; color: #fff; margin-bottom: 8px; }
.feature-card p { font-size: 0.9rem; margin: 0; }

/* security promise callout */
.promise {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 34px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 640px) { .promise { grid-template-columns: 1fr; } }
.promise-mark {
  width: 42px; height: 42px; border-radius: 8px;
  background: rgba(62, 195, 126, 0.12);
  border: 1px solid rgba(62,195,126,0.35);
  display: flex; align-items: center; justify-content: center;
  color: var(--ok);
  flex-shrink: 0;
}
.promise h3 { color: #fff; margin-bottom: 10px; }
.promise ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; }
.promise li { margin-bottom: 6px; }

/* screenshot frame */
.screen-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
}
.screen-frame img, .screen-frame svg { border-radius: 4px; }
.screen-caption { text-align: center; font-size: 0.82rem; color: var(--text-faint); margin-top: 10px; }

/* ---------- Pricing ---------- */

.pricing-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .pricing-wrap { grid-template-columns: 1fr; } }

.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}
.price-card .tag { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.price-tag { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 6px; }
.price-tag .amount { font-size: 2.6rem; font-weight: 650; color: #fff; letter-spacing: -0.02em; }
.price-tag .currency { font-size: 1.1rem; color: var(--text-muted); }
.price-sub { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 22px; }
.price-list { list-style: none; margin: 0 0 26px; padding: 0; }
.price-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.92rem; color: var(--text-muted);
  padding: 8px 0; border-top: 1px solid var(--border-soft);
}
.price-list li:first-child { border-top: none; }
.price-list svg { flex-shrink: 0; margin-top: 3px; color: var(--ok); }
.price-fine { font-size: 0.8rem; color: var(--text-faint); margin-top: 14px; }

.pricing-notes h3 { color: #fff; }
.pricing-notes .mono-line { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 16px; }

/* ---------- FAQ ---------- */

.faq-list { border-top: 1px solid var(--border-soft); }
.faq-item { border-bottom: 1px solid var(--border-soft); }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: none; text-align: left;
  padding: 20px 4px;
  color: #fff; font-size: 1rem; font-weight: 550;
  cursor: pointer; font-family: var(--font-sans);
}
.faq-q .chev { transition: transform 160ms ease; flex-shrink: 0; color: var(--text-faint); }
.faq-item[open] .chev { transform: rotate(45deg); }
.faq-a { padding: 0 4px 22px; }
.faq-a p { max-width: 74ch; }
.faq-a p:last-child { margin-bottom: 0; }

/* details/summary reset */
.faq-item summary { list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-cta { margin-top: 32px; }

/* ---------- Install guide page ---------- */

.guide-shell { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 56px 0 100px; align-items: start; }
@media (max-width: 900px) { .guide-shell { grid-template-columns: 1fr; } }

.guide-toc {
  position: sticky; top: 90px;
  border-left: 2px solid var(--border);
  padding-left: 16px;
}
.guide-toc .toc-title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-faint); margin-bottom: 12px; display: block; }
.guide-toc a { display: block; color: var(--text-muted); font-size: 0.88rem; padding: 5px 0; }
.guide-toc a:hover { color: var(--text); text-decoration: none; }

.guide-content h2 { margin-top: 2.2em; scroll-margin-top: 90px; }
.guide-content h2:first-child { margin-top: 0; }
.guide-content h3 { margin-top: 1.6em; scroll-margin-top: 90px; color: #fff; }
.guide-content p, .guide-content li { color: var(--text-muted); }
.guide-content ul, .guide-content ol { max-width: 68ch; }
.guide-content table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.88rem; }
.guide-content th, .guide-content td { border: 1px solid var(--border-soft); padding: 9px 12px; text-align: left; vertical-align: top; }
.guide-content th { background: var(--surface); color: #fff; font-weight: 600; }
.guide-content td code { color: var(--trace); }

.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.92rem;
}
.callout.warn { border-left-color: var(--critical); }
.callout.ok { border-left-color: var(--ok); }
.callout p { margin: 0; color: var(--text-muted); }
.callout strong { color: #fff; }

.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 44px;
  border-left: 1px solid var(--border);
  margin-left: 15px;
}
.step-list > li:last-child { border-color: transparent; padding-bottom: 0; }
.step-list > li::before {
  content: counter(step);
  position: absolute; left: -15px; top: 0;
  width: 30px; height: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono); font-size: 0.82rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.step-list h3 { margin-bottom: 8px; }

/* ---------- Legal pages ---------- */

.legal-shell { padding: 56px 0 100px; max-width: 760px; margin: 0 auto; }
.legal-shell h2 { margin-top: 2em; }
.legal-shell h2:first-of-type { margin-top: 0; }
.legal-shell ol, .legal-shell ul { color: var(--text-muted); max-width: 70ch; }
.legal-updated { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-faint); margin-bottom: 36px; display: block; }

/* ---------- Footer ---------- */

.site-footer { padding: 52px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { color: var(--text-faint); font-size: 0.78rem; font-family: var(--font-mono); font-weight: 500; margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.9rem; padding: 5px 0; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-brand p { font-size: 0.88rem; margin-top: 14px; }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: var(--text-faint);
}

/* ---------- Chatbot widget ---------- */

.chat-launcher {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 60;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--trace);
  border: none;
  color: #08101f;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 30px -10px rgba(111,151,242,0.55);
  transition: transform 150ms ease;
}
.chat-launcher:hover { transform: scale(1.05); }
.chat-launcher svg { width: 24px; height: 24px; }

.chat-badge {
  position: absolute; top: -3px; right: -3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--ink);
}

.chat-panel {
  position: fixed;
  right: 22px; bottom: 90px;
  z-index: 61;
  width: min(360px, calc(100vw - 44px));
  max-height: min(560px, calc(100vh - 140px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.65);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel.open { display: flex; }

.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, var(--trace), #3f5fc9);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 650; font-size: 0.85rem;
  flex-shrink: 0;
}
.chat-head-text { flex: 1; min-width: 0; }
.chat-head-text .name { color: #fff; font-size: 0.9rem; font-weight: 600; }
.chat-head-text .role { color: var(--text-faint); font-size: 0.74rem; }
.chat-close {
  background: none; border: none; color: var(--text-faint);
  cursor: pointer; padding: 6px; border-radius: 6px;
}
.chat-close:hover { background: var(--surface-3); color: var(--text); }

.chat-disclosure {
  font-size: 0.7rem; color: var(--text-faint);
  padding: 8px 14px; border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.chat-msg { max-width: 86%; font-size: 0.87rem; line-height: 1.5; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-msg .bubble {
  padding: 10px 12px; border-radius: 10px;
}
.chat-msg.bot .bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 3px; }
.chat-msg.user .bubble { background: var(--trace); color: #08101f; border-bottom-right-radius: 3px; }
.chat-msg .bubble a { color: inherit; text-decoration: underline; }
.chat-msg.bot .bubble a { color: var(--trace); }

.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px;
}
.chat-suggestions button {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
}
.chat-suggestions button:hover { border-color: var(--trace); color: var(--text); }

.chat-input-row {
  display: flex; gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
}
.chat-input-row input {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.87rem;
}
.chat-input-row input:focus { outline: none; border-color: var(--trace); }
.chat-input-row button {
  background: var(--trace);
  border: none; border-radius: 8px;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: #08101f; cursor: pointer; flex-shrink: 0;
}

@media (max-width: 480px) {
  .chat-panel { right: 12px; left: 12px; width: auto; bottom: 82px; }
  .chat-launcher { right: 16px; bottom: 16px; }
}
