/* ============================================================
   GOVP — Operational Evidence Infrastructure
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------- Tokens: dark (default) ---------- */
:root {
  --bg:        #080b11;
  --bg-2:      #0b0f17;
  --surface:   #11161f;
  --surface-2: #161c27;
  --line:      rgba(255,255,255,0.09);
  --line-2:    rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.16);
  --text:      #e7ecf3;
  --text-2:    #aab4c2;
  --muted:     #7a8696;
  --faint:     #4d5765;

  --accent:    #3b6fd4;
  --accent-2:  #5b8af0;
  --accent-ink:#cfe0ff;
  --accent-bg: rgba(59,111,212,0.10);
  --accent-line: rgba(59,111,212,0.38);

  --ok:        #36a07a;
  --ok-bg:     rgba(54,160,122,0.10);
  --warn:      #c0742a;

  --grid-line: rgba(255,255,255,0.045);
  --shadow:    0 1px 0 rgba(255,255,255,0.04) inset, 0 18px 50px -24px rgba(0,0,0,0.8);

  --maxw: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="light"] {
  --bg:        #f6f7f9;
  --bg-2:      #eef1f4;
  --surface:   #ffffff;
  --surface-2: #f3f5f8;
  --line:      rgba(12,20,33,0.12);
  --line-2:    rgba(12,20,33,0.08);
  --line-strong: rgba(12,20,33,0.2);
  --text:      #0e151f;
  --text-2:    #3f4b5b;
  --muted:     #6b7686;
  --faint:     #aab2be;

  --accent:    #2c5fc4;
  --accent-2:  #2452ad;
  --accent-ink:#1d3f86;
  --accent-bg: rgba(44,95,196,0.07);
  --accent-line: rgba(44,95,196,0.28);

  --ok:        #1f7d5b;
  --ok-bg:     rgba(31,125,91,0.08);
  --warn:      #a85e1c;

  --grid-line: rgba(12,20,33,0.05);
  --shadow:    0 1px 2px rgba(12,20,33,0.04), 0 18px 44px -28px rgba(12,20,33,0.28);
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
}
img,svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 104px 0; position: relative; }
.section--tight { padding: 72px 0; }
.section-divider { border: 0; border-top: 1px solid var(--line-2); margin: 0; }

/* ---------- Type ---------- */
h1,h2,h3,h4 { font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
.display { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
.h1 { font-size: clamp(2.1rem, 3.6vw, 3rem); letter-spacing: -0.03em; }
.h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); letter-spacing: -0.025em; }
.h3 { font-size: 1.28rem; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--text-2); line-height: 1.55; font-weight: 400; }
p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 14px; height: 1px;
  background: var(--accent);
}
.eyebrow--plain::before { display: none; }

.mono { font-family: var(--mono); }
.text-2 { color: var(--text-2); }
.muted { color: var(--muted); }
.accent { color: var(--accent-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 20px;
  font-size: 0.92rem; font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text-2); background: var(--surface-2); }
.btn--sm { padding: 8px 14px; font-size: 0.85rem; }
.btn--lg { padding: 14px 24px; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.92rem; font-weight: 500; color: var(--accent-2);
  font-family: var(--mono);
}
.arrow-link svg { width: 14px; height: 14px; transition: transform .18s var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name { font-weight: 600; letter-spacing: -0.01em; font-size: 1.06rem; }
.brand-name b { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 13px; font-size: 0.9rem; color: var(--text-2); white-space: nowrap;
  border-radius: var(--radius-sm); transition: background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text-2);
  transition: border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }
.nav-toggle { display: none; }
.theme-sun { display: none; }
[data-theme="light"] .theme-moon { display: none; }
[data-theme="light"] .theme-sun { display: block; }

/* mobile menu */
.mobile-menu {
  display: none; flex-direction: column; gap: 2px;
  padding: 12px 32px 24px; border-bottom: 1px solid var(--line-2); background: var(--bg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 4px; font-size: 1rem; color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 14px; }

/* ---------- Grid background accent ---------- */
.grid-bg { position: relative; }
.grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 78%);
          mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 78%);
}
.grid-bg > * { position: relative; z-index: 1; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card--hover { transition: border-color .18s var(--ease), background .18s var(--ease); }
.card--hover:hover { border-color: var(--line-strong); background: var(--surface-2); }

.tag {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 4px;
  border: 1px solid var(--line); color: var(--muted);
}
.tag--accent { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-bg); }
.tag--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-bg); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- Schematic / diagram primitives ---------- */
.node {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  position: relative;
}
.node-label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.node-title { font-size: 0.98rem; font-weight: 600; margin-top: 4px; }
.node-desc { font-size: 0.82rem; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.node--accent { border-color: var(--accent-line); }
.node--ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-2); background: var(--bg-2); padding: 64px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-col h4 { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-2); padding: 5px 0; }
.footer-col a:hover { color: var(--text); }
.footer-about { max-width: 320px; }
.footer-about p { font-size: 0.88rem; color: var(--muted); margin-top: 14px; line-height: 1.55; }
.footer-base { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.footer-base p { font-size: 0.8rem; color: var(--muted); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 0.8rem; color: var(--muted); }
.footer-legal a:hover { color: var(--text); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4,6,10,0.62); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.modal h3 { font-size: 1.4rem; }
.modal p.lead { font-size: 0.95rem; margin-top: 8px; }
.field { margin-top: 16px; }
.field label { display: block; font-size: 0.78rem; font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 0.92rem;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.modal-close { position: absolute; }

/* ---------- Utilities ---------- */
.stack-6 > * + * { margin-top: 6px; }
.stack-10 > * + * { margin-top: 10px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.center { text-align: center; }
.measure { max-width: 660px; }
.measure-narrow { max-width: 540px; }
.hide-mobile { }
.flex { display: flex; }
.flex-gap { display: flex; gap: 12px; flex-wrap: wrap; }
.items-center { align-items: center; }
.between { justify-content: space-between; }

.reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .section { padding: 72px 0; }
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu { padding-left: 20px; padding-right: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-about { max-width: none; }
}

.footer-product-line{margin-top:12px;font-size:.86rem;color:var(--muted)}
.footer-product-line a,.footer-base a{color:var(--text-2);text-decoration:none}
.footer-product-line a:hover,.footer-base a:hover{color:var(--accent-2)}
