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

:root {
  --bg: #06040a;
  --bg-raised: #0d0918;
  --bg-hover: #140d24;
  --text: #e8e2f4;
  --text-secondary: #b8a8d8;
  --text-muted: #7a6a98;
  --text-dim: #5a4a78;
  --border: rgba(160, 130, 220, 0.12);
  --border-strong: rgba(160, 130, 220, 0.28);

  /* Purple-team palette */
  --violet: #8b5cf6;
  --violet-light: #a78bfa;
  --violet-glow: rgba(139, 92, 246, 0.35);
  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --indigo-glow: rgba(99, 102, 241, 0.3);
  --cyan: #22d3ee;
  --cyan-light: #67e8f9;
  --cyan-glow: rgba(34, 211, 238, 0.28);
  --magenta: #d946ef;
  --magenta-light: #e879f9;
  --magenta-glow: rgba(217, 70, 239, 0.3);
  --lime: #84cc16;
  --lime-light: #a3e635;
  --lime-glow: rgba(132, 204, 22, 0.3);

  /* Verdict colors */
  --clean: #10b981;
  --clean-light: #34d399;
  --hotspot: #f59e0b;
  --hotspot-light: #fbbf24;
  --escalate: #6366f1;
  --escalate-light: #818cf8;

  --steel: #94a3b8;
  --steel-light: #cbd5e1;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Ambient texture ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139, 92, 246, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(217, 70, 239, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* subtle scanline grid for the cyber-defense feel */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 0%, transparent 70%);
}

/* ── Navigation ── */
.nav {
  border-bottom: 1px solid var(--border);
  background: rgba(6, 4, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 30px var(--violet-glow);
  white-space: nowrap;
}

.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  filter: drop-shadow(0 0 8px var(--violet-glow));
}

.nav-links { display: flex; gap: 4px; }

.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}
.nav-link:hover { color: var(--text); background: rgba(160, 130, 220, 0.06); }
.nav-link.active { color: var(--text); background: rgba(160, 130, 220, 0.10); }

.nav-spacer { flex: 1; }

.nav-services { display: flex; gap: 6px; }

.nav-service {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.nav-service:hover { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.04); }
.nav-service.active { color: var(--violet-light); border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.10); }

/* ── Layout ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 28px;
  position: relative;
  z-index: 1;
}

/* ── Hero ── */
.hero {
  margin-bottom: 64px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-emblem-wrap {
  flex-shrink: 0;
  position: relative;
}

.hero-emblem {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(139, 92, 246, 0.45);
  box-shadow:
    0 0 60px rgba(139, 92, 246, 0.30),
    0 0 120px rgba(99, 102, 241, 0.12),
    inset 0 0 30px rgba(0, 0, 0, 0.3);
  animation: violet-pulse 4s ease-in-out infinite;
  filter: hue-rotate(210deg) saturate(1.1);
}

@keyframes violet-pulse {
  0%, 100% { box-shadow: 0 0 60px rgba(139, 92, 246, 0.30), 0 0 120px rgba(99, 102, 241, 0.12); }
  50% { box-shadow: 0 0 84px rgba(139, 92, 246, 0.42), 0 0 160px rgba(99, 102, 241, 0.18); }
}

.hero-content { flex: 1; }

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 56px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  text-shadow: 0 0 60px var(--violet-glow);
  line-height: 1.1;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--violet) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 17px;
  color: var(--text-secondary);
  margin-top: 16px;
  line-height: 1.7;
}

.hero .meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.hero .meta a {
  color: var(--violet-light);
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  transition: border-color 0.15s;
}
.hero .meta a:hover { border-color: var(--violet); }

/* ── Divider ── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-strong) 50%, transparent 100%);
  margin: 48px 0;
}

/* ── Sections ── */
.section { margin-bottom: 56px; }

.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* ── Doctrine / tenets ── */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.tenet {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-raised) 100%);
  padding: 28px;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.tenet::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tenet-accent, var(--violet)), transparent);
  opacity: 0.5;
}

.tenet:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, #1a1030 0%, var(--bg-hover) 100%);
}

.tenet-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--tenet-accent, var(--violet)) 0%, var(--violet-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 10px;
}

.tenet-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.tenet-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Flow diagram ── */
.flow {
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.04) 0%, var(--bg-raised) 100%);
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.flow::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 10%, transparent 80%);
}

.flow-stage {
  position: relative;
  margin-bottom: 8px;
}

.flow-stage + .flow-stage { margin-top: 10px; }

.flow-stage-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet-light);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-stage-label .stage-tag {
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
  font-size: 10px;
}
.flow-stage-label .stage-note {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
  font-size: 12px;
}

/* horizontal node chain (Recon) */
.flow-chain {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

/* vertical variant — nodes stack in a column with down arrows */
.flow-chain.vertical {
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.flow-chain.vertical .flow-node { width: 100%; max-width: 320px; }
.flow-chain.vertical .flow-arrow.down {
  font-size: 18px;
  color: var(--violet);
  opacity: 0.7;
  line-height: 1;
  padding: 6px 0;
}

.flow-node {
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-raised) 100%);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  text-align: center;
  min-width: 120px;
  transition: all 0.2s;
  position: relative;
}
.flow-node:hover {
  border-color: var(--violet);
  background: linear-gradient(180deg, #1c1438 0%, var(--bg-hover) 100%);
  transform: translateY(-1px);
}
.flow-node .node-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  display: block;
}
.flow-node .node-sub {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.flow-node.artifact {
  border-style: dashed;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(34, 211, 238, 0.06);
}
.flow-node.artifact .node-name { color: var(--cyan-light); }
.flow-node.artifact .node-sub { color: var(--cyan); opacity: 0.8; }

/* verdict-colored nodes */
.flow-node.verdict-clean { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.06); }
.flow-node.verdict-clean .node-name { color: var(--clean-light); }
.flow-node.verdict-hotspot { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.06); }
.flow-node.verdict-hotspot .node-name { color: var(--hotspot-light); }
.flow-node.verdict-escalate { border-color: rgba(99, 102, 241, 0.5); background: rgba(99, 102, 241, 0.07); }
.flow-node.verdict-escalate .node-name { color: var(--escalate-light); }

.flow-arrow {
  flex: 0 0 auto;
  color: var(--violet);
  font-size: 18px;
  padding: 0 10px;
  opacity: 0.7;
  font-weight: 700;
}

/* vertical connector between stages */
.flow-connector {
  text-align: center;
  color: var(--violet);
  font-size: 18px;
  opacity: 0.6;
  margin: 2px 0;
  line-height: 1;
}

/* triage branch (Hunt) */
.flow-triage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.flow-trunk {
  text-align: center;
  margin-bottom: 6px;
}
.flow-trunk .flow-node { display: inline-block; min-width: 200px; }

.flow-branches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
}
.flow-branches::before {
  /* trunk fan-out line */
  content: '';
  position: absolute;
  top: -10px;
  left: 16.66%;
  right: 16.66%;
  height: 10px;
  border-top: 1px solid rgba(139, 92, 246, 0.35);
  border-left: 1px solid rgba(139, 92, 246, 0.35);
  border-right: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 6px 6px 0 0;
}

.flow-branch {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.flow-branch::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 1px;
  height: 10px;
  background: rgba(139, 92, 246, 0.35);
}
.flow-branch .branch-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.flow-branch.clean .branch-label { color: var(--clean-light); }
.flow-branch.hotspot .branch-label { color: var(--hotspot-light); }
.flow-branch.escalate .branch-label { color: var(--escalate-light); }
.flow-branch .branch-chain {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.flow-branch .branch-arrow {
  color: var(--text-muted);
  font-size: 14px;
  opacity: 0.6;
}
.flow-branch .branch-out {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px dashed var(--border-strong);
  width: 100%;
}

/* convergence under the triage branches — the Hunt artifact */
.flow-converge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 16px;
  position: relative;
}
.flow-converge::before {
  /* branch fan-in line */
  content: '';
  position: absolute;
  top: -6px;
  left: 16.66%;
  right: 16.66%;
  height: 6px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.35);
  border-left: 1px solid rgba(139, 92, 246, 0.35);
  border-right: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 0 0 6px 6px;
}
.flow-converge .flow-node { width: 100%; max-width: 320px; }
.flow-converge .flow-arrow.down {
  font-size: 18px;
  color: var(--violet);
  opacity: 0.7;
  line-height: 1;
  padding: 8px 0 4px;
}

/* report stage */
.flow-report {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

/* loop banner */
.flow-loop {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-strong);
  padding-top: 14px;
  letter-spacing: 0.02em;
}
.flow-loop strong { color: var(--violet-light); }

/* ── Agent roster (kept light) ── */
.roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.roster-group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  margin: 28px 0 12px;
}

.agent-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-hover) 0%, var(--bg-raised) 100%);
  padding: 20px;
  transition: all 0.2s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--agent-accent, var(--violet)), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.agent-card:hover {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, #1a1030 0%, var(--bg-hover) 100%);
}
.agent-card:hover::before { opacity: 1; }

.agent-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.agent-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.agent-badge {
  align-self: flex-start;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-violet   { color: var(--violet-light); background: rgba(139, 92, 246, 0.12); border: 1px solid rgba(139, 92, 246, 0.25); }
.badge-indigo   { color: var(--indigo-light); background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.25); }
.badge-cyan     { color: var(--cyan-light);   background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34, 211, 238, 0.25); }
.badge-magenta  { color: var(--magenta-light); background: rgba(217, 70, 239, 0.12); border: 1px solid rgba(217, 70, 239, 0.25); }
.badge-lime     { color: var(--lime-light);    background: rgba(132, 204, 22, 0.12); border: 1px solid rgba(132, 204, 22, 0.28); }
.badge-steel    { color: var(--steel-light);  background: rgba(148, 163, 184, 0.12); border: 1px solid rgba(148, 163, 184, 0.25); }

.agent-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.agent-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── Prose ── */
.prose {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--violet-light); font-style: italic; }
.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--cyan-light);
  background: rgba(34, 211, 238, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.pre-block {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, 'Cascadia Mono', Menlo, Consolas, monospace;
}

/* ── Footer ── */
.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-mark {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mark img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  opacity: 0.6;
  filter: hue-rotate(210deg);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(160, 130, 220, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(160, 130, 220, 0.35); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .roster { grid-template-columns: repeat(2, 1fr); }
  .philosophy-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-branches { grid-template-columns: 1fr; gap: 16px; }
  .flow-branches::before { display: none; }
  .flow-branch::before { display: none; }
  .flow-converge::before { display: none; }
}

@media (max-width: 760px) {
  .roster { grid-template-columns: 1fr; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .hero { flex-direction: column; text-align: center; }
  .hero-emblem { width: 140px; height: 140px; }
  .hero h1 { font-size: 36px; }
  .hero .tagline { margin-left: auto; margin-right: auto; }
  .container { padding: 24px 16px; }
  .nav-inner { padding: 0 16px; gap: 16px; }
  .nav-services { display: none; }
  .flow { padding: 24px 16px; }
  .flow-node { min-width: 100%; }
  .flow-arrow { padding: 6px 0; transform: rotate(90deg); }
}
