/* =========================================================================
   PROSENTRIQ — Marketing site design system
   Palette and layout are built from the actual product, not decoration:
   sky (blue) = the Detection API / control plane; emerald (green) = the
   kernel agent / enforcement plane. The two accents recur everywhere this
   split matters (architecture diagram, feature grid, pricing) rather than
   being sprinkled arbitrarily.
   ========================================================================= */


:root {
  /* Surfaces */
  --void: #05070a;
  --surface: #0d1219;
  --surface-2: #121a24;
  --surface-3: #182230;

  /* Lines */
  --line: #1e2833;
  --line-bright: #2c3946;

  /* Text */
  --ink: #e9eef3;
  --mist: #8a97a8;
  --faint: #526071;

  /* Brand accents -- from the product logo, tied to the two architecture planes */
  --sky: #38bdf8;
  --sky-deep: #0284c7;
  --sky-dim: rgba(56, 189, 248, 0.12);
  --emerald: #34d399;
  --emerald-deep: #059669;
  --emerald-dim: rgba(52, 211, 153, 0.12);

  /* Semantic (matches the dashboard/PDF reports for one system-wide vocabulary) */
  --warn: #fb923c;
  --danger: #f43f5e;

  /* Type */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --content-width: 1160px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font-family: inherit; }

/* Visible keyboard focus everywhere -- never suppressed */
:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
p { margin: 0; max-width: 62ch; }
code, .mono { font-family: var(--font-mono); }

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

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 10, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}
.brand img { width: 26px; height: 26px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}
/* Fallback for older/embedded renderers with poor flexbox `gap` support
   (evergreen Chrome/Firefox/Safari/Edge have supported gap since 2021 and
   only use the rule above) -- avoids double-spacing by only applying
   margin where gap isn't actually supported. */
@supports not (gap: 1px) {
  .nav-links a { margin-right: 30px; }
  .nav-links a:last-child { margin-right: 0; }
}
.nav-links a {
  font-size: 14.5px;
  color: var(--mist);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--emerald);
  color: #04140d;
}
.btn-primary:hover { background: #4ade9f; }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--line-bright); background: var(--surface); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ---------- Layout helpers ---------- */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.eyebrow-free-label {
  color: var(--mist);
  font-size: 14.5px;
  margin-bottom: 14px;
}
.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 16px;
}
.section-head p { color: var(--mist); font-size: 17px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-grid { margin-top: 40px; }
.hairline { border-top: 1px solid var(--line); }

/* ---------- Terminal component (used in hero + docs) ---------- */
.terminal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.terminal-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-bright); }
.terminal-bar .path { margin-left: 8px; color: var(--faint); font-family: var(--font-mono); font-size: 12.5px; }
.terminal-body {
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
}
.terminal-body .muted { color: var(--faint); }
.terminal-body .sigil { color: var(--emerald); }
.terminal-body .out-ok { color: var(--emerald); }
.terminal-body .out-info { color: var(--sky); }
.error-line { display: none; color: var(--danger); margin-top: 10px; font-size: 13.5px; }
.error-line.visible { display: block; }
.result { display: none; margin-top: 16px; }
.result.visible { display: block; }
.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 15px;
  background: var(--emerald);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cards ---------- */
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
}
.feature-card h3 {
  font-size: 18px;
  margin: 16px 0 10px;
}
.feature-card p { color: var(--mist); font-size: 15px; }
.card ul { padding-left: 20px; list-style: disc; }
.card li { color: var(--mist); font-size: 14.5px; margin-bottom: 8px; }
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-bright);
}
.feature-icon.plane-agent { background: var(--emerald-dim); color: var(--emerald); }
.feature-icon.plane-api { background: var(--sky-dim); color: var(--sky); }
.feature-svg { width: 20px; height: 20px; }

/* ---------- Steps (genuinely sequential content only) ---------- */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.step:first-child { border-top: none; }
.step-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--faint);
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--mist); font-size: 15.5px; }

/* ---------- Architecture diagram ---------- */
.plane-diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.plane {
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.plane-agent { background: linear-gradient(180deg, rgba(52,211,153,0.07), transparent); border-bottom: 1px solid var(--line); }
.plane-api { background: linear-gradient(180deg, rgba(56,189,248,0.07), transparent); }
.plane-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mist);
  min-width: 150px;
}
.plane-items { display: flex; flex-wrap: wrap; gap: 10px; }
.plane-item {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-bright);
  color: var(--ink);
}

/* ---------- Pricing ---------- */
.pricing-head-row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
@supports not (gap: 1px) {
  .pricing-head-row > *:first-child { margin-right: 24px; }
}
.signup-form-row { display: flex; gap: 10px; margin-top: 12px; }
.result-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
}
@supports not (gap: 1px) {
  .signup-form-row > *:first-child, .result-row > *:first-child { margin-right: 10px; }
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.price-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  background: var(--surface);
}
.price-card.featured {
  border-color: var(--emerald);
  background: linear-gradient(180deg, rgba(52,211,153,0.06), var(--surface) 40%);
  transform: translateY(-8px);
}
.price-card .tier-name { font-size: 14.5px; color: var(--mist); margin-bottom: 10px; }
.price-card .tier-price { font-family: var(--font-display); font-size: 40px; margin-bottom: 4px; }
.price-card .tier-price small { font-size: 15px; color: var(--mist); font-weight: 400; }
.price-card .tier-desc { color: var(--mist); font-size: 14.5px; margin-bottom: 24px; }
.price-list { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 28px; }
.price-list li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
  align-items: flex-start;
}
.price-list li .tick { color: var(--emerald); flex-shrink: 0; margin-top: 2px; }
.price-list li .tick.tick-danger { color: var(--danger); }
.tick-icon { width: 16px; height: 16px; display: block; }

/* ---------- Compliance table ---------- */
.compliance-table { width: 100%; border-collapse: collapse; }
.compliance-table th, .compliance-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.compliance-table th { color: var(--mist); font-weight: 500; font-size: 13px; }
.compliance-table td.code { font-family: var(--font-mono); color: var(--sky); white-space: nowrap; }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  color: var(--ink);
  text-align: left;
  padding: 22px 0;
  font-size: 16.5px;
  font-family: var(--font-body);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
/* Suppress the browser's own <summary> disclosure triangle -- the custom
   chevron icon (.chev) is the only indicator that should show. Safari/
   Chrome ignore list-style on summary and need this pseudo-element rule
   specifically; Firefox respects list-style: none alone. */
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ""; }
.faq-q .chev { color: var(--faint); transition: transform 0.2s ease; flex-shrink: 0; margin-left: 20px; }
.faq-item[open] .faq-q .chev { transform: rotate(180deg); }
.chev-icon { width: 18px; height: 18px; display: block; }
.faq-a { color: var(--mist); font-size: 15px; padding-bottom: 22px; max-width: 68ch; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 13px;
  color: var(--mist);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 12px;
}
.footer-col a:hover { color: var(--sky); }
.footer-brand p { color: var(--mist); font-size: 14px; margin-top: 14px; max-width: 32ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: var(--faint); }
.footer-bottom a:hover { color: var(--mist); }
.footer-legal-links { display: flex; align-items: center; gap: 20px; }
@supports not (gap: 1px) {
  .footer-legal-links a { margin-right: 20px; }
  .footer-legal-links a:last-child { margin-right: 0; }
}

/* ---------- Cookie banner ---------- */
#cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface-2);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: none;
}
#cookie-banner.visible { display: block; }
#cookie-banner p { font-size: 14px; color: var(--mist); margin-bottom: 16px; }
#cookie-banner a { color: var(--sky); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-copy h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 14ch; margin-bottom: 20px; }
.hero-copy p.lead { color: var(--mist); font-size: 18px; max-width: 46ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.hero-note { color: var(--faint); font-size: 13.5px; }
.hero-reveal { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.5s ease, opacity 0.5s ease; margin-top: 4px; }
.hero-reveal.visible { max-height: 200px; opacity: 1; margin-top: 14px; }

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  color: var(--mist);
  font-size: 14px;
}
@supports not (gap: 1px) {
  .trust-strip span { margin-right: 36px; margin-bottom: 12px; display: inline-block; }
}

/* ---------- Legal pages ---------- */
.legal-doc h2 { font-size: 21px; margin: 40px 0 14px; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font-size: 16.5px; margin: 26px 0 10px; color: var(--ink); }
.legal-doc p, .legal-doc li { color: var(--mist); font-size: 15.5px; max-width: 72ch; margin-bottom: 14px; }
.legal-doc ul, .legal-doc ol { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.legal-doc ol { list-style: decimal; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc strong { color: var(--ink); }
.legal-meta { color: var(--faint); font-size: 13.5px; margin-bottom: 40px; }
.legal-nav { display: flex; gap: 24px; margin-bottom: 32px; }
.legal-nav a { font-size: 14px; color: var(--mist); padding-bottom: 8px; border-bottom: 2px solid transparent; }
.legal-nav a.active { color: var(--ink); border-color: var(--emerald); }

/* ---------- Page hero shared ---------- */
.page-hero { padding: 64px 0 32px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(32px, 4vw, 46px); margin-bottom: 16px; max-width: 18ch; }
.page-hero p.lead { color: var(--mist); font-size: 18px; max-width: 60ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .pricing-grid, .footer-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 8px 28px 20px;
  }
  .nav-links.mobile-open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  section { padding: 64px 0; }
  .footer-grid { gap: 28px; }
}
